使用TeamCity创建web应用程序nuget包的方法是什么?
在.NET成为一种东西之后,我完全迷惑了。我尝试做的是创建一个包含.Net Framework4.8Web应用程序的nuget包。
以前的工作方式似乎已经过时或被弃用了。在TeamCity中,以前使用的元运行器要么被弃用,要么运行得不是很好。
当我在谷歌f.ex的时候。msbuild https://docs.microsoft.com/en-us/nuget/create-packages/creating-a-package-msbuild我得到了关于.Net核心和.Net标准的东西,没有关于.Net框架的东西。而且这些东西通常都有10年甚至更久的历史了。
在nuget在.NET中的工作方式之后,我可能会变得愚蠢,因为一切都与项目绑定在一起,实际上可以避免web应用程序附带的代码( cs文件)。
发布于 2021-02-05 01:21:22
到目前为止,我得到的最接近的方法是创建一个全面的.nuspec文件,然后在项目构建完成并具有所有必要的依赖项后,在web应用程序的项目目录中运行。
但是,构建输出将记录警告:
WARNING: NU5100: The assembly 'bin\Antlr3.Runtime.dll' is not inside the 'lib' folder and hence it won't be added as a reference when the package is installed into a project. Move it into the 'lib' folder if it needs to be referenced.
nuget pack命令
nuget pack <path to nuspec file>
nuspec文件:
<?xml version="1.0" encoding="utf-8"?>
<package>
<metadata>
<id>MyPackageId</id>
<version>1.0.0.0</version>
<title>My application title</title>
<authors>my authors</authors>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Some description</description>
<releaseNotes>Summary of changes made in this release of the package.
</releaseNotes>
<copyright>My copyright</copyright>
<tags>framework application</tags>
</metadata>
<files>
<file src="bin\**\*.*" target="bin"/>
<file src="Content\**\*.*" target="Content"/>
<file src="Resources\**\*.*" target="Resources" exclude="**\*.cs"/>
<file src="Scripts\**\*.*" target="Scripts" />
<file src="Views\**\*.*" target="Views" />
<file src ="favicon.ico" target=""/>
<file src ="Global.asax" target=""/>
<file src ="Log4Net.config" target=""/>
<file src ="StrongNameKeyFile.snk" target=""/>
<file src ="Web.config" target=""/>
</files>
</package>
相当全面的..。
https://stackoverflow.com/questions/66048245
复制相似问题