I'm starting deployment of my web application and I need to guarantee that all the assemblies that are going to be deployed were built using Release configuration. Our system was developed using C#/.Net 3.5.
Is there any way to achieve this?
I'm starting deployment of my web application and I need to guarantee that all the assemblies that are going to be deployed were built using Release configuration. Our system was developed using C#/.Net 3.5.
Is there any way to achieve this?
The internet is a great resource that is under used by lots of StackOverflow members.
Check this
http://stevesmithblog.com/blog/determine-whether-an-assembly-was-compiled-in-debug-mode/
Don't deploy to production via Visual Studio. Look into Continuous Integration and scripted builds (such as with NAnt).
I loved that David suggestion, but you could also go this way (AssemblyInfo.cs
):
#if DEBUG
[assembly: AssemblyDescription("Your application assembly (DEBUG version)")]
#else if RELEASE
[assembly: AssemblyDescription("Your application assembly (RELEASE version)")]
#endif
This is more human friendly, as anyone can right-click that assembly, to select Properties
and go to Details
tab.