Msbuild Project.Build不适用于DeployOnBuild=true
我的代码如下:Msbuild Project.Build不适用于DeployOnBuild=true,msbuild,microsoft.build,Msbuild,Microsoft.build,我的代码如下: ... propertyGroup1.AddProperty("DeployOnBuild", "true"); propertyGroup1.AddProperty("DeployTarget", "MSDeployPublish"); propertyGroup1.AddProperty("MSDeployServiceUrl", "localhost"); propertyGroup1.AddProperty("DeployIisAppPath", "local.proj
...
propertyGroup1.AddProperty("DeployOnBuild", "true");
propertyGroup1.AddProperty("DeployTarget", "MSDeployPublish");
propertyGroup1.AddProperty("MSDeployServiceUrl", "localhost");
propertyGroup1.AddProperty("DeployIisAppPath", "local.projects.com");
propertyGroup1.AddProperty("MSDeployPublishMethod", "InProc");
propertyGroup1.AddProperty("AllowUntrustedCertificate", "true");
...
cSharpProject.ProjectCollection.RegisterLogger(cSharpLogger);
try {
buildResult = cSharpProject.Build();
...
buildResult
设置为false
。但是,它不会给记录器带来任何错误。并且该项目未部署
我正在管理员模式下运行我的exe
感谢您的帮助
谢谢
克里斯
提示:csautoparametrize。尚未创建参数和其他子文件夹。
<Target Name="WebPublish">
<MsBuild Projects="MyProject.csproj" Properties="DeployOnBuild=true;DeployTarget=MSDeployPublish;MSDeployServiceUrl=localhost;DeployIisAppPath=local.website.com;MSDeployPublishMethod=RemoteAgent;AllowUntrustedCertificate=true;Username=someuser;password=somepassword" />
</Target>
我能够将此目标添加到项目中,并仅调用该特定目标。
我能够将这个目标添加到项目中,并只调用那个特定的目标