-
Notifications
You must be signed in to change notification settings - Fork 24
WebPublishMethod = Package doesn't work #22
Comments
Package support may not work well currently, thats why we have not enables it in the publish dialog yet. I can help you with it though. For package you'll need to also add 'DesktopBuildPackageLocation' as a property in the .pubxml. Can you try adding that and publish from vs to see if it works? |
Yeah, I tried that before and I get: We can get around with the current FileSystem publishing for now, but it would be good to get this feature enabled back! Thanks for the quick reply! |
@scabana can you verify that you have the Use Powershell checkbox set to true? There is also a property in the .pubxml |
@sayedihashimi here's the pubxml file's content: <?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit http://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>Package</WebPublishMethod>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish />
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<CompileSource>True</CompileSource>
<UsePowerShell>True</UsePowerShell>
<WebRoot>wwwroot</WebRoot>
<publishUrl>..\..\artifacts\bin\Api\PublishOutput</publishUrl>
<DeleteExistingFiles>True</DeleteExistingFiles>
<DesktopBuildPackageLocation>..\..\artifacts\bin\Api\PublishOutput2</DesktopBuildPackageLocation>
</PropertyGroup>
</Project> I tried removing the Thank you very much for taking the time to take a look into this! |
@scabana try the following instead. <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>FileSystem</WebPublishMethod>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish />
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<CompileSource>False</CompileSource>
<UsePowerShell>True</UsePowerShell>
<WebRoot>wwwroot</WebRoot>
<publishUrl>..\..\artifacts\bin\WebApplication3\Release\PublishOutput</publishUrl>
<DeleteExistingFiles>False</DeleteExistingFiles>
<WebPublishMethodOverride>Package</WebPublishMethodOverride>
<DesktopBuildPackageLocation>..\..\artifacts\bin\Api\PublishOutput2\web.zip</DesktopBuildPackageLocation>
</PropertyGroup>
</Project> |
Nice! The method override worked! Thanks a lot! |
@scabana ok great. One question, did you have any issues publishing the generated web package? We haven't tested that much since the option isn't available yet. |
It doesn't seem to be very happy, tried to deploy with this command line: I also tried:
So, havent, found the right command line to call yet. I'll continue the investigation. |
Try adding -enableLink:contentLibExtension to your second command. |
@sayedihashimi
Now it published, I am getting a 500 internal server error, probably means I'm missing stuff in the .zip file. Hoping it's not an msdeploy problem. I'll continue investigating tomorrow and report back! Thanks for your help! |
@sayedihashimi Everything's working as expected now! |
@scabana that's great to hear! FYI a common reason for 500s is a mismatch in bitness. If you publish 64 bit make sure to configure your app pool as such. Can we close this issue? |
@sayedihashimi |
Sorry about that I didn't notice (was replying on my phone). Yeah, I'm tracking package support. |
I was able to get a vso build to publish an asp.net 5 website with
<WebPublishMethod>FileSystem</WebPublishMethod>
. Which is a good start. I tried getting<WebPublishMethod>Package</WebPublishMethod>
to work but it doesn't seem to be picked up.If I use
<WebPublishMethod>MSDeploy</WebPublishMethod>
, I would need to provide for which exact website (url, publish url) you want to deploy which is not so nice if you want to have multiple environments.My goal is to get a zip file and a cmd (or ps1) file to deploy my website using web deploy. That cmd (or ps1) file would accept arguments such as url, publish url, username, pw and so on so that we can deploy to different environments without the need to recompile.
I might be looking in the wrong direction, if I am, I would be happy to change the way we're doing things.
The text was updated successfully, but these errors were encountered: