Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
285 views
in Technique[技术] by (71.8m points)

c# - What's the latest version of Roslyn my analyzer can target if I support VS2015?

I'm writing a Roslyn diagnostic analyzer that should work on VS2015 and later editions. I want to know the latest version of Microsoft.CodeAnalysis I can use with my project and still support VS2015. I need to use an API that was added in Roslyn 1.2.0 (AnalysisContext.EnableConcurrentExecution), but I think that version of Roslyn isn't included with VS2015 (IIRC, only VS2017 supports C# 7). Does this mean I can't use this API in my analyzer?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Yes, Roslyn 2.3.0 will only work on Visual Studio 2017.3 and newer.

In general the mappings of Roslyn to Visual Studio versions works like this:

Roslyn 1.0.x -> Visual Studio 2015.0 (RTM)

Roslyn 1.1.x -> Visual Studio 2015.1 (Update 1)

Roslyn 1.2.x -> Visual Studio 2015.2 (Update 2)

Roslyn 1.3.x -> Visual Studio 2015.3 (Update 3)

Roslyn 2.0.x -> Visual Studio 2017.0 (RTM)

Roslyn 2.1.x -> Visual Studio 2017.1.x

Roslyn 2.2.x -> Visual Studio 2017.2.x

Roslyn 2.3.x -> Visual Studio 2017.3.x

Roslyn 2.4.x -> Visual Studio 2017.4.x

Roslyn 2.6.x -> Visual Studio 2017.5.x

Roslyn 2.7.x -> Visual Studio 2017.7.x

Roslyn 2.8.x -> Visual Studio 2017.7.x

Roslyn 2.9.x -> Visual Studio 2017.8.x

Roslyn 2.10.x -> Visual Studio 2017.9.x

Roslyn 3.0.x -> Visual Studio 2019.0 (RTM)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...