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

Notification

Icon
Error

Unloaded Projects
wilhelmmedetz
#1 Posted : Wednesday, March 24, 2021 4:38:53 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 7/4/2012(UTC)
Posts: 33

Was thanked: 2 time(s) in 2 post(s)
Hi,

I just noticed that NCrunch now responds to 'Unload Project' in Visual Studio (16.9.2) and also unloads components.

This would be quite helpful, especially when refactoring large solutions, that temporarily result in partially uncompilable projects.
The extension https://marketplace.visu...reduckted.ProjectFilter makes loading and unloading projects quite easy.

A problem occurs, when the solution is stored and reopened, VS does not load the previously unloaded projects, while NCrunch reloads all components (including the previously unloaded components). Is there any way to fix this?

Regards

Wilhelm
Remco
#2 Posted : Wednesday, March 24, 2021 11:12:42 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 829 times
Was thanked: 1108 time(s) in 1049 post(s)
Hi Wilhelm,

Thanks for posting.

The unloading of projects in VS isn't a feature that we can properly support, because we need to have all projects in the dependency tree loaded to be able to construct a runtime environment. NCrunch can't produce results if a critical project is unloaded, which unfortunately negates the value of any such feature.

Presently, it is possible to make NCrunch temporarily unload a project if this project sits at the top of the dependency tree (i.e. a test project). As you've discovered, this is done by telling VS to unload the project after everything is initialised.

As you've also described, when the IDE is reloaded with the project still in its unloaded state, NCrunch will just load the project anyway regardless ... so the status isn't remembered across the reload. The reason for this has to do with the way the project system works inside VS. Currently, we don't have a way to reliably tell the difference between a project that is locked in an unloaded state and a project that simply hasn't been loaded yet by the IDE. It's possible that some way to do this exists, but it would require time and research, and maybe nasty integration hacks. Given that we can't support the feature for anything other than top level projects anyway, this does not seem worth pursuing. I would suggest just using the 'Ignore this component completely' setting instead.
wilhelmmedetz
#3 Posted : Thursday, March 25, 2021 6:56:28 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 7/4/2012(UTC)
Posts: 33

Was thanked: 2 time(s) in 2 post(s)
Hi Remco,

thanks for the explanation.
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.043 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download