1. 安装 .net framework sdk
小于等于 .net framework 4.5 版本的 .net framework sdk 通过 windows sdk 工具安装
从下面额链接找到对应的windows SDK下载:
http://msdn.microsoft.com/en-us/library/windows/desktop/ff851942.aspx
Win8.1 对应 .NET Framework V4.5.1
Win8 对应 V4.5
2.安装msbuild
安装步骤
3.部署到远程服务器
不用 PublishProfile
"C:Program Files (x86)Microsoft Visual Studio2019BuildToolsMSBuildCurrentBinmsbuild.exe" ./WebApi.csproj /p:Configuration=Release /p:DeployOnBuild=true /p:DeployTarget=MsDeployPublish /p:MsDeployServiceUrl=192.168.xxx.xxx /p:AllowUntrustedCertificate=True /p:MSDeployPublishMethod=WMSvc /p:UserName="xxxxx" /p:Password="xxxxx" /p:DeployIISAppPath="xxxxx" /p:VisualStudioVersion=16.0
用 PublishProfile
"C:Program Files (x86)Microsoft Visual Studio2019BuildToolsMSBuildCurrentBinmsbuild.exe" ./WebApi.csproj /p:Configuration=Release /p:CreatePackageOnPublish=True /p:DeployOnBuild=true /p:PublishProfile=./Properties/PublishProfiles/FolderProfile.pubxml /p:VisualStudioVersion=16.0 /p:Password="xxxxx"
VisualStudioVersion 对应具体的 vs