简体   繁体   中英

AzureDevops Nuget Pack

I have a .net class library project (4.7.2) which will be built on an AzureDevops instance. In the build pipeline one step is to create a nuget package based on the corresponding *.csproj file. Within the class library project there are folders. Now when the nuget package is created the nuget package also contains the folders of the project and not only the created *.dll file. How can I avoid having the folders of the project in the created Nuget package?

To explicitly control which files are included in a package, you can specify files tag in.nuspec fule.

<files>
    <file src="bin\Debug\*.dll" target="lib" />
    <file src="bin\Debug\*.pdb" target="lib" />
    <file src="tools\**\*.*" exclude="**\*.log" />
</files>

Check here for more information

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM