Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Configuration/UseBuildConfiguration not supported by console tool?
GreenMoose
#1 Posted : Tuesday, May 09, 2017 5:38:24 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 6/17/2012(UTC)
Posts: 312

Thanks: 48 times
Was thanked: 33 time(s) in 32 post(s)
[NCrunch Console Tool v3.6.0.2]

I'm trying to verify I am building in release mode, but nothing seems to work
Quote:

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



Am I missing something?

Thanks.
Remco
#2 Posted : Tuesday, May 09, 2017 11:28:03 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 4,815

Thanks: 639 times
Was thanked: 744 time(s) in 709 post(s)
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.
1 user thanked Remco for this useful post.
GreenMoose on 5/10/2017(UTC)
ljohnston
#3 Posted : Monday, September 11, 2017 8:48:26 PM(UTC)
Rank: Member

Groups: Registered
Joined: 1/17/2014(UTC)
Posts: 20

Thanks: 7 times
Was thanked: 4 time(s) in 4 post(s)
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?
Remco
#4 Posted : Tuesday, September 12, 2017 12:54:11 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 4,815

Thanks: 639 times
Was thanked: 744 time(s) in 709 post(s)
ljohnston;11189 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.
1 user thanked Remco for this useful post.
ljohnston on 9/12/2017(UTC)
GreenMoose
#5 Posted : Tuesday, September 12, 2017 4:13:14 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 6/17/2012(UTC)
Posts: 312

Thanks: 48 times
Was thanked: 33 time(s) in 32 post(s)
Setting Configuration environment variable to Release for the console tool runner process should also work I believe.
1 user thanked GreenMoose for this useful post.
ljohnston on 9/12/2017(UTC)
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.032 seconds.