首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在中创建csx文件?

如何在中创建csx文件?
EN

Stack Overflow用户
提问于 2016-04-26 13:39:06
回答 2查看 7.2K关注 0票数 2

我正在使用VisualStudio2015Update2。根据csi.exe的说法,有“C#脚本文件”这样的东西:

如果指定的话执行script-file.csx

有这种格式的文档吗?如何在中创建它们?

代码语言:javascript
复制
> csi.exe /?

Microsoft (R) Visual C# Interactive Compiler version 1.2.0.60317
Copyright (C) Microsoft Corporation. All rights reserved.

Usage: csi [option] ... [script-file.csx] [script-argument] ...

Executes script-file.csx if specified, otherwise launches an interactive REPL (Read Eval Print Loop).

Options:
  /help                          Display this usage message (alternative form: /?)
  /i                             Drop to REPL after executing the specified script.
  /r:<file>                      Reference metadata from the specified assembly file (alternative form: /reference)
  /r:<file list>                 Reference metadata from the specified assembly files (alternative form: /reference)
  /lib:<path list>               List of directories where to look for libraries specified by #r directive. 
                                 (alternative forms: /libPath /libPaths)
  /u:<namespace>                 Define global namespace using (alternative forms: /using, /usings, /import, /imports)
  @<file>                        Read response file for more options
  --                             Indicates that the remaining arguments should not be treated as options.
EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2016-04-26 13:55:50

令人沮丧的是,这是不可能的。向微软报告了错误。请加上你的投票。https://visualstudio.uservoice.com/forums/121579-visual-studio-2015/suggestions/7848117-add-scriptcs-csx-intellisense-and-debugging-in-v

票数 4
EN

Stack Overflow用户

发布于 2016-05-19 22:35:35

我能够在VisualStudio2015Update2中创建一个C#脚本( .csx )文件,方法是在IDE中创建一个文本文件,并将其保存为一个.csx扩展名。然后,通过右键单击和选择,我能够在C#交互(csi.exe)中的C#脚本文件中执行C#代码。它确实在运行,但是没有intellisense支持。

票数 5
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/36866654

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档