-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Visual Studio 2017 "Stand-Alone Code Analysis Tool" missing Microsoft.Build, Version=14.0.0. #18140
Labels
Comments
@aodendaal a workaround here would be:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.Build"
publicKeyToken="b03f5f7f11d50a3a"
culture="neutral" />
<bindingRedirect oldVersion="14.0.0.0"
newVersion="15.1.0.0"/>
</dependentAssembly>
</assemblyBinding>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.Build.Framework"
publicKeyToken="b03f5f7f11d50a3a"
culture="neutral" />
<bindingRedirect oldVersion="14.0.0.0"
newVersion="15.1.0.0"/>
</dependentAssembly>
</assemblyBinding>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.Build.Tasks.Core"
publicKeyToken="b03f5f7f11d50a3a"
culture="neutral" />
<bindingRedirect oldVersion="14.0.0.0"
newVersion="15.1.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
|
Thanks! That works. I also had to apply a bindingRedirect for <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Collections.Immutable"
publicKeyToken="b03f5f7f11d50a3a"
culture="neutral" />
<bindingRedirect oldVersion="1.1.36.0"
newVersion="1.2.1.0"/>
</dependentAssembly>
</assemblyBinding> |
@asecchia I think the fix here is to have the templates add the redirects and msbuild references automatically for you. Thanks for reporting this bug. |
Issue moved to dotnet/roslyn-sdk #69 via ZenHub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version Used:
Steps to Reproduce:
var workspace = Microsoft.CodeAnalysis.MSBuild.MSBuildWorkspace.Create();
Expected Behavior:
Code executes without exceptions
Actual Behavior:
System.Reflection.ReflectionTypeLoadException raised with multiple of the same LoaderExceptions:
Could not load file or assembly 'Microsoft.Build, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Could not load file or assembly 'Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
I tried adding a reference to
Microsoft.Build
andMicrosoft.Build.Tasks.Core
but I only have versions 4.0.0.0 and 15.1.0.0How do I get the correct references because either the template is using old references or I'm missing the older versions
The text was updated successfully, but these errors were encountered: