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

Notification

Icon
Error

xunit issue
MatthewSteeples
#1 Posted : Monday, August 5, 2019 9:40:10 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 10/28/2014(UTC)
Posts: 130
Location: United Kingdom

Thanks: 7 times
Was thanked: 18 time(s) in 16 post(s)
First thing this morning one of our developers was unable to get the project to build via NCrunch with the following error message:

Quote:
..\..\packages\Microsoft.Net.Compilers.3.2.0\tools\Microsoft.CSharp.Core.targets (100, 10): The "Nullable" parameter is not supported by the "Csc" task. Verify the parameter exists on the task, and it is a settable public instance property.
..\..\packages\Microsoft.Net.Compilers.3.2.0\tools\Microsoft.CSharp.Core.targets (59, 5): The "Csc" task could not be initialized with its input parameters.


Having read the release notes, and noting that 3.29 fixed some compiler issues he upgraded, but now receives this error

We don't use xunit in our project at all, all of our tests are MSTest. xunit isn't installed, or even referenced from within our project, and we have it disabled under the "Test Frameworks" section of the config
Remco
#2 Posted : Monday, August 5, 2019 11:22:51 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 930 times
Was thanked: 1257 time(s) in 1170 post(s)
Hi, thanks for sharing this issue.

Sorry, I wasn't able to access the error message you've linked to above .. it seems my account lacks the credentials to access this area.

The main thing we changed in this area with 3.29 was to identify when the Microsoft.Net.Compilers Nuget package is being included in the project and to provide a warning message about compatibility problems. A recent version of this Nuget package seems to have changed the interface for the CSC MSBuild task, causing it to break when the task and the compiler fall out of alignment. We rely on MSBuild to load the correct version of the CSC task for the included compiler, but for some reason when we interact with the MSBuild API this doesn't happen. In short, the Nuget package causes a component built by MS to fall out of alignment with another component built by MS, and since we interact with these components through a third component built by MS, we have no clear way to troubleshoot or resolve the issue.

So the solution for now is simply to warn people that we do not support the C# compiler redirection hook provided by the Microsoft.Net.Compilers package. We recommend avoiding the use of this package under NCrunch as right now we cannot find a way to make it work reliably.
MatthewSteeples
#3 Posted : Monday, August 5, 2019 1:11:31 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 10/28/2014(UTC)
Posts: 130
Location: United Kingdom

Thanks: 7 times
Was thanked: 18 time(s) in 16 post(s)
Not sure what I did wrong with the first url. Try this one - https://ledgerscope-my.s...43DaJXsyr5aJBA?e=jhrRw0

We've since updated VS to 16.2 and it appears to be working fine now, so it's no longer an issue but may help someone else if they get stuck
Remco
#4 Posted : Tuesday, August 6, 2019 12:16:59 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 930 times
Was thanked: 1257 time(s) in 1170 post(s)
Thanks! That new link worked fine for me. The error you're seeing is a red herring. When NCrunch initialises, it will try to restore any packages that it requires for normal operation. At this point in the boostrap, it doesn't yet know that you aren't using xunit, so it tries to restore these libraries anyway. Because you're not using them, you shouldn't experience any downstream issues. Usually this problem is caused by a connectivity issue related to firewalls or network issues between NCrunch and the Nuget server. If you create an xunit project using Visual Studio (just a dummy throw-away one), VS will then restore these packages itself and NCrunch won't do this again.

I'm glad the update to VS 16.2 solved the issue for you. Our assessment of the issue is that it appears when both the compiler package and VS are both of specific misaligned versions. So you've just re-aligned your toolset and now all should be well.
MatthewSteeples
#5 Posted : Tuesday, August 6, 2019 3:24:05 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 10/28/2014(UTC)
Posts: 130
Location: United Kingdom

Thanks: 7 times
Was thanked: 18 time(s) in 16 post(s)
Thanks for the thorough explanation. We try to keep our platforms aligned but some developers are a bit more lax at running updates than others, and being a remote team I can't stand over their shoulders to make sure it's done :P
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.041 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download