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

Notification

Icon
Error

Every time I open my solution NCrunch shows the First-run wizard
yworksjr
#1 Posted : Monday, January 12, 2015 8:50:17 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/12/2015(UTC)
Posts: 6
Location: Germany

Was thanked: 1 time(s) in 1 post(s)
This is perhaps similar to this post, but the <AutoEnableOnStartup> element doesn't even exist in my .ncrunchsolution, nor is the file read-only.

If I manually add the element to the .ncrunchsolution file, then start VS again, it will happily overwrite the settings file again without that line, leaving me with the same behaviour again.
Remco
#2 Posted : Monday, January 12, 2015 9:42:31 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
Hi, thanks for sharing this issue.

Looking at the way the auto-enable system is designed, it looks as though the information in the referenced forum post is out of date. The AutoEnable setting has been moved into the .ncrunchsolution.user file, which is a binary file. Is it safe to assume that you have this file locked/read-only and NCrunch is therefore unable to update it? If you check out the file before you close the solution or shut down VS, NCrunch will save the setting and should auto-enable as designed.

I'm also posting something in the other thread to avoid misleading other people. Sorry about this.
yworksjr
#3 Posted : Monday, January 12, 2015 10:30:22 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/12/2015(UTC)
Posts: 6
Location: Germany

Was thanked: 1 time(s) in 1 post(s)
The file is not locked or read-only, nor is it checked into source control. If I move the file away and let NCrunch re-create it on VS shutdown (with NCrunch being enabled upon shutdown), I get a binary-identical .user file and the same behaviour when I start VS again.
Remco
#4 Posted : Monday, January 12, 2015 11:18:52 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
Can you confirm which version of NCrunch you are running?
Remco
#5 Posted : Monday, January 12, 2015 11:29:39 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
Sorry, I just re-read your post and realised that I've managed to get my wires crossed - the issue you're experiencing is not that NCrunch isn't auto-enabling, it's that you always get the wizard ...

The wizard has nothing to do with the auto-enable feature. It's controlled very differently.

There are two mechanisms underlying this feature, storing state in two different places. One is inside the .ncrunchsolution file, in the form of the 'FileVersion' property. Where the FileVersion does not match a value of '1', NCrunch will run the wizard with questions specific to the solution itself.

The second mechanism is in your global configuration file, under your user profile.. i.e.: C:\Users\Remco\AppData\Roaming\NCrunch\globalconfig.crunch.xml .. This also contains a FileVersion, which on the latest version of NCrunch will need to have a value of '2'. If this isn't the case, the wizard will be run with questions specific to your global configuration (i.e. CPU config etc).

Note that after NCrunch has saved configuration to both of the above two files, it will update the FileVersion properties accordingly and you shouldn't see the wizard again.

Considering that you've already checked over the .ncrunchsolution file thoroughly, I wonder if it's the global config file giving you trouble. If NCrunch isn't able to write to this file, you'll probably see this issue. You may also see this issue if you're running two very different versions of NCrunch in different versions of Visual Studio. For example, if you are running NCrunch v1.48 on VS2010 and NCrunch v2.11 on VS2013. The config file is shared between versions of NCrunch in a way that would probably cause these two versions to fight over the FileVersion property.
yworksjr
#6 Posted : Monday, January 12, 2015 2:15:34 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/12/2015(UTC)
Posts: 6
Location: Germany

Was thanked: 1 time(s) in 1 post(s)
.ncrunchsolution has FileVersion=1, globalconfig.crunch.xml has FileVersion=2.

I seem to get a shorter wizard that just covers how many cores I want to use, which might be just the solution configuration wizard. When explicitly selecting NCrunch > Run Configuration Wizard I get a longer one that asks me a lot of other things as well (e.g. whether to run tests in parallel, etc.).

The global config is also not read-only. The only thing I managed to see right now is that you write integers with the user's current locale, which in my case (for i18n bug testing) uses a proper Unicode minus sign instead of the ASCII hyphen-minus. Reverting that to hyphen-minus and letting NCrunch write a new global config apparently fixes the issue. If I were to guess you write the values with the current culture, but try to read them using the invariant culture, which raises and exception, which is swallowed and interpreted as »config not present«.

Confusingly, a few settings are retained as they should be. If what I wrote above is indeed the reason, then some settings are read from the config, perhaps up to the first setting that won't parse correctly.
Remco
#7 Posted : Monday, January 12, 2015 9:47:41 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
yworksjr;6748 wrote:
.ncrunchsolution has FileVersion=1, globalconfig.crunch.xml has FileVersion=2.

The global config is also not read-only. The only thing I managed to see right now is that you write integers with the user's current locale, which in my case (for i18n bug testing) uses a proper Unicode minus sign instead of the ASCII hyphen-minus. Reverting that to hyphen-minus and letting NCrunch write a new global config apparently fixes the issue. If I were to guess you write the values with the current culture, but try to read them using the invariant culture, which raises and exception, which is swallowed and interpreted as »config not present«.



Great catch. This could well be what is causing the problem. Would you be able to try submitting a bug report after NCrunch has failed to read your configuration? The report may contain error information I can use to zero in on the problem. Also - can you confirm the language code of your current culture? I may be able to use this to reproduce+fix.


Thanks!

Remco
yworksjr
#8 Posted : Tuesday, January 13, 2015 8:36:20 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/12/2015(UTC)
Posts: 6
Location: Germany

Was thanked: 1 time(s) in 1 post(s)
I've sent a bug report (with a working locale and properly-read config, though). The relevant change seemed to be that I had U+2212 as my minus sign. The base culture should probably not matter in this case, but was de-DE.
1 user thanked yworksjr for this useful post.
Remco on 1/13/2015(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.053 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download