1

Within Visual Studio, I use Web Deploy.

Within the settings, it asks for 4 fields to be filled one (and 1 optional)

enter image description here

I am guessing, behind the scenes, it is calling msdeploy.exe and passing them as command line arguments

I'm struggling to map these across as I want to use

shell: cmd  
run: '"C:/Program Files (x86)/IIS/Microsoft Web Deploy V3/msdeploy.exe" 
      -verb:sync 
      -allowUntrusted 
      -source:contentPath="%CD%\myDomain.Ui\bin\Release\netcoreapp3.1\" 
      -dest:contentPath=domain,computerName="<server>:443/msdeploy.axd?site=<site name>",username="<user name>",password="<password>",authtype="Basic"'

As you can see, source:contentPath uses the actual path and this works fine in GitHub actions. I'm having issues with the dest: part. In the example above, I've used the titles (so instead of myUserName, I've used as it shows in the screenshot)

I have 2 questions.

  1. When I click "publish" within Visual Studio, if it really is just calling msdeploy.exe, then is it possible to show this in the output. If I knew how to do that, I may be able to answer my own question

  2. Have I mapped them correctly

MyDaftQuestions
  • 4,487
  • 17
  • 63
  • 120

1 Answers1

0

As for how to see more details, this KIND OF works: Visual studio 2017 Verbose publish

The relevant part is

To change the amount of information included in the build log On the menu bar, choose Tools, Options.

On the Projects and Solutions page, choose the Build and Run page.

In the MSBuild project build output verbosity list, choose one of the following values, and then choose the OK button.

And then, at the very end of the build, search for MsDeploySourceProviderSetting

You can then see the details! This gives some of the values, but not all!! It doesn't really answer the question! However, it got me part way there

It needed to be

-dest:contentPath=<site name>,computerName="<server>:443/msdeploy.axd?site=<site name>",username="<user name>",password="<password>",authtype="Basic"'

EG, my website ULR is https://example.com and in IIS, it is set up as MyWebsite

-dest:contentPath=<MyWebsite>,computerName="https://examplecom:443/msdeploy.axd?site=MyWebsite",username="<user name>",password="<password>",authtype="Basic"'

Also, if you do use VS as I did, it may give you a different port, so be aware that 443 may not be right!!

MyDaftQuestions
  • 4,487
  • 17
  • 63
  • 120