Can Roslyn be installed without Visual Studio?

纵然是瞬间 提交于 2019-12-05 08:11:10
Jason Malinowski

Take a look at the CompilerPackage sources to see how we install the compiler on your machine when you install the preview VSIX. The trick is we drop some MSBuild files in AppData\Local\Microsoft\MSBuild\12.0\<target name>\ImportAfter. These files are loaded automatically in any C# or VB.NET build. In them, we change the corresponding CscToolPath or VbcToolPath to a path that contains the Roslyn compilers. There's also some additional trickery to deal with multiple hives in the scenario if you had different versions of the compilers installed in different experimental hives in VS.

So if you take a look at that, create those same .target files and edit them to point to some place where you've dropped rcsc and rvbc, it should work.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!