Home Dashboard Directory Help

Visual studio Azure tools sdk 1.3 not packaging multiple sites correctly by Hans ter Wal


 as Deferred Help for as Deferred

Sign in
to vote
Type: Bug
ID: 641913
Opened: 2/8/2011 6:24:13 AM
Access Restriction: Public
User(s) can reproduce this bug


When building a solution with two webapplications configured in one webrole only one site gets packaged correctly. The other one gets build but all clean-up assosiated with a webapplication such a the*.cs and *csproj removal, copying webtransformation files, removing obj/ folder isn't applied.

Sign in to post a comment.
Posted by alexey_b on 11/8/2012 at 6:47 AM
October 2012 SDK: there's still no convinient way to package multiple web projects in a single web role.
Posted by daysleeper55 on 11/7/2012 at 12:48 AM
And it's is still present even in 1.8
Posted by Rossano Vitulli on 8/1/2012 at 6:49 AM
This bug is still present even in 1.7
Posted by Marco Sikkens on 11/29/2011 at 3:03 AM
This bug still present in 1.6
Posted by Microsoft on 7/13/2011 at 4:18 PM
Thank you for your feedback and the bug report. We will consider improving the user experiences in our future releases. Thanks again.
Posted by Joe__123 on 3/19/2011 at 12:01 AM
Applies to 1.4 SDK as well.
Posted by Microsoft on 2/8/2011 at 6:58 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.
Posted by alexey_b on 11/11/2012 at 2:07 AM
Joe's solution generally works fine. But sometimes there are file lock issues occur during the build in VS 2012.
So it's better to put the script in Pre-Build Event of Azure project.

For each web project add the following line to Azure Project -> Properties -> Build Events -> Pre-build event command line:
$(MSBuildBinPath)\msbuild.exe "$(ProjectDir)..\WebProject1\WebProject1.csproj" /T:PipelinePreDeployCopyAllFilesToOneFolder /P:Configuration=$(ConfigurationName);PreBuildEvent="";PostBuildEvent="";PackageAsSingleFile=false;_PackageTempDir="$(ProjectDir)\bin\$(ConfigurationName)\Sites\WebProject1"
Posted by Joe__123 on 3/19/2011 at 12:00 AM
To automate: add this Post Build Event to each website project, replacing "AzureProjectFolder" with your Azure project's folder. Then right-click the Azure project, select Project Dependencies, and place a check next to each website project.

%WinDir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe "$(ProjectPath)" /T:PipelinePreDeployCopyAllFilesToOneFolder /P:Configuration=$(ConfigurationName);PreBuildEvent="";PostBuildEvent="";PackageAsSingleFile=false;_PackageTempDir="$(ProjectDir)..\AzureProjectFolder\Sites\$(ProjectName)"
Posted by Joe__123 on 3/18/2011 at 4:49 AM
Publish each web application to a location on your local file system. Then in serviceDefinition.csdef, point your Site tag's physicalDirectory property to that location.

This introduces a lot of extra work and opportunities for mistakes though, especially in a team environment where multiple people may be publishing a cloud service project containing multiple sites.