Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2015 Build errors - The "Csc" task could not be initialized with its input parameters

Visual Studio 2015 Build errors:- The "Csc" task could not be initialized with its input parameters. The "Features" parameter is not supported by the "Csc" task.

Can anyone tell me why I can't build a new empty or otherwise project or build an existing old project without first editing my .csproj file?

In a new project I have found that if I move the 5th line

<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />

up to the 3rd line save, reload and then build all is good.

In old projects I have to add the same line to the same place prior to building.

Once this is done all seam ok from now on!

like image 651
user3484993 Avatar asked Sep 15 '16 08:09

user3484993


2 Answers

I have encountered the same issue. In my case, I got a duplicate Microsoft.CodeDom.Providers.DotNetCompilerPlatform and Microsoft.Net.Compilers in my .csproj. Deleting the duplicate (the lower version) was the solution for me. It was also due to copy-paste of nuget packages from packages.config and re-installing it.

enter image description here

like image 166
Marvin Glenn Lacuna Avatar answered Nov 16 '22 00:11

Marvin Glenn Lacuna


I don't know what the hell was that but after installing:

Install-Package Microsoft.Net.Compilers -Version 2.9.0

Everything start working.

like image 39
Ali Adravi Avatar answered Nov 16 '22 01:11

Ali Adravi