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

GetInfo 3.3.3 fails like #273 ('ThisAssembly.Git' is inaccessible...) on non-SDK style .csproj, 2.3.0 works fine #326

Closed
FanDjango opened this issue Dec 6, 2023 · 0 comments
Labels

Comments

@FanDjango
Copy link

Describe the Bug

Please see the description of #273

Failure is compiler error: "'ThisAssembly.Git' is inaccessible due to its protection level"

Although #273 has been closed as the majority of users report that this issue has been resolved, I can still reproduce this error in the case of a non-SDK style app.

Steps to Reproduce

Create a new Console App Net Framework Non-SDK
Add GitInfo 2.3.0
Add Console.WriteLine(ThisAssembly.Git.Commit); to the Program.cs
Works fine.

Then upgrade to GitInfo 3.3.3.

Alternatively, use GitInfo 3.3.3 from the beginning and don't upgrade.

Result:
"'ThisAssembly.Git' is inaccessible due to its protection level"

Expected Behavior

Compiler should not show this error

Exception with Stack Trace

NA

Version Info

Clean fresh Visual Studio 2022 Console App, once as non-SDK, once as SDK style

Additional Info

Create a new Console App Net Framework Non-SDK style
Add GitInfo 2.3.0
Add Console.WriteLine(ThisAssembly.Git.Commit); to the Program.cs
Works fine.

Upgrade to GitInfo 3.3.3

Result:
'ThisAssembly.Git' is inaccessible due to its protection level

Go back to GitInfo 2.3.0, works fine again.

Tried the same sequence with a new Console APP, this time using SDK style .csproj, then GitInfo 3.3.3 is OK.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant