SteveSandersonMS / WebWindow

.NET Core library to open native OS windows containing web UI on Windows, Mac, and Linux. Experimental.
Apache License 2.0
1.99k stars 215 forks source link

Linux build instructions fail #45

Closed duncanawoods closed 4 years ago

duncanawoods commented 4 years ago

OS: Ubuntu 18.04 dotnet sdk: 3.1.100

The build instructions:

sudo apt-get update && sudo apt-get install libgtk-3-dev libwebkit2gtk-4.0-dev
cd testassets/HelloWorldApp
dotnet run

yield:

Unhandled exception. System.DllNotFoundException: Unable to load shared library 'WebWindow.Native' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libWebWindow.Native: cannot open shared object file: No such file or directory
   at WebWindows.WebWindow.WebWindow_ctor(String title, IntPtr parentWebWindow, OnWebMessageReceivedCallback webMessageReceivedCallback)
   at WebWindows.WebWindow..ctor(String title, Action`1 configure) in /home/duncan/Projects/github/WebWindow/src/WebWindow/WebWindow.cs:line 133
   at HelloWorldApp.Program.Main(String[] args) in /home/duncan/Projects/github/WebWindow/testassets/HelloWorldApp/Program.cs:line 12

The build doesn't fail:

dotnet clean
dotnet build

Microsoft (R) Build Engine version 16.4.0+e901037fe for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  Restore completed in 18.67 ms for /home/duncan/Projects/github/WebWindow/src/WebWindow/WebWindow.csproj.
  Restore completed in 21.41 ms for /home/duncan/Projects/github/WebWindow/testassets/HelloWorldApp/HelloWorldApp.csproj.
  WebWindow -> /home/duncan/Projects/github/WebWindow/src/WebWindow/bin/Debug/netstandard2.1/WebWindow.dll
  HelloWorldApp -> /home/duncan/Projects/github/WebWindow/testassets/HelloWorldApp/bin/Debug/netcoreapp3.0/HelloWorldApp.dll

Build succeeded.
    0 Warning(s)
    0 Error(s)

But it doesn't build the native library as the readme claims. I was going to be surprised if it did because I don't expect dotnet core to build vcxproj files. Trying to build the native project directly generates an expected error:

cd src/WebWindow.Native
dotnet build

Microsoft (R) Build Engine version 16.4.0+e901037fe for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

/home/duncan/Projects/github/WebWindow/src/WebWindow.Native/WebWindow.Native.vcxproj(30,3): error MSB4019: The imported project "/Microsoft.Cpp.Default.props" was not found. Confirm that the expression in the Import declaration "/Microsoft.Cpp.Default.props" is correct, and that the file exists on disk.

Build FAILED.
SteveSandersonMS commented 4 years ago

Thanks! I've updated the instructions.

duncanawoods commented 4 years ago

Perfect, thanks!

thanhvyit commented 3 years ago

The issue closed means resolved? I got the same error with raspberry 4 with nuget package: 0.1.0-20200807.1. Already run: sudo apt-get update && sudo apt-get install libgtk-3-dev libwebkit2gtk-4.0-dev but the error still persists.