Question

I'm creating a nuget package from a class library project I made with Visual Studio 2013. My project has the following file structure:

enter image description here

I generated the nuspec file and left it pretty much unchanged. If I understood the NuGet docs correctly, 'nuget pack Infrastructure.csproj' should result in a package with the following structure:

enter image description here

Only it doesn't. I get this:

enter image description here

If I install this package, test.js doesn't end up in '~/Scripts/Infrastructure/test.js' but in '~/Content/Scripts/Infrastructure/test.js'. What could I be doing wrong? And is there a way to configure this behaviour in the nuspec file?

Was it helpful?

Solution

All you need to do is eliminate your Content folder, in other words put the Scripts folder in the root of the source project.

Doing this will cause the Scripts folder to be installed into the root of the project in which you're installing the Nuget package.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top