4

We have Roslyn Analyzers written for VS2013 though its not officially supported by MSFT now. We decided to upgrade those to VS2015. The APIs are drastically different but we managed to do it. The VS2013 analyzer dlls were normal .Net class libraries. But in VS2015, it specifically demands the class libraries to be portable. I don't think VS2015 is portable.

Are there any reasons for enforcing portability for Roslyn analyzer dlls? One reason I could think of is to run the Analyzers all the places .Net program can be compiled. Are there any other reasons?

Joy George Kunjikkuru
  • 1,495
  • 13
  • 27

1 Answers1

3

They don't HAVE to be portable to operate in VS 2015, but in order to be supported in NuGet packages that build on Linux/Mac using the dotnet cli, they have to target something that can run in .NET Core.

Kevin Pilch
  • 11,485
  • 1
  • 39
  • 41
  • We tried just upgrading old project but VS2015 was not able to load the analyzer classes from normal assemblies. After changing the assembly to portable it started working. – Joy George Kunjikkuru Feb 14 '16 at 22:13
  • I can't really explain that. There is no technical reason why assemblies targeting the full .NET Framework shouldn't work. What was the exception? – Kevin Pilch Feb 17 '16 at 16:26