簡體   English   中英

如何在Visual Studio中創建csx文件?

[英]How to create csx file in Visual Studio?

我正在使用Visual Studio 2015 csi.exe 。根據csi.exe ,有諸如“ C#腳本文件”之類的東西:

如果指定,執行script-file.csx

是否有此格式的文檔? 如何在Visual Studio中創建它們?


> 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.

通過在IDE中創建文本文件並將其保存為.csx擴展名,我能夠在Visual Studio 2015 Update 2中創建C#腳本(.csx)文件。 然后,通過右鍵單擊並選擇“在Interactive中執行”,我能夠在C#Interactive(csi.exe)的C#腳本文件中執行C#代碼。 它確實運行,但是沒有智能感知支持。

令人沮喪的是,這是不可能的。 錯誤報告給Microsoft。 請添加您的投票。 https://visualstudio.uservoice.com/forums/121579-visual-studio-2015/suggestions/7848117-add-scriptcs-csx-intellisense-and-debugging-in-v

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM