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



New csproj format with TargetFrameworks & one target causes NCrunch to fail to build
#1 Posted : Tuesday, May 16, 2017 1:02:05 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 3/16/2017(UTC)
Posts: 6
Location: United Kingdom

Thanks: 1 times
Was thanked: 4 time(s) in 2 post(s)
If I create a project with the following in the csproj file:
<Project Sdk="Microsoft.NET.Sdk">



the NCrunch fails to build the project, complaining:
System.Exception: An exception was thrown in the remote environment: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> nCrunch.Common.UserException: Errors occurred while trying to load the project file:
The target "_SplitProjectReferencesByFileExistence" does not exist in the project...

Changing "<TargetFrameworks>" to "<TargetFramework>" fixes the problem. As the latter is a better choice of tag, this is a minor issue. But I thought I'd report it as it took me a fair amount of time to work out why it wasn't building and could catch someone else out too.
#2 Posted : Tuesday, May 16, 2017 10:05:27 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 5,178

Thanks: 687 times
Was thanked: 827 time(s) in 787 post(s)
Hi, thanks for sharing this problem.

Yes, unfortunately this gives a terrible error message. VS actually used to give the same message, but MS have fixed this now. There is a fix pending for this in the next version of NCrunch. Apologies if this has resulted in wasted time.
1 user thanked Remco for this useful post.
DavidArnoDandG on 5/17/2017(UTC)
Users browsing this topic
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.027 seconds.