-
Notifications
You must be signed in to change notification settings - Fork 509
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
1.0.0 Versioning policy causing wrong versions to be picked up in VS #1391
Comments
I need to put some thought into this. Technically, the reason this occurs is there have not been any releases to date, and the versioning strategy does not provide any SxS guarantees for prereleases. Stable releases are already configured to use a different assembly identity and would not result in this warning. |
Is it important that prereleases share an assembly version, or can we make sure they are unique as well? What will the assembly version be for the first release? I guess if it's 1.0.0, it will conflict with all prereleases that people use. |
I don't have an answer for you yet on this one.
It's 1.0.0 but it uses a different strong name key. Not only is a conflict impossible, it's also impossible for someone to add an assembly binding redirect to cause a conflict between a prerelease and a stable release. |
I'll figure out something to do for this in Beta 11. |
Moving to Beta 12 due to high-priority issues demanding a Beta 11 release now. |
I'll start bumping up the assembly revision numbers during the tagged builds to avoid this issue. Right now no other libraries are depending on this one... I'm counting on that not changing. |
That sounds like a good policy. Thank you. |
Analyzers get loaded into the default AppDomain in Visual Studio. As such, a given assembly can only be loaded once per version. The StyleCop.Analyzers beta001 and beta009 (and everything in between) all are versioned as 1.0.0, which means VS can't possibly choose the right one to use unless exactly one such version is ever used for an entire instance of VS. I can't have a solution with projects that use different versions, and after loading a solution that uses beta001, I can't load a solution that uses beta009 without restarting VS.
Roslyn points this out in the error list:
By the way, this warning, which appears once for each project in my solution, is visible as soon as I open the first project in an instance of VS. In the project.json world, where packages always come from a single nuget cache directory (as you can see in the paths mentioned above), there will virtually always be multiple versions of StyleCop.Analyzers in the package cache, whether or not you still use some of them. So to avoid this warning appearing for most/all StyleCop.Analyzers users going forward, we need to change something.
Can you please change the versioning strategy such that each release has a larger assembly version number, and can thus be loaded in VS alongside other versions?
The text was updated successfully, but these errors were encountered: