2016-04-26 4 views
0

私は 'C#のスクリプトがファイル' のようなものがあるcsi.exeによると、Visual Studioの2015年にアップデート2を使用しています:Visual Studioでcsxファイルを作成するには?

は実行スクリプト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. 
+0

2011年のこのブログ記事はhttps://blogs.msdn.microsoft.com/visualstudio/2011/10/19/introducing-the-microsoft-roslyn-ctp/にありますが、Visual Studioではこの手順は機能しません2015( 'Visual C#script'が 'new file'から抜けています) –

+0

https://msdn.microsoft.com/en-gb/magazine/mt614271.aspx –

+0

テキストファイルの場合は、テンプレートは必要ありませんそれを作成するためには?知っているファイルの名前を変更することができます –

答えて

0

Visual Studio 2015 Update 2で、IDE内からテキストファイルを作成し、.csx拡張子で保存することで、C#Script(.csx)ファイルを作成できました。私はC#Interactive(csi.exe)のC#ScriptファイルでC#コードを実行するために、右クリックしてインタラクティブで実行を選択することができました。実行されましたが、インテリセンスのサポートはありませんでした。

関連する問題