Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TargetFrameworkVersion 'v4.5.1' not supported by this toolset (ToolsVersion: 4.0)

When trying to open a console project using .NET 4.5.1 in Visual Studio Code on Linux Mint using Mono version 4.0.2 the following warning(s) are shown in the Output Window:

/home/freeman/Projects/SleepyThread/SleepyThread/SleepyThread.csproj: warning : Project has unknown ToolsVersion '14.0'. Using the default tools version '4.0' instead.

/home/freeman/Projects/SleepyThread/SleepyThread/SleepyThread.csproj (default targets) -> [WARNING:OmniSharp.MSBuild.MSBuildProjectSystem] TargetFrameworkVersion 'v4.5.1' not supported by this toolset (ToolsVersion: 4.0). /home/freeman/Projects/SleepyThread/SleepyThread/SleepyThread.csproj /usr/lib/mono/4.5/Microsoft.Common.targets(0,0): Warning: TargetFrameworkVersion 'v4.5.1' not supported by this toolset (ToolsVersion: 4.0).

dnvm list output:

  • 1.0.0-beta5 mono ~/.dnx/runtimes default

Regarding the close vote: I forgot to ask the actual question but I thought it is pretty obvious that the question is how to fix the warning(s).

like image 765
Răzvan Flavius Panda Avatar asked Jul 22 '15 22:07

Răzvan Flavius Panda


1 Answers

Changing the ToolsVersion to 4.0 in the *.csproj file removes the warning:

Project has unknown ToolsVersion '14.0'

Downgrading the project settings from .NET 4.5.1 to .NET 4.5 removes the warning:

TargetFrameworkVersion 'v4.5.1' not supported by this toolset ToolsVersion: 4.0
like image 59
Răzvan Flavius Panda Avatar answered Sep 24 '22 19:09

Răzvan Flavius Panda