Skip to content

Windows APP sdk unpackaged  #2860

@Azhang74

Description

@Azhang74

Describe the bug

I have a project ,when I build with package settings,it run well,but i modify .vcxprj file as followsing 👍

<MinimumVisualStudioVersion>16.0</MinimumVisualStudioVersion>
	<AppContainerApplication>false</AppContainerApplication>
    <AppxPackage>false</AppxPackage>
    <ApplicationType>Windows Store</ApplicationType>
    <ApplicationTypeRevision>10.0</ApplicationTypeRevision>
    <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
    <WindowsTargetPlatformMinVersion>10.0.17763.0</WindowsTargetPlatformMinVersion>
    <UseWinUI>true</UseWinUI>
 <EnableMsixTooling>true</EnableMsixTooling>
	<WindowsPackageType>None</WindowsPackageType>

When I debug App , then
Unhandled exception at 0x00007FFA4D28474C in HydraulicRobotHMI.exe: Microsoft C++ exception: winrt::hresult_class_not_registered at memory location 0x00000010797BF1A8.

In call stack ,error in the function:

	Microsoft::UI::Xaml::DependencyProperty AixsParameterControl::m_AxisDescProperty =
		Microsoft::UI::Xaml::DependencyProperty::Register(L"AxisDesc",
			winrt::xaml_typename<winrt::hstring>(),
			winrt::xaml_typename<HydraulicRobotHMI::AixsParameterControl>(),
			Microsoft::UI::Xaml::PropertyMetadata{ winrt::box_value(L""), nullptr });
m_AxisDescProperty is declared:
		static Microsoft::UI::Xaml::DependencyProperty m_AxisDescProperty;

Steps to reproduce the bug

  1. when build packaged app ,it is OK.
  2. when modify .vcxprj file as :
<AppxPackage>false</AppxPackage>
<WindowsPackageType>None</WindowsPackageType>

rebuild App ,it does'nt run!

Expected behavior

No response

Screenshots

No response

NuGet package version

1.1.4

Packaging type

Unpackaged

Windows version

Windows 11 version 21H2 (22000)

IDE

Visual Studio 2022

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions