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

VS2017 nuget pack issue #255

Closed
tofutim opened this issue Jun 8, 2017 · 2 comments
Closed

VS2017 nuget pack issue #255

tofutim opened this issue Jun 8, 2017 · 2 comments

Comments

@tofutim
Copy link

tofutim commented Jun 8, 2017

I am using Fody PropertyChanged 2.1.1. Adding PropertyChanged should not add Fody PropertyChanged to the nuget requirements of a nupkg. When I 'pack' using VS2017, I end up with

<dependencies>
  <group targetFramework=".NETStandard1.3">
    <dependency id="PCLStorage" version="1.0.2" exclude="Build,Analyzers" />
    <dependency id="PCLSpecialFolder" version="1.1.0" exclude="Build,Analyzers" />
    **<dependency id="PropertyChanged.Fody" version="2.1.1" exclude="Build,Analyzers" />**
    <dependency id="NETStandard.Library" version="1.6.1" exclude="Build,Analyzers" />
    <dependency id="Microsoft.AspNet.SignalR.Client" version="2.2.2" exclude="Build,Analyzers" />
  </group>
</dependencies>

I also use GitVersionTask, which does not show up. So there may be a special flag that needs to be added so that it does not get sucked into the nuspec.

This may help: GitTools/GitVersion#1188 - I think somehow the solution is getting PrivateAssets = true per NuGet/Home#4125 - thread discusses how developmentDependency should automatically set this to true, but then it doesn't.

@bording
Copy link

bording commented Jun 8, 2017

You can just manually add PrivateAssets = "All" to your package references that need them. Take a look at https://docs.microsoft.com/en-us/dotnet/core/tools/csproj and https://docs.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files for more information.

@SimonCropp
Copy link
Member

Also the package is marked as a development dependency. It is a bug that the new csproj system doesn't respect that NuGet/Home#4125

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

3 participants