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

Notification

Icon
Error

Does NCrunch require the x86 platform to be defined for a project?
adrianbanks
#1 Posted : Wednesday, July 11, 2012 1:47:57 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 7/11/2012(UTC)
Posts: 3
Location: Cambridge, UK

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
I have a solution with seven projects. All of the projects work fine with NCrunch except one (which just happens to be set to output as an console application). NCrunch reports:

Quote:

Errors occurred while trying to load the project file:
The OutputPath property is not set for project 'nCrunchTemp_8032772c-1bfd-4d6f-b642-55a0ec21d60a'. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='Debug' Platform='x86'. You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn't exist for this project.

NCrunch: This error is commonly caused by projects that are relying on the selected build configuration provided by Visual Studio in order to set the $(Platform) and $(Configuration) MSBuild properties during a build. Unless configured otherwise, NCrunch will normally use the default $(Configuration) and $(Platform) properties that are specified in a .proj file - thus in order for your project to build with NCrunch it must be possible to build the project using command line MSBuild without needing to manually inject build properties. You will most likely need to edit your .proj file to align its default $(Configuration) and $(Platform) properties with the property groups provided in the file.


This turned out to be due to the fact that the project only had the x64 build platform defined. After adding the x86 build platform, NCrunch works fine with the project. I am however not even building the x86 version at all, just that it needs to be present for NCrunch to work.

Does NCrunch build the x86 version of projects by default, and if so, why do my other projects work fine when they also don't have that build platform defined?

(NCrunch v1.39.0.15b)
Remco
#2 Posted : Thursday, July 12, 2012 5:44:23 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
NCrunch will always use the default platform that is specified in the .proj file (whether this is x86 or x64 totally depends upon how your .proj file is laid out).

Look for a line in your project file that's something similar to the following:

<Platform Condition=" '$(Platform)' == '' ">x64</Platform>

If the project wasn't created with a VS standard template, it's possible that the above line just doesn't exist - in which case I would recommend adding it in order to allow your project to work normally with command-line builds. NCrunch always uses the command-line defaults when building your project, so it's important that you have the defaults specified correctly for normal build behaviour.
1 user thanked Remco for this useful post.
adrianbanks on 7/12/2012(UTC)
adrianbanks
#3 Posted : Thursday, July 12, 2012 9:04:37 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 7/11/2012(UTC)
Posts: 3
Location: Cambridge, UK

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
Ah, ok. The default platform was set to x86. All sorted now thanks.
1 user thanked adrianbanks for this useful post.
Remco on 7/12/2012(UTC)
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.034 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download