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

Notification

Icon
Error

Failing to build: The "NullableContextOptions" parameter is not supported by the "Csc" task
AndersBaumann
#1 Posted : Friday, December 20, 2019 5:43:20 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 12/20/2019(UTC)
Posts: 3
Location: Denmark

Was thanked: 1 time(s) in 1 post(s)
After upgrading to VS 2019 16.4.1 NCrunch cannot build a .Net MVC 4.7.2 project. The project builds without issue in VS. The error message is:

..\packages\Microsoft.Net.Compilers.3.1.1\tools\Microsoft.CSharp.Core.targets (100, 10): The "NullableContextOptions" 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.1.1\tools\Microsoft.CSharp.Core.targets (59, 5): The "Csc" task could not be initialized with its input parameters.

Screen shot: https://ibb.co/QFpMg50
Remco
#2 Posted : Friday, December 20, 2019 9:22:36 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.

This looks like a desynchronisation issue between the version of MSBuild being used in your updated version of Visual Studio and the custom version of CSharp being targeted using the Microsoft.Net.Compilers package.

Do you require the use of this package in your code? We have encountered this problem before but couldn't find a way to solve it, as it was caused by incompatibility between the MS components under the hood.
AndersBaumann
#3 Posted : Friday, December 20, 2019 9:45:08 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 12/20/2019(UTC)
Posts: 3
Location: Denmark

Was thanked: 1 time(s) in 1 post(s)
Hi Remco. Thanks for the quick answer. Do you mean the "Microsoft.Net.Compilers.3.1.1" package? I actually don't know if it is required. So you suggest to just remove the reference to this package in the MVC project?
AndersBaumann
#4 Posted : Friday, December 20, 2019 9:58:25 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 12/20/2019(UTC)
Posts: 3
Location: Denmark

Was thanked: 1 time(s) in 1 post(s)
I removed the package "Microsoft.Net.Compilers" from the MVC project and now NCrunch can build the project. It looks like the MVC project works fine without "Microsoft.Net.Compilers" so problem solved. Thanks for your help.
1 user thanked AndersBaumann for this useful post.
Remco on 12/20/2019(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.031 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download