Different results compiling same solution with msbuild
-
Thursday, August 09, 2012 7:55 PM
I am trying to resolve some speed issues when compiling a c# solution in Visual Studio 2010. Another programmer has the same laptop as me and his build time is less than half of mine. I created a msbuild batch file to capture the results of compiling the same solution. We both ran the batch file and compared results. I would have thought they would have been very similar. But not so much. Here is a sample of what the batch file contained:
"%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe" "c:\source\MySolution.sln" /p:"Platform=Any CPU" /p:Configuration=Debug /t:rebuild /maxcpucount:20 /l:FileLogger,Microsoft.Build;logfile="c:\source\build.log"
My output log contained many parameters that didn't show up in his log file.
/main
/out:obj\Debug\myprogam.exe,
/references: - would think these would all match but not. I have a reference in there for System.Data.OracleClient.dll and know I don't use. He had some references but nearly as many.
/resource:obj\Debug\ - lists what looks like every resource in the application. He had some references but no nearly as many.
/target:winexe - his has /target:exe
/utf8output - mine has this - his doesn't
/win32manifest: = list what looks like every single .cs and .designer.cs file in the application. This parameter is 36133 characters long.
In total the csc.exe is being passed over 80,000 characters worth of parameters. Seems excessive to me.
So my question is where is the difference in settings that causes the building of a solution to be so different?
We are both using Microsoft Visual Studio 2010 v10.0.40219.1 SP 1Rel.
Thanks
All Replies
-
Friday, August 10, 2012 6:54 AMModerator
Hi g.dellinger,
From your issue, I couldn't find the difference.
You can export the settings of your Visual Stuio and compare it with his to find the difference.
The steps how to export settings are following below:
Tools->Import and Export settings.
Best regards,
Ego [MSFT]
MSDN Community Support | Feedback to us
-
Friday, August 10, 2012 2:27 PM
Is it possible to just import his settings? I'm trying it now. Not Responding for the past 5 minutes. Several minutes later it finally loaded. Didn't seem to help.
Another difference we noticed was that I had .NET 4.5 installed. I had forgot I installed the beta of VS11 along with 4.5. I had uninstalled the VS11 a while back. I uninstalled the 4.5 a few hours ago and wasn't able to open VS 2010 afterwards. Reinstalled 4.0 and was able to reopen again.
I also renamed my source folder and did a get latest from TFS just in case.
Still takes at least 2 minutes to build the same solution. :(
Machine.config? repair VS install? I'll figure out sooner or later.
- Edited by g.dellinger Friday, August 10, 2012 6:39 PM
-
Wednesday, August 15, 2012 9:14 AMModerator
Hi g.dellinger,
Here are some ways you can try:
1. If we disable Add-ins (e.g. “Tools” | “Add-in Manager”) and run “devenv.exe /safemode”, do we still have the problem? This can eliminate the possibility that third party Add-ins are causing problems.
2. If we use “devenv.exe /resetsettings”, does it solve the problem? It restores Visual Studio default settings.
3. If we use Visual Studio Setup Wizard (via Control Panel) to repair Visual Studio. It can restore the Visual Studio Installation into its original state.
Best regards,
Ego [MSFT]
MSDN Community Support | Feedback to us
- Marked As Answer by Ego JiangMicrosoft Contingent Staff, Moderator Tuesday, August 21, 2012 9:35 AM
-
Tuesday, August 21, 2012 9:35 AMModerator
Hi g.dellinger,
I marked my reply as answer.
Please unmark it, if you feel it is useful to you.
Thank you for your understanding and support.
Best regards,
Ego [MSFT]
MSDN Community Support | Feedback to us

