Skip to content
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

ThisAssembly causing build warnings because of missing default namespace #925

Closed
JP-CZ opened this issue Apr 28, 2023 · 1 comment
Closed

Comments

@JP-CZ
Copy link

JP-CZ commented Apr 28, 2023

We use different version.json files for multiple assemblies within a single repository. When accesing the ThisAssembly class in one project (to detect if we run a prerelease version) we are getting a compiler warning:

The type 'ThisAssembly' in 'D:\a\1\s\obj.....' conflicts with the imported type 'ThisAssembly' in '...., Version=2.4.0.0, Culture=neutral, PublicKeyToken=64d76205e1e1c64c'. Using the type defined in 'D:\a\1\s\obj....'. (external_roslyn:CS0436)

Because of the setup of our mono repo we end up getting many of those warnings.

My proposal would be to generate the ThisAssembly class into the default namespace of the assembly?

@AArnott
Copy link
Collaborator

AArnott commented Apr 28, 2023

This won't occur if you don't use InternalsVisibleTo, which I generally strongly discourage.
You can also disable this particular warning.

Duplicate of #555 (which is fixed by #911).

@AArnott AArnott closed this as not planned Won't fix, can't repro, duplicate, stale Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants