Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Targeting an IIS site breaks 'publish on build' #51

Open
muso31 opened this issue Mar 5, 2019 · 4 comments
Open

Targeting an IIS site breaks 'publish on build' #51

muso31 opened this issue Mar 5, 2019 · 4 comments

Comments

@muso31
Copy link

muso31 commented Mar 5, 2019

If the PublishUrl is set to an IIS site url then the publish on build feature does not work.

@muso31
Copy link
Author

muso31 commented Mar 8, 2019

Possible PEBCAK, the Release profile may have been selected and there's a condition on EnableAutoPublish for Debug only. Investigating...

@muso31
Copy link
Author

muso31 commented Mar 8, 2019

Ok this is an issue. The error is below:

Error This specific WebPublishMethod(FileSystem) is not yet supported on msbuild command line. Please use Visual Studio to publish.

@richardszalay
Copy link
Owner

I'm starting to look into this now and I don't actually think the FileSystem publish actually supports URLS.

In Microsoft.Web.Publishing.Deploy.FileSystem.targets, you can see this:

<PropertyGroup>
  <_HttpHeader>http://</_HttpHeader>
  <_DoWebFileSystemPublish Condition="'$(PublishUrl)'!='' And '$(PublishUrl.StartsWith($(_HttpHeader),  StringComparison.OrdinalIgnoreCase))' == 'False' And '$([System.IO.Path]::GetFullPath($(PublishUrl)))' != ''">True</_DoWebFileSystemPublish>
</PropertyGroup>

Which seems to indicate that it requires that PublishUrl is actually a path. You could use a regular (non-FileSystem) publish profile, but you'd have to fix the autopublish to work with it and also you'd lose any HPP features that rely on knowing the target directory (remove additional, skipping unchanged transforms).

@muso31
Copy link
Author

muso31 commented Mar 11, 2019

When setting up a publish profile in visual studio if I click the '...' next to 'Target location' one option is to select 'Local IIS' where we can target an IIS site, I think all's this does is set the PublishUrl to a Url rather than a Path, and it still uses a FileSystem publish type. Does this suggest that FileSystem publish supports Urls, or am I missing something? Unless it converts the url to a path under the hood?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants