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

Notification

Icon
Error

I want to set "Ignore this component completely" = true for a "SQL Server Database Project"
jacksonakj
#1 Posted : Monday, December 21, 2015 4:10:33 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 12/21/2015(UTC)
Posts: 1
Location: United States of America

I have a SQL Server Database Project in my solution and would like to set "Ignore this component completely" = true, because NCrunch fails to build this project and it's not a project that needs testing. When I pull up the NCrunch configuration I only see the namespaces of the projects and the SQL Server Database Project is not in the list. How can I configure NChrunch to ignore the SQL Server Database Project?

I am using:

NCrunch for Visiual Studio 2013
2.17.0.16
kkallberg
#2 Posted : Monday, December 21, 2015 5:30:20 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 12/4/2012(UTC)
Posts: 6
Location: United States of America

I am experiencing this issue as well. It only seemed to start having a problem with my database project after I installed the latest 2.19 update.
kkallberg
#3 Posted : Monday, December 21, 2015 7:20:24 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 12/4/2012(UTC)
Posts: 6
Location: United States of America

I found that I could work around this issue by manually editing the .ncrunchproject file. However, it would be more intuitive to be able to set this option in the Configuration window.
Remco
#4 Posted : Monday, December 21, 2015 10:40:25 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Thanks for sharing this problem. I've just done some testing around it, and this is the behaviour I'm observing:

- The first time a database project is added to a solution, NCrunch will detect the new project and attempt to build it. It will also be in the configuration window.
- If a solution is opened with an existing database project added, NCrunch will ignore the project entirely. It will not be built and will not be represented in the configuration window.

The above inconsistency is a regression caused in 2.19 under the attempt to provide better handling for unsupported project types. The correct behaviour should be that the database project is never loaded and built by the engine.

I'm wondering if this matches the behaviour you're seeing. If not, are there any angles that I've missed here? I'm hoping to fully understand the whole problem before fixing :)
kkallberg
#5 Posted : Monday, December 21, 2015 11:32:51 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 12/4/2012(UTC)
Posts: 6
Location: United States of America

Hey Remco,

Thanks for taking a look at this. It sounds like my situation is slightly different. I have a solution with an existing database project in it, but instead of ignoring it entirely, it is absent from the Configuration window, but the test runner is attempting to build it.

Quote:

NCrunch: If you are experiencing problems in getting this project to build, have a look at http://www.ncrunch.net/d...ng_project-build-issues
Script.PostDeployment.sql (0, 0): A fatal parser error occurred: Could not find file 'C:\Users\Kevin\AppData\Local\NCrunch\10480\12\MyProject.Database\Script.PostDeployment.sql'..


Although the Configuration window does not list my database project, if I manually edit the .ncrunchproject file for the database project (setting IgnoreThisComponentCompletely to "true"), the test runner will ignore the project as expected and function normally.

I am using version 2.19.0.4 on Visual Studio Professional 2013.
Remco
#6 Posted : Monday, December 21, 2015 11:37:46 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Approximately how large is your solution, and what is your normal startup time? (i.e. in seconds, minutes with NCrunch enabled).

Also, do you have any projects that are referencing the database project?
kkallberg
#7 Posted : Tuesday, December 22, 2015 4:23:16 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 12/4/2012(UTC)
Posts: 6
Location: United States of America

Sorry for the delay.

I am seeing this issue in a couple different solutions.

1. 42 Projects - Startup time is approximately 20 seconds.
2. 63 Projects - Startup time is approximately 32 seconds.

The database projects are not referenced by any other project in either solution.
Remco
#8 Posted : Tuesday, December 22, 2015 9:22:05 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Thanks. Do you see this in a new, blank solution with a single database project?

For some reason, it seems that the IDE isn't reporting the database project in the same way that it is for me. This is a rather troubling inconsistency.
kkallberg
#9 Posted : Tuesday, December 22, 2015 10:05:57 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 12/4/2012(UTC)
Posts: 6
Location: United States of America

After a closer look it appears I was incorrect. In each solution there IS a reference to the database project. Sorry for the confusion.

Also, creating a new blank solution, adding a single database project to it and then enabling NCrunch results in the Tests window reporting "No supported projects detected." I believe this is the desired result.
Remco
#10 Posted : Wednesday, December 23, 2015 12:31:40 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
kkallberg;8168 wrote:
After a closer look it appears I was incorrect. In each solution there IS a reference to the database project. Sorry for the confusion.


Excellent. We've cornered every angle on this then. NCrunch is loading the project because it considers it to be a dependency, so the main issue is that it's refusing to show in the config window. I think I can improve on this. Thanks for letting me know about it.

The workaround as you've already discovered is simply to edit the .ncrunchproject file manually using a text editor. If the .ncrunchproject file doesn't exist, you can just copy it over from one of the other projects in your solution and edit it manually.
sjkirk
#11 Posted : Wednesday, December 23, 2015 1:59:21 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 12/23/2015(UTC)
Posts: 9
Location: United Kingdom

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
You can also see this problem with Xamarin projects. If you clone the repository at https://github.com/Perspex/Perspex you will see that ncrunch issues a warning about iOS/Android projects not being loaded and suggests using the NCrunch 'Ignore this component completely' configuration setting, but this is not possible as the projects aren't shown in the configuration dialog.
Remco
#12 Posted : Wednesday, December 23, 2015 9:44:11 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
sjkirk;8170 wrote:
You can also see this problem with Xamarin projects. If you clone the repository at https://github.com/Perspex/Perspex you will see that ncrunch issues a warning about iOS/Android projects not being loaded and suggests using the NCrunch 'Ignore this component completely' configuration setting, but this is not possible as the projects aren't shown in the configuration dialog.


Thanks for sharing this. Yes - I expect that this problem will appear for every unsupported project type. The same workaround mentioned in this thread should apply here as well.
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.072 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download