Cannot locate resource from 'ms-appx:///Microsoft.UI.Xaml/Themes/themeresources.xaml'.
See original GitHub issueI 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 :
Windows Version:
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:7
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
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.