-
Notifications
You must be signed in to change notification settings - Fork 1.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
Basic doc on msbuild and the gac #6173
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And maybe also add a comment about other GAC-related issues we've had, since other assemblies in the GAC can mess with MSBuild. I'm particularly thinking of the System.Memory problem, but a variety of other assemblies we rely on could theoretically have the same problem.
It might also be worth emphasizing that putting something like MSBuild in the GAC seems like a solution because it makes problems go away, but it causes more problems down the road when you've forgotten you did that, and the next version comes out, and you get hard-to-understand version mismatch errors.
documentation/wiki/UnGAC.md
Outdated
|
||
See the [public documentation](https://docs.microsoft.com/dotnet/framework/app-domains/gac). The GAC is a folder where different installations of VS on the same machine look for assemblies that are commonly used. If an assembly is in the GAC, it will be prioritized over any other assembly. | ||
|
||
The only MSBuild assemblies you may see in the GAC are version 4.0. There is no reason any modern MSBuild assembly should be in the GAC today. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it version 4.8?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And maybe define "modern" (15.0+)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, folders are marked as 4.0 but the assemblies themselves are 4.8.4
Run the [EnumerateMSBuild powershell script](https://github.com/Microsoft/msbuild/blob/master/scripts/EnumerateMSBuild.ps1) from our repo. It will output a `msbuild_versions.txt` file that lists MSBuild assemblies in their common folders along with their versions. | ||
|
||
## How to Remove MSBuild Assemblies from the GAC | ||
1. If on Visual Studio 16.8 or higher, repair your installation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sounds like and
, whereas I'm assuming you mean or
.
@Forgind Do you by chance have a link to a system.memory issue we've fixed by removing it from the GAC? |
This took too long to find: |
@Forgind Much appreciated. I posted it in our tracking issue. We can keep posting related assemblies there so we don't need to update this doc much. |
Context
I'd like to have an easy link to send folks that have GAC issues with msbuild. aka.ms/msbuild/ungac should do the trick. There's no good place to point that link to, so here's a basic doc that should get folks unblocked if they really are seeing a GAC issue with MSBuild.
Changes Made
Added a doc.