Unable to publish build through Visual Studio

Unable to publish Vishual Studio code to Azure, prompting to certificate issue.

Certificate error:

I have tried adding trusted allow trusted hosts in .pubxml file also imported certificate. Still it is not working.

Publishing build requires any additional ports to be allowed for Azure in Zscaler. Kindly suggest me.

I don’t have VS to test with, but this thread from Stack Overflow looks promising

The option to allow untrusted certificates is not yet supported in the current tooling. Hopefully, this gets updated very soon. You can, however, set it manually.

  1. Open the publish profile file ( .pubxml ) inside /Properties/PublishProfiles in a text editor
  2. Inside the <PropertyGroup> element, set AllowUntrustedCertificate to True ( <AllowUntrustedCertificate>True</AllowUntrustedCertificate> ) or add it if it doesn’t exist
  3. Set UsePowerShell to False ( <UsePowerShell>False</UsePowerShell> ).

At this time of writing, the generated powershell script disregards the AllowUntrustedCertificate property which is probably a bug, hence, the need to set it to False .

You can get powershell to work if you update the module version in the .ps1 file.

As a side note, you can also get around this problem by “trusting” the server’s certificate locally.

Hi Scott,

I tired this option from stack overflow site earlier, it is not working. Kindly let me know if you have any other option to import certificate locally.