-
-
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
Issues because ThisAssembly is not public #92
Comments
Interestingly, i found this issue because in a C# solution I maintain a freshly cloned local copy fails to build due to "ThisAssembly is inaccessible due to its protection level" error in every project that depends on the GitInfo Nuget package. I was able to fix it by doing a nuget restore manually, but Visual Studio's automatic "restore before build" functionality did not solve it. |
Since the public partial class ThisAssembly { } (make sure the namespace matches) See https://github.com/kzu/GitInfo/blob/master/src/GitInfo/build/GitInfo.cs.pp#L30 |
We found that if you are precompiling ASP.Net MVC/Web Forms there is an extra step which produces an AssemblyInfo.dll file. This step only uses |
could you provide a binlog so I can see what steps are missing? Please use a clean repro project, not an actual one, since the binlog can contain private information. |
I'm not sure I can binlog that ASP.Net step, but I'll look into that. |
I m hitting this :( i think this might be related of having GitInfo in several projects, and one projects wants to use ThisAssembly from other project.. Make it public doesn't work. Any other ideas ?! |
@rmarinho that's quite vague and not very actionable. Care to elaborate, provide a repro or a binlog perhaps? It looks like you have a different issue than the one described here |
Hi @kzu sorry :) So i have a sln with several projects.. I added GitInfo like this: my Directory.Build.props
my GitVersion.props
So one of my projects uses something like this:
When i try to build
So i have a binlog too , thanks! |
So, you set |
Dahhh .. thanks Daniel .. that's what copy paste does to us .. :P |
I've added this to my ASP.NET Core 2.2 project and it all works fine and builds etc.
However, when I try to do any scaffolding in the solution, it breaks.
I go to add a scaffolded item:
...and I get this error:
It's presumably something to do with how the scaffolding build is configured, but that seems out of my control.
The text was updated successfully, but these errors were encountered: