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

Publishing an unpackaged winUI 3 project yields an exe that causes an error on run #6735

Closed
1 of 2 tasks
Arcalise08 opened this issue Feb 17, 2022 · 2 comments
Closed
1 of 2 tasks
Labels
area-Tooling area-Unpackaged duplicate This issue or pull request already exists product-winui3 WinUI 3 issues team-Markup Issue for the Markup team

Comments

@Arcalise08
Copy link

Describe the bug

Publishing an unpackaged winUI 3 project yields an exe that causes an error on run. Event viewer logs below

Application: TestProj.exe
CoreCLR Version: 6.0.222.6406
.NET Version: 6.0.2
Description: The process was terminated due to an unhandled exception.
Exception Info: System.DllNotFoundException: Dll was not found.
   at TestProj.Program.XamlCheckProcessRequirements()
   at TestProj.Program.Main(String[] args) in C:\Users\KyleEstes\Desktop\projects\TestProj\TestProj\obj\x64\Release\net6.0-windows10.0.19041.0\win-x64\App.g.i.cs:line 28

This is a bare project using the Blank (Run In Desktop) template from windows app sdk c# VS2022 Templates.

Here is the csproj

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>WinExe</OutputType>
    <TargetFramework>net6.0-windows10.0.19041.0</TargetFramework>
    <TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
    <RootNamespace>TestProj</RootNamespace>
    <ApplicationManifest>app.manifest</ApplicationManifest>
    <Platforms>x86;x64;arm64</Platforms>
    <RuntimeIdentifiers>win10-x86;win10-x64;</RuntimeIdentifiers>
    <PublishProfile>win10-$(Platform).pubxml</PublishProfile>
    <UseWinUI>true</UseWinUI>
    <WindowsPackageType>None</WindowsPackageType>
	<WindowsAppSdkBootstrapInitialize>false</WindowsAppSdkBootstrapInitialize>
	<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
    <EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>
	<DisableMsixProjectCapabilityAddedByProject>true</DisableMsixProjectCapabilityAddedByProject>
  </PropertyGroup>

  <ItemGroup>
    <Content Include="Assets\SplashScreen.scale-200.png" />
    <Content Include="Assets\LockScreenLogo.scale-200.png" />
    <Content Include="Assets\Square150x150Logo.scale-200.png" />
    <Content Include="Assets\Square44x44Logo.scale-200.png" />
    <Content Include="Assets\Square44x44Logo.targetsize-24_altform-unplated.png" />
    <Content Include="Assets\StoreLogo.png" />
    <Content Include="Assets\Wide310x150Logo.scale-200.png" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.WindowsAppSDK" Version="1.0.0" />
    <PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22000.194" />
    <Manifest Include="$(ApplicationManifest)" />
  </ItemGroup>

  <!-- Defining the "Msix" ProjectCapability here allows the Single-project MSIX Packaging
       Tools extension to be activated for this project even if the Windows App SDK Nuget
       package has not yet been restored -->
  <ItemGroup Condition="'$(DisableMsixProjectCapabilityAddedByProject)'!='true' and '$(EnablePreviewMsixTooling)'=='true'">
    <ProjectCapability Include="Msix"/>
  </ItemGroup>
</Project>

Steps to reproduce the bug

  1. Create Blank (Run in Desktop)
  2. Publish app
  3. attempt to run .exe from publish

Expected behavior

The application starts

Screenshots

No response

NuGet package version

WinUI 3 - Windows App SDK 1.0

Windows app type

  • UWP
  • Win32

Device form factor

No response

Windows version

No response

Additional context

No response

@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Feb 17, 2022
@gabbybilka gabbybilka changed the title Bug title Publishing an unpackaged winUI 3 project yields an exe that causes an error on run Feb 17, 2022
@gabbybilka gabbybilka added the product-winui3 WinUI 3 issues label Feb 17, 2022
@StephenLPeters
Copy link
Contributor

same as #6740

@StephenLPeters StephenLPeters added area-Tooling duplicate This issue or pull request already exists team-Markup Issue for the Markup team labels Mar 4, 2022
@bpulliam
Copy link
Contributor

Closing duplicate issues. Please continue the discussion on #6740

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Tooling area-Unpackaged duplicate This issue or pull request already exists product-winui3 WinUI 3 issues team-Markup Issue for the Markup team
Projects
None yet
Development

No branches or pull requests

4 participants