-
Notifications
You must be signed in to change notification settings - Fork 742
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't run apps after publish for Linux or Windows #19000
Comments
Thanks for the report. We'll likely split the issues as they are unrelated.
Can you provide the command line that you used to publish your app? Can you also provide the linux environmnt that you're using ?
By the looks of it, it seems that there's a mismatch in the versions used to run the app. Try building your app with net9.0 instead of net8.0. |
@jeromelaban Thanks for your assistance. Please see responses below:
Copy. Do you need me to make two separate issues?
I'm using the Visual Studio GUI publishing tool:
We are building our system from scratch using Yacto - I'm not the linux guy but if you need more info I can get it for you. lsb_release doesn't appear to be included in our build.
I only have net8.0-desktop available to publish with from the drop down |
Thanks. Could you do the publish on the command line using the documented steps and let us know if it helps? For linux, this may look like a distribution specific issue, which may be missing some packages that are implicitly required by Skia to run. This is the list of dependencies that are known to be required. Your distribution may require some more, and we'd like to know them.
You need to change your csproj |
Using the following command: dotnet publish -f net8.0-desktop -r win-x64 -p:SelfContained=true Results Workload updates are available. Run Running with this generates the following error - which does look like a .net mismatch. Is there a way to force it to net8.0? We are targeting this framework. |
dotnet workload list Installed Workload Id Manifest Version Installation Source |
You can force building with .NET 8 using a global.json file, and set the |
@jeromelaban I should clarify that I can run on my linux box using the older style template where each platform has it's own project: I am able to publish to WPF and GTK and run without issues. Does this new all-in-one solution style use new dependencies? FYI - We are using Wayland and not X11 on our Linux box. |
Thanks for the update. It's best if you move to the newer project format, as it uses the latest backend that relies on X11 directly and not GTK (GTK causes a lot of issues). In your case, it will use XWayland to render. It does also build in a single target |
Current behavior
I created a new project using the Uno extensions for VisualStudio. I am able to run the default sample app within Visual Studio debugger.
I am able to publish for linux-arm64 but when I run on my device, the screen remains blank.
Please see attached for linux logs.
linux-arm64-logs.txt
When running the published version on Windows I get the following error in Windows Event Viewer:
CoreCLR Version: 8.0.1124.51707
.NET Version: 8.0.11
Description: The process was terminated due to an unhandled exception.
Exception Info: System.InvalidOperationException: Unable to find the Microsoft.WindowsDesktop.App framework. An Uno Platform update may be required (Expected path D:\dev\test\UnoLatestSingleProject_02\UnoLatestSingleProject_02\bin\Release\net8.0-desktop\Microsoft.WindowsDesktop.App\win-x64)
at Uno.UI.Runtime.Skia.WpfHostBuilder.RegisterAssemblyResolver(Boolean useSharedFramework)
at Uno.UI.Runtime.Skia.WpfHostBuilder..ctor()
at Uno.UI.Runtime.Skia.HostBuilder.<>c__DisplayClass0_0.b__0()
at Uno.UI.Runtime.Skia.SkiaHostBuilder.Build()
I have performed uno-check and it appears I have no issues:
Expected behavior
Default app should be published to linux-arm64 and appear as normal. Default app should be able to run on win x64
How to reproduce it (as minimally and precisely as possible)
Open Program.cs and add the following lines to set the ApplicationDataPathOverride and LocalCacheFolderPathOverride
WinRTFeatureConfiguration.ApplicationData.ApplicationDataPathOverride = "/home/test/data";
WinRTFeatureConfiguration.ApplicationData.LocalCacheFolderPathOverride = "/home/test/cache";
Workaround
None at this time
Works on UWP/WinUI
No
Environment
No response
NuGet package version(s)
Affected platforms
Skia (GTK), Windows (WinAppSDK)
IDE
Visual Studio 2022
IDE version
17.12.3
Relevant plugins
No response
Anything else we need to know?
No response
The text was updated successfully, but these errors were encountered: