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

Notification

Icon
Error

Custom configuration with preprocessor directives fails to build
cadbooster
#1 Posted : Tuesday, September 16, 2025 2:15:08 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 10/20/2021(UTC)
Posts: 4
Location: Netherlands

We have a solution with three configurations: Debug, Release, NoLicense. NoLicense is a release build with all licensing code removed using preprocessor directives.

This License class is completely disabled:



NCrunch works fine when the project is in Debug or Release, but fails to build in NoLicense. The project builds fine in Visual Studio. Any idea on how to fix this or where to look?

Remco
#3 Posted : Wednesday, September 17, 2025 12:18:06 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 996 times
Was thanked: 1340 time(s) in 1243 post(s)
Hi, thanks for posting.

When you switch between build configurations, how are you handling this in NCrunch? Do you use the 'Use Build Configuration' setting? Note that NCrunch doesn't track the selected build configuration in the IDE - it will always use the project's default configuration.
cadbooster
#4 Posted : Wednesday, September 17, 2025 8:14:49 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 10/20/2021(UTC)
Posts: 4
Location: Netherlands

Hi Remco,

In the NCrunch Configuation, "Use build configuration" is set to empty. In the project file, we start with Debug. I believe the first one is the default?

<Configurations>Debug;Release;NoLicense</Configurations>

NCrunch gives these errors when we switch Visual Studio to the NoLicense configuration.
Users browsing this topic
Guest (4)
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.022 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download