SUMMARY: How to compile in Release mode…I cannot get it to “take” what I want to do.
I have a webservice project in VS2005 C# that I am trying to optimize. One of the things I’ve had my awareness raised on is the recommendation to compile in Release mode. I am not sure what to expect here but here is what I am seeing:
I rightmouse on the project and choose Properties and then the Build tab
I click the Configuration dropdown box, set to RELEASE and notice that Output Path is \bin
I click REBUILD on the project and the DLL goes into the \bin\debug folder (not \bin)!
Here is a snippet pasted from the output window on that compile (note it shows the configuration as “Debug Any CPU” and later /define:DEBUG;TRACE):
------ Rebuild All started: Project: TRIMBrokerService, Configuration: Debug Any CPU ------ C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Csc.exe /noconfig /nowarn:1701,1702 /errorreport:prompt /warn:4 /define:DEBUG;TRACE /reference:"C:\Program Files\Microsoft WSE\v3.0\Microsoft.Web.Services3.dll" /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Configuration.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.EnterpriseServices.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Web.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Web.Mobile.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Web.Services.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /reference:..\TRIMBrokerUtilities\TRIMBrokerUtil\bin\Debug\TRIMBrokerUtil.dll /debug+ /debug:full /optimize- /out:obj\Debug\TRIMBrokerService.dll /target:library FaultCode.cs FileService.asmx.cs Properties\AssemblyInfo.cs Properties\Settings.Designer.cs Settings.cs "Web References\ASMXwsTrim\Reference.cs" Compile complete -- 0 errors, 0 warnings TRIMBrokerService -> C:\Documents and Settings\johna\My Documents\Visual Studio 2005\Projects\WSE\TRIMBrokerPassingByteArray\TRIMBroker\TRIMBrokerService\bin\debug\TRIMBrokerService.dll ========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
I’ve noticed that I can interact with the Build tab dialog and when I change the Configuration dropdown list box to Active(Debug) or just Debug then the Output Path changes to \bin\debug as one would expect but I cannot seem to get it to compile in Release mode. Is there a trick? I dread having to read up on the MSBuild documentation just to deploy my little web service as I think it is way more than I need at this point.
Right-click on your solution and choose
Configuration Manager..Make sure “Active solution configuration” is set toRelease. Then make sure the project(s) in the grid below are set to use theReleaseconfiguration.Perhaps something was changed accidentally..