microsoft / microsoft/WindowsAppSDK-Samples

How to add .net library to the Win32 application

Open
#328 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PowerShell
Stars
1k
Forks
335
Avg merge
5d 1h
Merged PRs (30d)
8

Description

I grabbed the project cpp-win32-unpackaged and added it to the Samples\CustomControls\CsWinRTAuthoringWinUI.sln

  • added WinUIComponentCs as a dependency to the cpp-win32-unpackaged
  • added a few includes to make it compiling
  • added some stuff to the manifest file

When running app I get:
Exception thrown at 0x00007FFB44FB5B0C (KernelBase.dll) in SimpleIslandApp.exe: WinRT originate error - 0x80004005 : 'Cannot find a resource with the given key: AcrylicBackgroundFillColorDefaultBrush.'.

Here is the project
https://github.com/tomaszkot/CsWinRTAuthoringWinUI

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Samples\CustomControls\CsWinRTAuthoringWinUI.sln and the cpp-win32-unpackaged project, then review the added WinUIComponentCs dependency, includes, and manifest changes. Run the application and investigate the reported AcrylicBackgroundFillColorDefaultBrush resource error; done means the Win32 application starts without that exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, csharp
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.