Search

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

Closed
as Deferred Help for as Deferred

9
0
Sign in
to vote
Type: Bug
ID: 641913
Opened: 2/8/2011 6:24:13 AM
Access Restriction: Public
3
Workaround(s)
7
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.



Details (expand)

Visual Studio/Silverlight/Tooling version

Windows Azure Tools for Visual Studio

What category (if any) best represents this feedback?

Compatibility

Steps to reproduce

Make sure your package is created without encryption

-Create a azure project A with one webrole with a webapplication webforms project called webapp1.
-Create a webapplication project called webapp2.
-Configure you serviceDefinition.csdef file like:
<Sites>
     <Site name="Web" physicalDirectory="..\webapp1\">    
        <VirtualApplication name="webapp2" physicalDirectory="..\webapp2\" />
        <Bindings>
         <Binding name="HttpIn" endpointName="HttpIn" hostHeader="webapp1.cloudapp.net" />
        </Bindings>
     </Site>
</Sites>


        
1. Add the following setting in web.config of webapp2:
     <appSettings>
         <add key="original_key" value="original_value"/>
        </appSettings>
2. In Web.Release.config, add:

     <appSettings xdt:Transform="Replace">
        <add key="transformed_key" value="transformed_value"/>
     </appSettings>

3. Change the configuration to Release for the projects in the solution.

4. Publish the cloud service project, create service package only.
5. Unpack the package and unzip the *.cssx
6. find the approot\_WASR_\1 folder

Product Language

English

Operating System

Windows 7

Operating System Language

English

Actual results

Folders isn't published properly it contains all development files like aspx.cs files and the xmltransformations are still in the obj\release\TransformWebConfig\transformed folder

Expected results

All development files are removed and xmltransformation files are properly placed in the root of the folder
File Attachments
0 attachments
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 Sassatokiero 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.