question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot locate resource from 'ms-appx:///Microsoft.UI.Xaml/Themes/themeresources.xaml'.

See original GitHub issue

I just created a Blank WinUI 3 preview 2 project and hit F5 , encountered this exception :

Cannot locate resource from ‘ms-appx:///Microsoft.UI.Xaml/Themes/themeresources.xaml’. [Line: 9 Position: 40]

Csproj:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>WinExe</OutputType>
    <TargetFramework>net5.0-windows10.0.18362</TargetFramework>
    <TargetPlatformMinVersion>10.0.17134.0</TargetPlatformMinVersion>
    <RootNamespace>Weather.History.WinUI3</RootNamespace>
    <ApplicationManifest>app.manifest</ApplicationManifest>
    <Platforms>x86;x64;</Platforms>
    <RuntimeIdentifiers>win10-x86;win10-x64;</RuntimeIdentifiers>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.VCRTForwarders.140" Version="1.0.7" />
    <PackageReference Include="Microsoft.WinUI" Version="3.0.0-preview3.201113.0" />
    <Manifest Include="$(ApplicationManifest)" />
  </ItemGroup>
</Project>

The generated file :

image

Windows Version:

image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:7

github_iconTop GitHub Comments

3reactions
Austin-Lambcommented, Nov 17, 2020

I’ve seen some folks hit this when leaving the application project as the startup project - make sure you set the Packaging project as the startup project as Preview 3 only supports packaged apps.

0reactions
github-actions[bot]commented, Jul 29, 2023

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 5 days.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Cannot locate Resource "themes.xxx.xaml"" runtime error
It seems that the compiler cannot find the resource because either it's not compiled or it is referenced with a wrong URI.
Read more >
Cannot locate resource 'app.xaml' - Microsoft Q&A
Problem: Defining a resource in App.xaml causes the error below. The exact naming and type of resouce that is used to re-create the...
Read more >
How to fix 'Cannot locate resource from 'ms-appx:// ...
When I am trying to add Window runtime component ( .dll ) to my blank app packaged Winui3 (.exe) file I am facing...
Read more >
XAML theme resources - Windows apps
Theme resources in XAML are a set of resources that apply different values depending on which system theme is active.
Read more >
Getting started with the Windows UI 2 Library
In the NuGet Package Manager, select the Browse tab and search for Microsoft.UI.Xaml or WinUI. Select which Windows UI Library NuGet Packages ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found