question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

build error on net471 and startup crash on netcoreapp2.0

See original GitHub issue

distribution: ubuntu 18.04 LTS

I’m using VScode. When selecting osu! (Debug, net471) I get this build error:

/usr/share/dotnet/sdk/2.1.105/Sdks/Microsoft.NET.Sdk/build/Microsoft.PackageDependencyResolution.targets(167,5): error : Assets file '/home/lastexceed/dev/osu/osu-framework/osu.Framework/obj/project.assets.json' doesn't have a target for '.NETFramework,Version=v4.7.1'. Ensure that restore has run and that you have included 'net471' in the TargetFrameworks for your project. [/home/lastexceed/dev/osu/osu-framework/osu.Framework/osu.Framework.csproj]
/usr/share/dotnet/sdk/2.1.105/Sdks/Microsoft.NET.Sdk/build/Microsoft.PackageDependencyResolution.targets(167,5): error : Assets file '/home/lastexceed/dev/osu/osu-resources/osu.Game.Resources/obj/project.assets.json' doesn't have a target for '.NETFramework,Version=v4.7.1'. Ensure that restore has run and that you have included 'net471' in the TargetFrameworks for your project. [/home/lastexceed/dev/osu/osu-resources/osu.Game.Resources/osu.Game.Resources.csproj]
/usr/share/dotnet/sdk/2.1.105/Sdks/Microsoft.NET.Sdk/build/Microsoft.PackageDependencyResolution.targets(167,5): error : Assets file '/home/lastexceed/dev/osu/osu.Game.Rulesets.Osu/obj/project.assets.json' doesn't have a target for '.NETFramework,Version=v4.7.1'. Ensure that restore has run and that you have included 'net471' in the TargetFrameworks for your project. [/home/lastexceed/dev/osu/osu.Game.Rulesets.Osu/osu.Game.Rulesets.Osu.csproj]
/usr/share/dotnet/sdk/2.1.105/Sdks/Microsoft.NET.Sdk/build/Microsoft.PackageDependencyResolution.targets(167,5): error : Assets file '/home/lastexceed/dev/osu/osu.Game.Rulesets.Catch/obj/project.assets.json' doesn't have a target for '.NETFramework,Version=v4.7.1'. Ensure that restore has run and that you have included 'net471' in the TargetFrameworks for your project. [/home/lastexceed/dev/osu/osu.Game.Rulesets.Catch/osu.Game.Rulesets.Catch.csproj]
/usr/share/dotnet/sdk/2.1.105/Sdks/Microsoft.NET.Sdk/build/Microsoft.PackageDependencyResolution.targets(167,5): error : Assets file '/home/lastexceed/dev/osu/osu.Game.Rulesets.Taiko/obj/project.assets.json' doesn't have a target for '.NETFramework,Version=v4.7.1'. Ensure that restore has run and that you have included 'net471' in the TargetFrameworks for your project. [/home/lastexceed/dev/osu/osu.Game.Rulesets.Taiko/osu.Game.Rulesets.Taiko.csproj]
/usr/share/dotnet/sdk/2.1.105/Sdks/Microsoft.NET.Sdk/build/Microsoft.PackageDependencyResolution.targets(167,5): error : Assets file '/home/lastexceed/dev/osu/osu.Game.Rulesets.Mania/obj/project.assets.json' doesn't have a target for '.NETFramework,Version=v4.7.1'. Ensure that restore has run and that you have included 'net471' in the TargetFrameworks for your project. [/home/lastexceed/dev/osu/osu.Game.Rulesets.Mania/osu.Game.Rulesets.Mania.csproj]

So I tried osu! (Debug, netcoreapp2.0) instead (since on windows that works just as good as net471 for me) and it builds successfully (0 errors, 0 warnings). Instead I get this exception on startup:

An unhandled exception of type 'System.TypeInitializationException' occurred in OpenTK.dll: 'The type initializer for 'OpenTK.DisplayDevice' threw an exception.'
 Inner exceptions found, see $exception in variables window for more details.
 Innermost exception 	 System.DllNotFoundException : Unable to load DLL 'gbm': The specified module or one of its dependencies could not be found.
 (Exception from HRESULT: 0x8007007E)
   at OpenTK.Platform.Linux.Gbm.CreateDevice(Int32 fd)
   at OpenTK.Platform.Linux.LinuxFactory.SetupDisplay(String gpu, IntPtr& gbm_device, IntPtr& egl_display)
   at OpenTK.Platform.Linux.LinuxFactory.CreateDisplay(IntPtr& gbm_device, IntPtr& egl_display)
   at OpenTK.Platform.Linux.LinuxFactory.get_gpu_fd()
   at OpenTK.Platform.Linux.LinuxFactory.CreateDisplayDeviceDriver()
   at OpenTK.DisplayDevice..cctor()

Which log files do you need and where do I find them? Anything else I should provide?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
peppycommented, Apr 30, 2018

First error is you not having the .net 4.7.1 sdk installed. second is opentk not being able to get a graphic context from your linux. you’re going to have to figure out why that is the case yourself.

0reactions
Alex4386commented, Jul 24, 2018

try sudo apt install libgbm-dev then.

Just In case you need another dependencies, **EGL.dll -> sudo apt install libegl1-mesa-dev libdl.so -> sudo apt install libc6-dev

Read more comments on GitHub >

github_iconTop Results From Across the Web

ASP.NET Core hard crash after upgrade to Microsoft. ...
The application does compile but it crashes hard. There is nothing in the log it does not hit program.cs main() or startup.cs. It...
Read more >
NET applications crash at startup - .NET Framework
A user starts a .NET application. However, the application crashes at startup if the user.config file is corrupt. The application works fine ...
Read more >
Xamarin forms debug IOS from windows Error: error MT0069
The issue may be resolved by fully restoring and building the solution. If the unresolved item is a project reference this can lead...
Read more >
Dynatrace.OneAgent.Xamarin 8.271.2
After the project setup, OneAgent monitors all user actions, lifecycle events, web requests, and crashes. Using manual instrumentation, you can additionally ...
Read more >
Diagnosing an ASP.NET Core hard crash
The immediate crash was due to an exception being thrown in an async void method. Relevant threading aspects: I start the ASP.NET Core...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found