Skip to content
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

Published Package doesn't start #3749

Closed
Artain opened this issue Dec 3, 2020 · 11 comments
Closed

Published Package doesn't start #3749

Artain opened this issue Dec 3, 2020 · 11 comments
Assignees
Labels
area-ProjectSystem product-winui3 WinUI 3 issues team-Markup Issue for the Markup team

Comments

@Artain
Copy link

Artain commented Dec 3, 2020

Bug description
If a sideload package is created and installed it will not start. After attaching a VS debugger the following error message is produced even on the machine the build was created and release or debug builds within VS work fine.
Error: An assembly specified in the application dependencies manifest (App1.deps.json) was not found: package: 'runtimepack.Microsoft.NETCore.App.Runtime.win-x64', version: '5.0.0' path: 'Microsoft.VisualBasic.Core.dll''App1.exe' (Win32): Loaded 'C:\Windows\System32\kernel.appcore.dll'. Symbols loaded.

dotnet --info produces following output:

.NET SDK (reflecting any global.json):
 Version:   5.0.100
 Commit:    5044b93829

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.19041
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\5.0.100\

Host (useful for support):
  Version: 5.0.0
  Commit:  cf258a14b7

.NET SDKs installed:
  5.0.100 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.All 2.1.23 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.23 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.1.23 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.1.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Steps to reproduce the bug

  1. Create a new project with package
  2. Publish package with sideloading (Add a valid Certificate for installation)
  3. Install published package
  4. (optional) Attach debugger (Debug -> Other debug targets -> Debug installed app packages)
  5. Start App

Expected behavior
App should start the same way as it does in VS

Version Info

  • Microsoft.WinUI 3.0.0-preview3.201113.0
  • Blank desktop App with package C#
  • VS 16.9.0 Preview 1.0
  • .net SDK 5.0.100 (Installed with VS)
  • Windows 10 19041

NuGet package version:
[Microsoft.WinUI 3.0.0-preview3.201113.0]

Windows app type:

UWP Win32
Yes
Windows 10 version Saw the problem?
Insider Build (xxxxx)
May 2020 Update (19041) Yes
November 2019 Update (18363)
May 2019 Update (18362)
October 2018 Update (17763)
April 2018 Update (17134)
Fall Creators Update (16299)
Creators Update (15063)
Device form factor Saw the problem?
Desktop Yes
Xbox
Surface Hub
IoT
@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Dec 3, 2020
@akanieski
Copy link

Running into the exact same problem as you list out above.

@lhak
Copy link

lhak commented Dec 3, 2020

I have observed the same issue with the app not starting. In my case, setting PublishTrimmed to false in the Properties\PublishProfiles\win10-X.pubxml file fixed it.

@Artain
Copy link
Author

Artain commented Dec 3, 2020

I have observed the same issue with the app not starting. In my case, setting PublishTrimmed to false in the Properties\PublishProfiles\win10-X.pubxml file fixed it.

@lhak Thanks this seems to resolve the issue. The question remains is this expected behavior.

@akanieski
Copy link

I too was able to set PublishTrimmed to false and it resolved it for me.

@stevenbrix
Copy link
Contributor

stevenbrix commented Dec 3, 2020

I'm glad ya'll found the workaround. My apologies on this one, the default PublishProfiles should have had PublishTrimmed set to false

This is a know issue with the deps.json file generation with the packaging project. @wli3 for FYI, do you know when this will be fixed?

@stevenbrix stevenbrix added this to the WinUI 3.0 milestone Dec 3, 2020
@stevenbrix stevenbrix added team-Markup Issue for the Markup team product-winui3 WinUI 3 issues and removed needs-triage Issue needs to be triaged by the area owners labels Dec 3, 2020
@stevenbrix
Copy link
Contributor

For WinUI3 RTM, we'll set PublishTrimmed to false, and include an error that ensures that property isn't set. To follow when trimming will be officially supported for C#/WinRT assemblies, see microsoft/CsWinRT#373

@stevenbrix
Copy link
Contributor

This should be fixed in Preview4, the default publish profiles no longer set PublishTrimmed

@Bigous
Copy link

Bigous commented Jan 3, 2022

Same is happening to me. Version 1.0 of the Windows App SDK... (WinUI)...

The windows event logger complains about this:

Application: IBovTrackerWinUI.exe
CoreCLR Version: 6.0.121.56705
.NET Version: 6.0.1
Description: The process was terminated due to an unhandled exception.
Exception Info: System.DllNotFoundException: Dll was not found.
   at IBovTrackerWinUI.Program.XamlCheckProcessRequirements()
   at IBovTrackerWinUI.Program.Main(String[] args) in R:\Richard\src\GitHub\Bigous\MarketMonitor\IBovTrackerWinUI\obj\x64\Release\net6.0-windows10.0.19041.0\win10-x64\App.g.i.cs:line 28

Running from inside Visual Studio works... the project is open source and the link is here.

You will need the Proft running prior to run the application (it uses a COM+ object from it to get the RTD information).

The WinForms version of the application works both inside the visual Studio 2022 and the published version from the command line...

@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Jan 3, 2022
@krschau
Copy link
Contributor

krschau commented Jul 15, 2022

@Bigous If you're still seeing this with version 1.1 and want help with it, can you open a new issue?

@ghost ghost removed the needs-triage Issue needs to be triaged by the area owners label Jul 15, 2022
@bryfa
Copy link

bryfa commented Aug 25, 2022

I have the same issue with my WindowsAppSDK1.1 It doesnt run anymore when deployed, but it does work in Visual Studio. We use separate MSIX installer project.

@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Aug 25, 2022
@Bigous
Copy link

Bigous commented Aug 30, 2022

@Bigous If you're still seeing this with version 1.1 and want help with it, can you open a new issue?

I decided to use only the Windows Forms which works perfectly. The tool is just for me, so, I'm ok with that.

@bpulliam bpulliam removed the needs-triage Issue needs to be triaged by the area owners label Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-ProjectSystem product-winui3 WinUI 3 issues team-Markup Issue for the Markup team
Projects
None yet
Development

No branches or pull requests

9 participants