I'm currently trying to get a netcore application running in debian. But as soon as I run a dotnet restore
I get an error. To check if dotnet was alright, I created a new project with dotnet new
. A restore there works fine. But as soon as I add the reference to
System.Diagnostics.FileVersionInfo
, I get the following error:
/opt/dotnet/sdk/1.0.3/NuGet.targets(97,5): error : Object reference not set to an instance of an object. [/root/test/test.csproj]
The original project was developed in Windows, using Visual Studio 2017. If I do a dotnet restore
there, it works fine. even if I do a dotnet restore -r debian.8-x64
.
Does anyone know what's going wrong here?
The test.csproj
I created for testing purposes and which also fails looks like this:
<PropertyGroup>
<TargetFramework>netcoreapp1.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore" Version="1.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.2" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.1.1" />
<PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="1.1.0" />
<PackageReference Include="System.Diagnostics.FileVersionInfo" Version="4.3.0" />
</ItemGroup>
</Project>