After updating VS 2017 to 15.6.3: Could not load type 'Microsoft.Build.Logging.ProfilerLogger'
- Dominant language
- C#
- Stars
- 4.2k
- Forks
- 778
- Avg merge
- 1h 15m
- Merged PRs (30d)
- 19
Description
I just updated to latest version of Visual Studio 2017 (15.6.3) that was just released and my Cake builds started crashing (when restoring NuGet packages or running the build task).
This is the snippet of the log:
```
MSBuild auto-detection: using msbuild version '15.6.82.30579' from 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\bin'.
Unhandled Exception: System.TypeLoadException: Could not load type 'Microsoft.Build.Logging.ProfilerLogger' from assembly 'Microsoft.Build, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
at System.Signature.GetSignature(Void* pCorSig, Int32 cCorSig, RuntimeFieldHandleInternal fieldHandle, IRuntimeMethodInfo methodHandle, RuntimeType declaringType)
at System.Reflection.RuntimeMethodInfo.FetchNonReturnParameters()
at System.Reflection.RuntimeMethodInfo.GetParameters()
at System.Diagnostics.StackTrace.ToString(TraceFormat traceFormat)
at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
at System.Exception.GetStackTrace(Boolean needFileInfo)
at System.Exception.ToString(Boolean needFileLineInfo, Boolean needMessage)
at System.Exception.ToString()
at Microsoft.Build.CommandLine.MSBuildApp.Execute(String commandLine)
at Microsoft.Build.CommandLine.MSBuildApp.Main()
```
I'm using Cake 0.26.1 and building on Windows 10, it's a full .NET Framework 4.7.1 app, old csproj structure.
I get the error from running `NuGetRestore(solutionFile)`, but also from running `MSBuild(solutionFile, ...)`.
**Is this a Cake issue, or should I look for help somewhere else? Can you help?**
Thanks for your time.
---
EDIT: The only other mention of this error I Googled is:
https://developercommunity.visualstudio.com/content/problem/214894/vs-2017-update-v1561-v1562-msbuild-crashes.html
Contributor guide
Research direction
Start by reproducing the failure with Cake 0.26.1 on Windows 10 after the Visual Studio 2017 15.6.3 update, using the NuGetRestore and MSBuild entry points named in the report. Compare the failure with the referenced Visual Studio issue and determine whether Cake can address it or whether the result should be documented as an external MSBuild incompatibility.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100