Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Microsoft.Windows.Controls are you missing an assembly reference?

Tags:

c#

wpf

dll

I'm receiving the following error:

Error 26 The type or namespace name 'Controls' does not exist in the namespace 'Microsoft.Windows' (are you missing an assembly reference?)

These two assemblies appear in the .g.cs file:

using Microsoft.Windows.Controls;
using Microsoft.Windows.Controls.Primitives;

When I remove them, the error returns.

like image 916
Ahmed AbdElkader Mahmoud Avatar asked May 20 '26 05:05

Ahmed AbdElkader Mahmoud


1 Answers

Check your XAML code. Probably there will be xmlns pointing Microsoft.Windows.Controls.Primitives or Microsoft.Windows.Controls.

like image 171
Rafal Avatar answered May 22 '26 19:05

Rafal