Jeremy
Jeremy

Reputation: 1168

Setting a C# project to always compile in Release mode and vice versa

How do I set a single C# project to always build in either Release or Debug mode regardless of the solution target mode?

Upvotes: 1

Views: 1200

Answers (2)

Yuriy Faktorovich
Yuriy Faktorovich

Reputation: 68717

Inside the Build Options, make the settings the same for Debug and Release. Specifically in Debug uncheck "Define DEBUG constant" and check "Optimize code"

Upvotes: 0

Michael Petrotta
Michael Petrotta

Reputation: 60952

Right-click on the solution in the solution explorer. Select "Configuration Manager". Here, you can specify the project configurations used when the solution config is in 'Debug' or 'Release'.

Upvotes: 6

Related Questions