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

Targeting netstandard2.0/netstandard2.1 #104

Open
carl-berg opened this issue Apr 8, 2020 · 7 comments
Open

Targeting netstandard2.0/netstandard2.1 #104

carl-berg opened this issue Apr 8, 2020 · 7 comments

Comments

@carl-berg
Copy link
Collaborator

carl-berg commented Apr 8, 2020

Current behavior when installing WebAnchor on a .net core 3.1 project is that it wants a lot of dependencies
image
Since Webanchor supports netstandard2.0 (maybe could support netstandard2.1 aswell now?) i assume the culprit here is WebAnchor.Analyzers which targets only netstandard1.3

@carl-berg
Copy link
Collaborator Author

carl-berg commented Apr 8, 2020

...could also be Castle.Core which only goes up to .NETStandard 1.5 which could be a harder nut to crack castleproject/Core#407... but it does seem like they're working on it castleproject/Core#485

@carl-berg carl-berg changed the title WebAnchor.Analyzers should maybe also target netstandard2.0 Targeting netstandard2.0/netstandard2.1 Apr 8, 2020
@mattiasnordqvist
Copy link
Owner

I don't understand this. I've heard I should always target the lowest possible netstandard.

@carl-berg
Copy link
Collaborator Author

However, targeting lower .NET Standard versions introduces a number of support dependencies. If your project targets .NET Standard 1.x, we recommend that you also target .NET Standard 2.0. This simplifies the dependency graph for users of your library that run on .NET Standard 2.0 compatible frameworks, and it reduces the number of packages they need to download.

https://docs.microsoft.com/en-us/dotnet/standard/net-standard

@mattiasnordqvist
Copy link
Owner

Ok so target low and multitarget

@carl-berg
Copy link
Collaborator Author

Yeah, that's what i think is the recommended way

@mattiasnordqvist
Copy link
Owner

So I released 6.6.2 which also targets netstandard2.1.
For some reason, I could not make the analyzer multitarget, and the vsix, which is netframework (has to be?) could not reference a package targeting netstandard2.1, so.... webanchor 6.6.2 still references the same analyzer. Hoping a bit that because it's a dev dependency it's going to work out fine anyways. We'll see

@mattiasnordqvist
Copy link
Owner

mattiasnordqvist commented Apr 15, 2020

my dependency list still looked crazy I think. same for you @carl-berg ?
Maybe the analyzer should be it's own package entirely, and not be referenced by webanchor at all.

@mattiasnordqvist mattiasnordqvist added this to Ideas in WebAnchor v7 Feb 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants