The “GenerateDepsFile” task failed unexpectedly

前端 未结 7 976
梦如初夏
梦如初夏 2021-01-17 07:43

I tried to compile my new application in MonoDevelop and I got this error:

/usr/share/dotnet/sdk/2.2.203/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.

相关标签:
7条回答
  • 2021-01-17 08:08

    Your combination of Mono MSBuild and .NET Core SDK is incompatible because they use different versions of the internal NuGet library. To resolve this problem, you can:

    • Downgrade .NET Core SDK to 2.1.5xx or 2.2.1xx (for example, 2.1.505 or 2.2.108)
    • Upgrade Mono to 6.0

    You can find a detailed explanation of this problem and possible solutions here: https://rider-support.jetbrains.com/hc/en-us/articles/360004180039

    0 讨论(0)
  • 2021-01-17 08:13

    I had this error happen and the slove for me was correcting the Package version number in .csproj file .

       <Version>2.0.7.</Version> <!--casued the error-->
    
       <Version>2.0.7</Version> <!--this fixed the error-->
    

    Removing the trailing '.' fixed this for me.

    0 讨论(0)
  • 2021-01-17 08:15

    This appears to be a known issue.

    The only fix at this stage seems to be to downgrade to .NET Core v2.2.105.

    To downgrade:

    • Uninstall the latest .NET Core version (v2.2.2+).
    • Download and install v2.2.105.
    0 讨论(0)
  • 2021-01-17 08:18

    I had the same problem using .Net Standard 2.1, and I solved it for myself by cleaning the solution and then rebuilding it.

    0 讨论(0)
  • 2021-01-17 08:21

    Change the name of the file. For instance, Add prefix _ or #; so, it cannot be used.

    Restart Visual Studio, then try to build. If still problem is there, needs to restart the machine.

    0 讨论(0)
  • 2021-01-17 08:22

    I had .net standard project built on .net standard 2.0. Yesterday I updated my Visual Studio 2019 to 16.3.0 to leverage .Net Core 3.0. But all of sudden build of project targeting on standard 2.0 started throwing "GenerateDepsFile" task failed unexpectedly error.

    I was able to resolve this issue by changing the target framework to 2.1.

    0 讨论(0)
提交回复
热议问题