I am trying to set up a project and unit test it with xUnit, coding in C#. I followed the steps in this guide https://xunit.github.io/docs/getting-started-dotnet-core.html But I had an error "The specified framework version '2.0' could not be parsed The specified framework 'Microsoft.NETCore.App', version '2.0' was not found. - Check application dependencies and target a framework version installed at: / - Alternatively, install the framework version '2.0'."
To fix this, I tried specifying the runtimeframeworkversion to 2.1.0 as dotnet --version 2.1.200
I now get an error that is unable to find Unable to find package Microsoft.NETCore.App with version (>= 2.1.0) despite what is returned by dotnet --version.
Any help would be apprciated thanks.
My current proj file:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<RuntimeFrameworkVersion>2.1.0</RuntimeFrameworkVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="xunit" Version="2.3.1"/>
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1"/>
</ItemGroup>
</Project>
I am also running OSX High Sierra
dotnet --version
at Terminal? Don't use "RuntimeFrameworkVersion" unless you know what you are doing. – Lex Li