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

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

Closed
cdrnet opened this issue Nov 18, 2018 · 9 comments
Assignees

Comments

@cdrnet
Copy link
Member

cdrnet commented Nov 18, 2018

Looks like a packaging issue.

@JohanLarsson
Copy link
Member

Paket has excludedGroups

Add:

excludedgroups
  build
  Analyzers

To paket.template

@cdrnet
Copy link
Member Author

cdrnet commented Nov 18, 2018

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
Copy link
Member

I never figured out how to exclude using dotnet pack

@cdrnet
Copy link
Member Author

cdrnet commented Nov 18, 2018

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
Copy link
Member

Nice if standard tooling can be used of course.

@Jones-Adam
Copy link
Contributor

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
Copy link

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

@cdrnet cdrnet closed this as completed in dfae4bd Nov 22, 2018
@ugumba
Copy link

ugumba commented Dec 18, 2018

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
Copy link

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 #158, releasing isn't that easy yet.

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

No branches or pull requests

5 participants