我安裝了Roslyn。現在,如果我知道在哪裏看在Visual Studio中,我可以打開「C#交互窗口」,並運行代碼:C#交互式窗口可以與我的代碼交互嗎?
> 5 + 3
8
這就是可愛。現在我怎樣才能互動我的代碼 -my classes?假設我有一個項目打開。
> new Cog()
(1,5): error CS0246: The type or namespace name 'Cog' could not be found (are you missing a using directive or an assembly reference?)
Roslyn不是交互式窗口。它是.NET編譯器API。你確定不會錯過這些東西嗎? – Tigran
這是Roslyn附帶的一個功能http://blogs.msdn.com/b/csharpfaq/archive/2012/01/30/roslyn-ctp-introduces-interactive-code-for-c.aspx –
我總是使用標準即時窗口 - 適用於您自己的類型。 – Polyfun