Skip to content

Cannot load Microsoft.WindowsAppRuntime.dll #1883

@DeepthiCG

Description

@DeepthiCG

Describe the bug

Cannot use dynamic dependent API like MddTryCreatePackageDependency, MddAddPackageDependency etc in a C++ application, showing errors related to Microsoft.WindowsAppRuntime.dll not found. Seems MddBootstrapInitialize cannot load this dll.

Steps to reproduce the bug

  1. Created a sample application(C++ Console App) using the steps mentioned in
    https://docs.microsoft.com/en-us/windows/apps/windows-app-sdk/tutorial-unpackaged-deployment?tabs=cpp
    It could successfully run.

  2. Now tried to use dynamic dependent API like MddTryCreatePackageDependency, MddAddPackageDependency etc in that, for referring framework packages like WinUI2 or anyother. These APIs are called after calling "MddBootstrapInitialize".

But errors showing that "Microsoft.WindowsAppRuntime.dll was not found"

  1. Tried to add "WindowsPackageType>None</WindowsPackageType in project settings. In this case project could not be build, showing errors like,
    Error MSB3843 Project "DynamicDependenciesTest" targets platform "Windows", but references SDK "Visual C++ 2015-2019 UWP Desktop Runtime for native apps v14.0" which targets platform "UAP".

Please suggest a solution for this.

Expected behavior

No response

Screenshots

No response

NuGet package version

No response

Packaging type

No response

Windows version

No response

IDE

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

area-DynamicDependenciesDynamicDependency for Windows App SDK: enables framework packages for packaged & unpackaged appsbugSomething isn't workingneeds-author-feedback

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions