NuGet package DLL package + data files = crash?

I created the nuget package. I put several files and folders in the "content" folder and it worked perfectly. So I added the bin folder with dll and put it in my nuspec file:

<files> src="bin\*.dll" target="lib" /> </files> 

dlls fit well in the link, but the content is no longer copied.

How do I make them work?

@Edit

I know it:

 <file src="content\Controllers\*.*" target="Controllers" /> <file src="content\Views\Account\*.*" target = "Views\Account" /> <file src="bin\*.dll" target="lib" /> 

The package contains the correct structure and files, but the files are not copied to my project.

Files are in the folder structure. When I put them directly in the content folder, they are copied to the root of my project ...

+6
source share
1 answer

When you define a file section in nuspec, we no longer make the creation of an "automatic" / "convention" package. We see this as you tell us what to include, so we donโ€™t include things that are not on the list. Just add the content folder to this list and it will work.

Edit to add comments from the responderโ€™s comment below

In the "files" section of the NuSpec file, NuGet is reported where to put the files in the package not in sln / proj when it is unpacked. you want to write it like this:

 <file src="content\Controllers*.*" target="content\Controllers" /> <file src="content\Views\Account*.*" target = "content\Views\Account" /> <file src="bin*.dll" target="lib" /> 
+12
source

Source: https://habr.com/ru/post/887389/


All Articles