-
Asp.Net Core 2.1 Web程序
- 安装适配的dotnet sdk 应用程序。dotnet-sdk-2.1.200-win-x64.exe
- 在命令行编译:
pushd C:\Program Files\dotnet dotnet publish --framework netcoreapp2.1 --runtime win-x64 --self-contained true -c release -o "C:\TestwebsiteApi" "D:\JenkinsData\workspace\compiletestWebsite\xxxxxx.Api.csproj"编译完成,在c盘可以找到编译完成的目标文件
-
nuget.exe restore 包文件管理还原
- 下载NUGET.EXE,利用nuget.exe提供的功能来还原包文件
-
pushd D:\tool nuget.exe restore "D:\JenkinsData\workspace\compilexxx.Api.sln" -ConfigFile "C:\Users\Administrator\AppData\Roaming\NuGet\NuGet.Config" -NoCache完事。
-
相应的config文件形如:
<packageSources> <add key="NuGet 官方程序包源" value="https://nuget.org/api/v2/" /> <add key="Ji Package source" value="http://192.168.208.99/nuget/" /> </packageSources>配置可以从vs获得。
-
.net framwork 4.5 API 编译
-
pushd C:\Program Files (x86)\MSBuild\14.0\Bin msbuild "D:\JenkinsData\workspace\compilexxxxxkApi.csproj" /t:rebuild /p:TargetFrameworkVersion=v4.5;Configuration=Release;DebugType=none完事,在相应bin里面找文件
-
-
website 编译
pushd C:\Program Files (x86)\MSBuild\14.0\Bin msbuild "D:\JenkinsData\workspace\compileYQ4.5project\Media.Net.Web\Media.Net.Web.csproj" /t:ResolveReferences;Compile /t:_CopyWebApplication /p:Configuration=Release;DebugType=none /property:TargetFrameworkVersion=v4.5 /p:WebProjectOutputDir=C:\publish45 /p:OutputPath=C:\publish45\bin
Jenkins VISUAL STUDIO 项目API/ WEBSITE 编译部署中遇到的一些坑
最新推荐文章于 2022-07-19 11:08:43 发布
博客介绍了Asp.Net Core 2.1 Web程序的编译过程,包括安装适配的dotnet sdk应用程序,在命令行进行编译,使用nuget.exe还原包文件,还提及了.net framwork 4.5 API编译及website编译,最后可在相应位置找到编译完成的文件。
1567

被折叠的 条评论
为什么被折叠?



