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

Is there a possibility to automatically add file references from a NuGet v3 package to .csproj file? #3691

Closed
WimBoom opened this issue Oct 19, 2016 · 2 comments
Labels
Resolution:Question This issues appears to be a question, not a product defect

Comments

@WimBoom
Copy link

WimBoom commented Oct 19, 2016

We like to move from NuGet v2 (packages.config) to NuGet v3 (project.json). But after a investigation we have a showstopper. We use a template NuGet package (on our own private NuGet feed). This template NuGet package is installed one time on setup of the project (will never be updated in the project, and we make project specific changes on the template NuGet files after install of the package). With NuGet v3 the files (.pp, *.cshtml,.js,.css, *.jpg,.less) in the NuGet package are not added as a reference in the .csproj file.

Is there a possibility to automatically add file references from a NuGet v3 package to .csproj file? Or maybe in the future? With other NuGet v3 packages it is a good idea that the files not included are in the .csproj file (to prevent merge conflict by update of the NuGet package).

@yishaigalatzer yishaigalatzer added the Resolution:Question This issues appears to be a question, not a product defect label Oct 19, 2016
@yishaigalatzer
Copy link

if the files are never changed you can do that. You need to put the files in the contentfiles section instead of content.

At the moment these files do not show up in the tree (but are included), we are working on making them visible in the next version of visual studio. #3683 will resolve this issue going forward.

Here is a blog discussing this issue:
http://blog.nuget.org/20160126/nuget-contentFiles-demystified.html

@karann-msft I can't find a good document on the docs site pointing to content files at the moment. Can you point to one?

@WimBoom feel free to continue the discussion here, I'm closing because I don't think there is any actual further work other than the already tracked item. I can always be wrong, so feel free to keep the discussion flowing.

CC @rrelyea

@WimBoom
Copy link
Author

WimBoom commented Oct 19, 2016

Yes, no problem to close. I had already read http://blog.nuget.org/20160126/nuget-contentFiles-demystified.html and made a ContentFilesExample NuGet. Thanks for the update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution:Question This issues appears to be a question, not a product defect
Projects
None yet
Development

No branches or pull requests

2 participants