Microsoft.CodeAnalysis 1.0.0 cannot be used in VS2012 #4166
Labels
Area-Infrastructure
Concept-Portability
The issue deals with portable code (portable libraries, etc.).
Resolution-By Design
The behavior reported in the issue matches the current design
Milestone
msbuild v4 seems to get confused by referencing a newer version of the build tools. The full output from building a project referencing Roslyn 1.0.0 when built with msbuild 4.6.57.0 on a system with build tools 2015 RC installed:
The target framework in question here is 4.5.2, but targetting 4.5 and 4.5.1 gives the same result. The result of the warnings is apparently that msbuild just ignores the reference to Microsoft.CodeAnalysis.Workspace.Desktop, resulting in the build failing.
Building it with msbuild v14 works fine. So I tried to force Visual Studio to use the new build tools by adding binding redirects for Microsoft.Build and Microsoft.Build.Framework since they are supposed to be backwards compatible. This approach works fine for a C# project, however loading a F# project failed - the separation between the build tools and Visual Studio seems not to have been as good as one might have hoped for...:
...
I'm not sure what can be done to solve this (besides upgrading Visual Studio, which unfortunately isn't an option right now). Is it possibly that it could be worked around by adding some custom build rules to the NuGet package? Otherwise is it possible that the targeting patches could be updated so msbuild 4 doesn't think the built tools are part of the frameworks? Or VS2012 be updated to be able to use a newer msbuild version? (given that service pack support seems to have ended I'm guessing the latter isn't an option)
The text was updated successfully, but these errors were encountered: