[Question] <Optimize> default for pdbonly/Release configuration builds?
See original GitHub issueIs <Optimize>
enabled by default when building with Release
configuration or is it even coupled to pdbonly
?
In a quick experiment a couple of weeks ago I compared hashes of an assembly with an without <Optimize>
set to true and they were identical.
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
Should I compile release builds with debug info as "full" or " ...
I would build with pdb-only . ... There is a separate /optimize flag which dictates whether the compiler should perform optimizations.
Read more >C# Compiler Options that control code generation
The Optimize option is enabled by default for a Release build configuration. It is off by default for a Debug build configuration.
Read more >Setting up build configuration in .NET | Andrey Akinshin
You get two default build configurations: Debug and Release, when creating a new project in Visual Studio. And it's enough for most small ......
Read more >Set debug and release configurations in Visual Studio
In Solution Explorer, right-click the project and choose Properties. In the side pane, choose Build > General. In the Optimize code section, ...
Read more >Do PDB Files Affect Performance?
The company I work for is pushing pack against building release mode binaries with debug information generated, one of the reasons I signed...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Nope in .NET Framework you need to fully specify most everything and nothing is implicit. Given the following project file:
This is what gets passed to the commandline on debug
This is what gets passed to the commandline on release
Can you give an example of your project file?
/optimize+
is passed to the compiler on release builds by default.In a new .NET Core project these are the relevant options that are passed to csc.exe for debug and release:
default debug build on .NET Core
default release build on .NET Core