0

My .NET Core was recently upgraded from 3.1.402 to 3.1.403; after this update, when i try to run my project with dotnet run command, i'm receiving this message:

[MSBuild solution compiling events] - Error at file '/usr/share/dotnet/sdk/3.1.403/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets', from project '{my csproj file path}'; error associated with lines 424-0; Sender: MSBuild. Code error: MSB4018; message: 'The "CreateAppHost" task failed unexpectedly. System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.NET.HostModel, Version=3.1.6.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.

I'm using Ubuntu 20.04; before the SDK upgrade the project was working fine. Is it some kind of bug from the new version of the .NET Core SDK?

  • Did you try a clean build? – jdweng Oct 15 '20 at 14:34
  • @jdweng Yes! Even after the "dotnet clean" command the error remains. – rafaatsouza Oct 15 '20 at 14:46
  • Open the csproj file with notepad and check version. Deleting the reference and then add will fix version or editing the csproj file will also work. – jdweng Oct 15 '20 at 14:51
  • @jdweng My csproj file contains only _netcoreapp3.1_, it doesn't have any reference to 3.1.402 or 3.1.403. – rafaatsouza Oct 15 '20 at 14:54
  • Are you using VS 16.7.6? See https://dotnet.microsoft.com/download/dotnet-core/3.1. It was just released on the 13th. See release notes : https://github.com/dotnet/core/blob/master/release-notes/3.1/3.1.9/3.1.9.md – jdweng Oct 15 '20 at 14:59
  • @jdweng I'm not using Visual Studio, i'm not even using Windows OS. Like i said, i'm using Ubuntu 20.04 – rafaatsouza Oct 15 '20 at 15:02
  • See following : https://stackoverflow.com/questions/56616079/how-to-resolve-net-core-package-version-conflicts – jdweng Oct 15 '20 at 15:10

0 Answers0