-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
ThisAssemblyNamespace is ignored when updating from 2.3.0 to 3.0.4 #258
Comments
I think that 3.0.x is ignoring the ThisAssemblyNamespace property, which allowed you to set a distinct namespace for each project in previous versions. For instance a common solution was adding
to Directory.Build.targets. Without that property, all ThisAssembly classes go into the global namespace. If you are also using the InternalsVisibleTo attribute, then you get collisions that break the build as you are seeing. Until it is fixed, you will need to either remove the [InternalsVisibleTo] attribute, which will probably break stuff, since it will be there for a reason, or stick with 2.3.0 |
Good idea @rwg0 By adding [InternalsVisibleToAttribute] I still wasnt able to produce the error in my minimal sample but when I removed the attribute from my real project It successfully compiles with 3.0.4 as well. |
Yes, this is a missing feature in 3.x. Pending implementation on ThisAssembly at devlooped/ThisAssembly#211 |
We were not properly conditioning the new ThisAssembly-based generation on the usage of a custom ThisAssemblyNamespace, causing P2P scenarios to fail since we were simultaneously generating in the custom namespace *and* the global one. Fixes #258
We were not properly conditioning the new ThisAssembly-based generation on the usage of a custom ThisAssemblyNamespace, causing P2P scenarios to fail since we were simultaneously generating in the custom namespace *and* the global one. Fixes #258
Describe the Bug
error CS0436: The type 'ThisAssembly' in 'GitInfo.CodeAnalysis\GitInfoGenerator\ThisAssembly.Git.IsDirty.g.cs' conflicts with the imported type 'ThisAssembly' in 'myassembly, Culture=neutral, PublicKeyToken=...'. Using the type defined in 'GitInfo.CodeAnalysis\GitInfoGenerator\ThisAssembly.Git.IsDirty.g.cs'.
Steps to Reproduce
I updated my project from 2.3.0 to 3.0.4 and run into this issue. Using 3.0.0. results in
Note: Branchname contains ´/´, and gitversion shows
v123.45-678-g<$commitid>
instead of123.45.678
.Expected Behavior
Updating to 3.0.4 should not break a project that was working with 2.3.0.
Version Info
working version: 2.3.0
breaking versions: 3.0.4 (and 3.0.0)
Additional Info
I tried to create a minimal sample but wasnt able to reproduce the issue over there, though I tried to create the same setup is to my failing project.
So I hope you can give me some hints how to continue.
The text was updated successfully, but these errors were encountered: