Last post Feb 05, 2009 01:02 PM by Super_Julius
Feb 04, 2009 10:45 AM|Super_Julius|LINK
We are using WDP to deploy 6 web application projects in our solution (53 projects total in solution).The WDP are configured to build only in certain configurations that are used for both nightly builds and testing deployment.
Originally the WDP were only configured for nightly build, and it was all fine.
Recently, we needed to also automate the deployment to our testing server. I have therefore made a couple of adjustments (add a new configuration to the solution and use some conditions to define the property group to set the variables) and it does work.
However, since then, Visual Studio takes a very long time to load the solution (several minutes, between 3-4 minutes to 10 minutes depending on the developers' machine)
We clearly see in VS status bar that it is the web deployment projects, that takes most of the loading time. Simply removing the web deployment projects from the solution fixes the problem.
Has anyone seen similar issues? Any ideas? If not, could someone tell me if it is possible to use the WDP but not including them in the solution?
Thanks in advance
Feb 04, 2009 12:35 PM|rmaiya|LINK
Are you using VB.NET or C#. If it is VB.NET it makes loading solution slow. I came across similar issue, where we had 73 projects in the same solution. To fix this we came up with 3 solutions
1. Divide the solution into multiple small solutions
2. Give DLL references instead of project references
3. Compile the solution in command prompt using MSBuild instead of VS
after these fixes, our solutions running like a champ. BTW dont forget to install VS 2008 sp1, it has some additional performance fix for VS 2008
Feb 04, 2009 12:53 PM|Super_Julius|LINK
Thank you for reply and for the solution you proposed. All projects are written in C#.
Splitting the solution in several solutions could help but not for sure and it just makes the development more cumbersome, so I would prefer to avoid it for now.
What makes me doubtful is really the fact that the issue started with the changes made to the WDP 3 days ago. Moreover the solution still loads in a reasonable amount of time fast if I exclude the WDP.
Feb 05, 2009 01:02 PM|Super_Julius|LINK
I have found a way to fix the issue, so in case it can be helpful to others. I basically need to automate the publish of the builds to either the development server or the test server.
I have 2 solution configurations, one for each environment.
What I first did was to duplicate the PropertyGroup in which the variables for the environment were set.
<!-- Dev ENV -->
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DevNightlyDeploy|AnyCPU'">
<!-- Test ENV -->
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'TestDeploy|AnyCPU'">
Well, it sounds right to me as this is the model used by WDP itself to setup the build variables too. And it does what it should except that it freezes VS when it loads the solution.
I simply change this to use a Choose element as shown below:
<Choose> <When Condition=" '$(Configuration)'=='DevNightlyDeploy' "> <PropertyGroup> <DeployFolder>\\DEVSERVER\Share\Folder\</DeployFolder> ... </PropertyGroup> </When> <When Condition=" '$(Configuration)'=='TestDeploy' "> <PropertyGroup> <DeployFolder>\\TESTSERVER\Share\Folder\</DeployFolder> ... </PropertyGroup> </When></Choose>
With this change, the solution now loads again as fast as before, even maybe faster ;-)
If anyone has an explanation, I will be interested in hearing.