简体   繁体   English

AzureDevops Nuget 包

[英]AzureDevops Nuget Pack

I have a .net class library project (4.7.2) which will be built on an AzureDevops instance.我有一个 .net class 库项目(4.7.2),它将构建在 AzureDevops 实例上。 In the build pipeline one step is to create a nuget package based on the corresponding *.csproj file.在构建管道中,第一步是基于相应的 *.csproj 文件创建 nuget package。 Within the class library project there are folders.在 class 库项目中有文件夹。 Now when the nuget package is created the nuget package also contains the folders of the project and not only the created *.dll file. 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?如何避免在创建的 Nuget package 中包含项目的文件夹?

To explicitly control which files are included in a package, you can specify files tag in.nuspec fule.要明确控制 package 中包含哪些文件,您可以在.nuspec 文件中指定文件标记。

<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 在这里查看更多信息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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