0

i have visual studio 2015 and .net framework 4.5

i found that roslyn compiler is lunch with visual studio 2015(as default compiler ) but i dnt knw that i am using roslyn compilet or not.

i want to know that how can i know which compiler i am using by command ?

i found this code

Console.Write(typeof(string).Assembly.ImageRuntimeVersion);

but this not showing right thing i want name of compiler.

this is showing about roslyn compiler but does not show any command that show compiler name.

How to use roslyn c# compiler with visual studio 2015?

Note: i am new in this thing

Community
  • 1
  • 1
Shah Niral
  • 121
  • 11
  • If it's a one-time check, use one of the C# 6 features, e.g. string interpolation. This code will only compile with roslyn: string foo="123";string bar=$"foo={foo}"; – Evert Mar 04 '16 at 11:38
  • i can do auto property initialization that is c# 6.0 features but i cant not show roslyn syntax visualizer in view->other windows why? any idea ? should i install code analysis package from nuget " Install-Package Microsoft.CodeAnalysis -Version 1.1.1 " ??? – Shah Niral Mar 04 '16 at 11:47
  • I think that requires a specific plugin/extension, I think '.NET Compiler Platform SDK'. See Tools -> Extensions and Updates. – Evert Mar 04 '16 at 11:55
  • On .NET Framework 4.6 and above with Visual Studio 2015, you must be using Roslyn based compiler. Don't know what you are asking exactly. Note that **you cannot be using .NET Framework 4.5 if you have installed Visual Studio 2015**. – Lex Li Mar 04 '16 at 12:05
  • @Evert i installed that but nothing is shown that i want to found "roslyn visualizer" – Shah Niral Mar 04 '16 at 12:10
  • @LexLi thanks for your sugestion :) – Shah Niral Mar 04 '16 at 12:10
  • @LexLi did you know how to i start make project based on asp .net VNext technology ? – Shah Niral Mar 04 '16 at 12:11
  • It is called 'syntax visualizer' – Evert Mar 04 '16 at 12:22
  • no roslyn name is not there @Evert – Shah Niral Mar 04 '16 at 12:23
  • @ShahNiral based on this question, I don't recommend you try ASP.NET Core 1.0 out. You don't have enough experience to jump to that wild horse at this moment. But well, https://docs.asp.net contains what you might read (not up-to-date yet). – Lex Li Mar 04 '16 at 13:13

0 Answers0