質問

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