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

Fake.DotNet.NuGet needs to support ContentFiles section in nuspec #2144

Closed
chappoo opened this issue Oct 11, 2018 · 3 comments · Fixed by #2165
Closed

Fake.DotNet.NuGet needs to support ContentFiles section in nuspec #2144

chappoo opened this issue Oct 11, 2018 · 3 comments · Fixed by #2165

Comments

@chappoo
Copy link
Contributor

chappoo commented Oct 11, 2018

Description

Currently the Fake.DotNet.NuGet module does not support interpolation of the ContentFiles section, which means delivery of content files will not work correctly for .NET Core. This is documented here:

https://blog.nuget.org/20160126/nuget-contentFiles-demystified.html

Expected behavior

Definition of the ContentFiles element should be possible via NuGet.NuGetParams to inject the desired files elements.

Actual behavior

Not possible to define.

Known workarounds

Currently I'm hardcoding the element in nuspecs which are duplicated for the different use-cases, which isn't going to work long-term.

Related information

  • Windows / MacOS / Linux
  • master
  • .NET Runtime, CoreCLR or Mono Version
  • Fake.DotNet.NuGet 5.8.5

Comments

I'm just reporting this error with the intention of providing a pull request, but I have to prioritise the work against other things, which will likely mean a week or two before that's possible. If anyone else picks this up, great, but I'm intending on contributing 👍

@matthid
Copy link
Member

matthid commented Oct 13, 2018

I always thought most people would switch to 'dotnet pack' and remove nuspec files. But yeah PR is appreciated :)

@chappoo
Copy link
Contributor Author

chappoo commented Oct 22, 2018

Using dotnet pack is desirable, but there's no real support for content only packages at the moment. dotnet pack requires an MSBuild project (csproj etc), which then leads to clunky NoBuild=true-type settings and an requirement to do a dotnet restore (ref: NuGet/Home#4254).

At least, that's what I believe to be the case having looked into it. Very plausible I could be mistaken...

@matthid
Copy link
Member

matthid commented Oct 22, 2018

Using dotnet pack is desirable, but there's no real support for content only packages at the moment.

I think there is (maybe /cc @enricosada)
But indeed it's probably a bit of playing around with msbuild to get it to do what you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants