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

netstandard2.0 : StringComparison does not work in generated class #52

Closed
MartinsPlume opened this issue Feb 23, 2023 · 4 comments · Fixed by #55
Closed

netstandard2.0 : StringComparison does not work in generated class #52

MartinsPlume opened this issue Feb 23, 2023 · 4 comments · Fixed by #55

Comments

@MartinsPlume
Copy link

It is missing reference in the generated class, where System.StringComparison is called.

@andrewlock
Copy link
Owner

Hi, I can't seem to replicate the issue, can you provide more details please? 🤔

I added an integration test in #53 that explicitly builds for netstandard2.0 and it seems to work fine

@Feroks
Copy link

Feroks commented Mar 9, 2023

After checking code with @MartinsPlume, it appears that problem is not related to .NET Standard.
Issue with System.StringComparison occurs, if you have folder called System in your project. Generated class attempts to resolve StringComparison from it instead of using actual System namespace.
I have created repository that replicates this issue. I am not sure if anything can be done about in your library, so feel free to close this issue.

@andrewlock
Copy link
Owner

Ah I see. I've created a PR that adds the global:: prefix to try to solve the issue. I'll push up a new version shortly, I'd appreciate if you could give it a try and see if solves your issue! 🙂

@Feroks
Copy link

Feroks commented Mar 13, 2023

Totally forgot that global:: exists 😅
Tried latest package, it works perfectly. Thank you!

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

Successfully merging a pull request may close this issue.

3 participants