Comments (15)
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one. Thank you!
Open similar issues:
- WinUI 3 - Blank App, Packaged with Windows Application Packaging Project (WinUI 3 in Desktop) - The App Package generated cannot be started (#9740), similarity score: 0.77
- Published App from Default WinUI 3 Template Is Unresponsive (#8288), similarity score: 0.76
- WINUI 3 Unable to Run Published App Due To KERNELBASE.dll Crash (#6757), similarity score: 0.76
- Unpackaged mode doesn't work for app created by VSIX (#9091), similarity score: 0.76
Closed similar issues:
- Cannot run Unpackaged C# Winui3 app (#6395), similarity score: 0.76
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
from microsoft-ui-xaml.
As it looks that you have trimming enabled, you might want to try setting to "partial" in your .csproj file.
from microsoft-ui-xaml.
Where did you see trimming enabled, i don't see that in the csproj file ?
Should I add this ?
<PublishTrimmed>true</PublishTrimmed>
<TrimmerDefaultAction>link</TrimmerDefaultAction>
<TrimMode>partial</TrimMode>
EDIT: if this what i was supposed to do it didn't worked ):
from microsoft-ui-xaml.
Check your publish profile and see if PublishTrimmed is enabled there (according to your video, it seems to be). You might also want to try setting it to false.
from microsoft-ui-xaml.
Ok I found the settings but unfortunately it didn't worked I still have this annoying error and the app doesn't start at all.
Exception non gérée à 0x756A8984 (KernelBase.dll) dans App1.exe : 0xE0434352 (paramètres : 0x80131524, 0x00000000, 0x00000000, 0x00000000, 0x00640000).
from microsoft-ui-xaml.
I could reproduce this issue. It started working once I deleted the obj and bin folders once.
from microsoft-ui-xaml.
How did you do it because I just deleted bin and obj folders, re-run the publish process and my software still cannot start unfortunately );
from microsoft-ui-xaml.
I did the following steps:
-Create the new project
-Add TrimMode=partial, WindowsPackageType=None and WindowsAppSdkSelfContained=true setting to the csproj.
-Open the publish profile for the architecture and change PublishSingleFile to true.
-I also had to change win10-platform to win-platform in the publish profile. Somehow the .net version detection does not seem to work when publishing from visual studio which results in an error
-The app should now publish, but crashes during startup
-Delete the obj and bin folder
-Publish again
-App now starts
from microsoft-ui-xaml.
Wait it finally worked thank you !!!!! Tbh I don't know what I have done differently
from microsoft-ui-xaml.
Wait it finally worked thank you !!!!! Tbh I don't know what I have done differently
can you share your project files. I'm having the same issue.
from microsoft-ui-xaml.
Yes of course it's on my GitHub
from microsoft-ui-xaml.
Don't look the code too closely it's bad 😅 (it's my first native windows app ever) but you can just wipe all the code and put your code instead and it should work
https://github.com/Fefedu973/PowerToys-Run-Plugin-Updater
from microsoft-ui-xaml.
Don't look the code too closely it's bad 😅 (it's my first native windows app ever) but you can just wipe all the code and put your code instead and it should work https://github.com/Fefedu973/PowerToys-Run-Plugin-Updater
man you are too generous, thank you. let see if it works.
from microsoft-ui-xaml.
Does it work ?
from microsoft-ui-xaml.
It works!,
It works after adding these
<WindowsPackageType>None</WindowsPackageType>
<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
<TrimMode>partial</TrimMode>
in <PropertyGroup>
in .csproj
file and doing the following changes in PublishProfiles
.
The majority of changes happens in publish profile where I only wanted to publish x64 version.
publish profile address: YourProject\Properties\PublishProfiles
Working: Project1.xml
Not working: Project2.xml
File 1: Project1.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- https://go.microsoft.com/fwlink/?LinkID=208121. -->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<Platform>x64</Platform>
<RuntimeIdentifier Condition="$([MSBuild]::GetTargetFrameworkVersion('$(TargetFramework)')) >= 8">win-x64</RuntimeIdentifier>
<RuntimeIdentifier Condition="$([MSBuild]::GetTargetFrameworkVersion('$(TargetFramework)')) < 8">win-x64</RuntimeIdentifier>
<PublishDir>bin\\\win10-x64\publish\</PublishDir>
<SelfContained>true</SelfContained>
<PublishSingleFile>true</PublishSingleFile>
<PublishReadyToRun Condition="'$(Configuration)' == 'Debug'">False</PublishReadyToRun>
<PublishReadyToRun Condition="'$(Configuration)' != 'Debug'">true</PublishReadyToRun>
<PublishTrimmed Condition="'$(Configuration)' == 'Debug'">False</PublishTrimmed>
<PublishTrimmed Condition="'$(Configuration)' != 'Debug'">false</PublishTrimmed>
<Configuration>Release</Configuration>
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
</PropertyGroup>
</Project>
File 2: Project2.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- https://go.microsoft.com/fwlink/?LinkID=208121. -->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<Platform>x64</Platform>
<RuntimeIdentifier Condition="$([MSBuild]::GetTargetFrameworkVersion('$(TargetFramework)')) >= 8">win-x64</RuntimeIdentifier>
<RuntimeIdentifier Condition="$([MSBuild]::GetTargetFrameworkVersion('$(TargetFramework)')) < 8">win10-x64</RuntimeIdentifier>
<PublishDir>bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\</PublishDir>
<SelfContained>true</SelfContained>
<PublishSingleFile>False</PublishSingleFile>
<PublishReadyToRun Condition="'$(Configuration)' == 'Debug'">False</PublishReadyToRun>
<PublishReadyToRun Condition="'$(Configuration)' != 'Debug'">True</PublishReadyToRun>
<PublishTrimmed Condition="'$(Configuration)' == 'Debug'">False</PublishTrimmed>
<PublishTrimmed Condition="'$(Configuration)' != 'Debug'">True</PublishTrimmed>
</PropertyGroup>
</Project>
Differences between Project1.xml and Project2.xml
-
RuntimeIdentifier Property:
- Project1.xml: Uses
win-x64
regardless of the target framework version. - Project2.xml: Uses
win-x64
for target framework versions >= 8 andwin10-x64
for versions < 8.
- Project1.xml: Uses
-
PublishDir Property:
- Project1.xml: Uses a hardcoded path
bin\\\win10-x64\publish\
. - Project2.xml: Uses a dynamic path
bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\
.
- Project1.xml: Uses a hardcoded path
-
PublishSingleFile Property:
- Project1.xml: Set to
true
. - Project2.xml: Set to
False
.
- Project1.xml: Set to
-
PublishTrimmed Property:
- Project1.xml: Set to
False
in both Debug and non-Debug configurations. - Project2.xml: Set to
False
in Debug andTrue
in non-Debug configurations.
- Project1.xml: Set to
-
Configuration Property:
- Project1.xml: Explicitly set to
Release
. - Project2.xml: Not explicitly set (it relies on the build configuration being used).
- Project1.xml: Explicitly set to
The generated exe file in \bin\win10-x64\publish
works in my Computer but I'm not sure that it will work in other Computers,
Will it work ?
Thanks!
from microsoft-ui-xaml.
Related Issues (20)
- TabViewItem instances reused incorrectly HOT 1
- DolbyVision - WinUI2 on UWP HOT 1
- Custom Title Bar Drag Region prevents click on taskbar buttons in Fullscreen mode at certain size HOT 3
- How To delate the entire titlebar HOT 5
- Rearranging GridView items causes appcrash with exception 8000ffff only when running as administrator HOT 3
- How to change the selection text foreground color in WPF MS TextBox control HOT 3
- Proposal: We have SelectionHighlightColor but what about SelectionForegroundColor? HOT 1
- MediaCapture + WinUI 3 MediaPlayerElement doesn't support same subtype formats as WinUI 2 CaptureElement HOT 1
- RichEditBox in UWP/WinUI3 Loses Font Family Settings for Subsequent Lines if the First Line Contains Only a Newline HOT 1
- EmbeddedResource in Xaml HOT 1
- The `TextBlock.Padding` value behaves unexpectedly. HOT 2
- CommandBarFlyout doesn't close when a MenuFlyoutItem is clicked HOT 1
- PointerPointProperties.IsBarrelButtonPressed does not return the expected value on PointerEntered
- Microsoft.UI.Interop.h causes -Wmissing-field-initializers when using ClangCL
- NumberBox parsing
- Proposal: Update the Figma design toolkit to modern figma standards and new UI Kit support
- Offset Issue with items in ItemsRepeater inside a ScrollViewer when modifying Visibility HOT 1
- TabView item drag does not adapt to DPI change HOT 2
- Regression: pressing F6 with Light Dismissible TeachingTip does nothing now
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from microsoft-ui-xaml.