mathnet / mathnet-spatial

Math.NET Spatial
http://spatial.mathdotnet.com
MIT License
378 stars 133 forks source link

NuGet package must not include reference to PublicApiAnalyzer nor to StyleCop.Analyzers #161

Closed cdrnet closed 5 years ago

cdrnet commented 5 years ago

Looks like a packaging issue.

JohanLarsson commented 5 years ago

Paket has excludedGroups

Add:

excludedgroups
  build
  Analyzers

To paket.template

cdrnet commented 5 years ago

I'm actually using the .Net SDK directly to create the packages at this point - but I expect it has a similar feature. Thanks for the pointer!

JohanLarsson commented 5 years ago

I never figured out how to exclude using dotnet pack

cdrnet commented 5 years ago

If needed we can use Paket for packing. I wished to get a bit closer to the standard tooling, but I actually have other issues with dotnet pack as well (e.g. even despite --no-build it still recreates the dlls in some cases, which messes with code signing).

JohanLarsson commented 5 years ago

Nice if standard tooling can be used of course.

Jones-Adam commented 5 years ago

with regard to dotnet pack repacking, have a look at https://stackoverflow.com/questions/50232375/how-to-dotnet-pack-an-already-compiled-project/50233550#50233550 if the project file contains an alternate build path, dotnet pack won't find it and will build it again

li0nsar3c00l commented 5 years ago

Please make sure adding the privateassets options, so they won't flow to any project referencing this library and force the dev to deal with different stylecop warnings

ugumba commented 5 years ago

Thanks for your efforts! While waiting for an updated beta nuget, is there any way to avoid these analyzers running on my code?
I've tried various combinations of ExcludeAssets/PrivateAssets/IncludeAssets with no success - I keep getting warnings in the hundreds. It's very annoying, to put it mildly.

li0nsar3c00l commented 5 years ago

Same here. As far as I understood the concept, there is no option to prevent this, if it hasn't been done in the original project. And apparently, according to https://github.com/mathnet/mathnet-spatial/issues/158, releasing isn't that easy yet.