Is there a way to create a NuGet package where when the package is installed into a project it adds references to the dlls with “Copy Local” set to false?
I assume it would be some kind of script within the ‘install.ps1’ file.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes you can do this with install.ps1, as you guessed.
Here’s an example install.ps1 that will flip the flag on System.dll every time you run it. You should be able to get an idea how to do what you want using this example:
But this MSDN documentation should help.
ObjectHanselman uses resolves to the VSProject Interface.$projectvariable NuGet gives you resolves to the Project Interface.