I'm trying to verify I am building in release mode, but nothing seems to work
C:\Code>ncrunch .\My.sln -Configuration Release
ERROR: Configuration setting 'Configuration' was not found
C:\Code>ncrunch .\My.sln -UseBuildConfiguration Release
ERROR: Project-level configuration setting 'UseBuildConfiguration' cannot be overridden using the command line
Thanks for sharing this. I've just checked the handling here, and it looks like I designed the configuration override system to deliberately fail for all project-level settings.
I don't completely remember why it's been done this way. It seems like it would be useful to be able to override these. Perhaps there is a reason for it. I'll take a look at it in more detail and will get back to you. Assuming it's possible to fix it, this does mean that a fix would need to be in the next minor version.
To work around this, it should still be possible to hand in a configuration file that specifies the UseBuildConfiguration setting as a global default, though this will only work if no projects in the solution have specific values declared for UseBuildConfiguration.
We're moving to using the console tool to do our CI testing and ran into this as well. We would like to ensure we're building in release configuration for CI but use the default elsewhere. We could (and may) use the workaround you mentioned but it seems odd that this isn't supported. Did you ever look into this in more detail?
ljohnston wrote:We're moving to using the console tool to do our CI testing and ran into this as well. We would like to ensure we're building in release configuration for CI but use the default elsewhere. We could (and may) use the workaround you mentioned but it seems odd that this isn't supported. Did you ever look into this in more detail?
Hi, sorry, it looks like this one fell off my radar somehow. I've made a note to try and get it included in the next release. For the time being, I recommend using the config files.