Daily Usage Issues

Console runner does not ignore database project

Started by Nid_fr on 6,202 views

Hi,

I'm getting build errors on our database projects when running the console runner. Since they don't show up in the NCrunch configuration like other projects I can't fix the build errors, and I can't ignore them. Is there any way to avoid trying to build them when using the console runner ?

Cheers,

J.
Hi, thanks for sharing this issue.

The console runner loads projects straight off disk, where the VS extension will load projects out of the IDE's memory. It looks like the VS integration is managing to filter out the database projects, but the console runner won't know the difference until it tries to load them (and fails as you've described).

I'll need to have a look at how this can be resolved in the NCrunch code.

Meanwhile, a simple workaround is to manually create an NCrunch configuration file for each database project. If the configuration file has the 'IgnoreThisComponentCompletely' property set to 'true', the console runner won't try the load the project.

Just create a projectname.ncrunchproject file next to each of your database projects. Inside this file, add the following content:

<ProjectConfiguration>
<IgnoreThisComponentCompletely>true</IgnoreThisComponentCompletely>
</ProjectConfiguration>

Make sure the files are checked into your VCS. When the console tool next runs, it will then know to ignore the DB projects.
Thanks, that did the trick !

Post a reply

Log in to reply.