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

Notification

Icon
Error

Nothing being written to 'Project config file storage path'
VNicholson
#1 Posted : Tuesday, November 29, 2016 9:20:55 PM(UTC)
Rank: Member

Groups: Registered
Joined: 12/19/2013(UTC)
Posts: 25
Location: New Zealand

Thanks: 7 times
Was thanked: 3 time(s) in 3 post(s)
Hi,

I'm trying to use the new v3 'Project config file storage path' feature to save NCrunch configuration to a folder outside of the source directory. I've set the appropriate configuration and have checked the .v3.ncrunchsolution file and confirmed the ProjectConfigStoragePathRelativeToSolutionDir element is set appropriately. My changes are still being saved to the .v3.ncrunchproject files in source folder beside the project however.

My expectation is that the .v3.ncrunchproject files are moved/saved to the new path I specify but that doesn't appear to be happening. Is there a trick to getting this feature to work or am I misunderstanding how it's supposed to work?

I'm using Visual Studio 2015 on Windows 10. My configuration path is absolute and is on a different drive to the source e.g. C:\Source\MyProject.csproj with configuration in D:\Configuration\NCrunch\Blah.

EDIT: Further to this, it looks like the configuration user interface is getting confused about what configuration it's using. I have multiple branches that contain the same solution and structure e.g. a master branch and a release/tag branch; the configuration user interface appears to be showing me the configuration for my solution in the master branch even when the release/tag branch solution is open in Visual Studio (it's as if NCrunch is caching the configuration of the solution I opened first (master) and not invalidating it when I open the release/tag branch). This only appears to affect the user interface though; the underlying Engine appears to be using the correct configuration (I have a number of project exclusions and additional files configured in master - when I open the release/tag solution (where I don't have the same configuration), the UI shows me the master configuration but the NCrunch engine fails to build the solution).
Remco
#2 Posted : Tuesday, November 29, 2016 10:35:54 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)
Hi,

Thanks for sharing these issues. This is quite a complex configuration setting in regards to solution switching, so I guess it isn't a huge surprise that something found a way to go wrong here.

If I understand what you've described, it feels like there are two problems here:

- When changing the setting, it didn't appear to take effect immediately and it didn't move the configuration files
- When switching solutions, the UI is using settings from the previously open solution

I'm wondering if we could delve a bit deeper on these two issues so that I can reproduce them in order to fix them. Have I understood these problems correctly? Are you able to give me any clear steps to reproduce either of these on a dummy solution? I'm hoping that we aren't dealing with any erratic race conditions here.
VNicholson
#3 Posted : Tuesday, November 29, 2016 10:52:07 PM(UTC)
Rank: Member

Groups: Registered
Joined: 12/19/2013(UTC)
Posts: 25
Location: New Zealand

Thanks: 7 times
Was thanked: 3 time(s) in 3 post(s)
Yes, I guess it is two separate issues. Your description of both issues is accurate (let me know if you want me to split them into separate posts).

Regarding the solution switching configuration UI issue, I managed to reproduce this quite easily:

* I created a new Class Library project in C:\A\ClassLibrary1.csproj and added NUnit via Nuget and an empty test fixture and test method
* I configured the project with 'Additional files to include' and just pointed it at my Nuget package.config
* Everything built and NCrunch detected the test and executed it.
* I copied the .sln, .csproj, .cs, .config and Properties folder to C:\B (no NCrunch files were copied)
* I closed ClassLibrary1.csproj from C:\A and opened the identical one from C:\B
* I enabled NCrunch and when I went to configure it, my additional file was already there in the configuration UI (the UI shows it despite the relevant configuration not being present in the .v3.ncrunchproject).

Regarding the 'Project config file storage page'. It doesn't seem to matter what I set it to, nothing ever gets written to the path. The files always get written beside the project files.
Remco
#4 Posted : Wednesday, November 30, 2016 2:00:27 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)
Thanks for these extra details! I've managed to reproduce the 'Project config file storage path' issue. It looks like this doesn't support absolute file paths like it's supposed to. I'll have a fix for this available soon.

I'm also investigating the other issue and will update you soon.
Remco
#5 Posted : Wednesday, November 30, 2016 3:01: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)
I've managed to reproduce the UI settings issue. It looks like this issue has quite a narrow scope - you did well finding it.

Basically, the UI isn't clearing out the stored settings for projects when the solution is closed. This causes the settings to transfer over to the new solution, which in this case happens to have projects of the same name under the same relative path as the last solution. Because there are no settings for these projects in the new solution, they just inherit the ones already present in the UI.

I'm expecting to have a fix out for both of these issues in 3.1. I'd prefer to hold this release for a day or so just to make sure nothing else needs to be included in the build. Everything tends to go a bit crazy around big releases and I'm sure people will find other problems.
1 user thanked Remco for this useful post.
VNicholson on 11/30/2016(UTC)
VNicholson
#6 Posted : Wednesday, November 30, 2016 3:10:11 AM(UTC)
Rank: Member

Groups: Registered
Joined: 12/19/2013(UTC)
Posts: 25
Location: New Zealand

Thanks: 7 times
Was thanked: 3 time(s) in 3 post(s)
No problem, I'll keep an eye out for the next release.
Remco
#7 Posted : Thursday, December 1, 2016 11:48:22 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)
v3.1 is now available - https://www.ncrunch.net/download.
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.046 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download