build error on net471 and startup crash on netcoreapp2.0
See original GitHub issuedistribution: 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:
- Created 5 years ago
- Comments:11 (7 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
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