문제

My code is as follows:

...

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 is set to false. However, it does not raise any error to the logger. And the project is not deployed.

I'm running my exe in Administrator mode.

Any help is apprecited.

Thanks

Chris hint: CSAutoParameterize.parameters and other subfolders have not been created.

도움이 되었습니까?

해결책

      <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>

I was able to add this target to the project and call just that specific target.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top