Enable IntelliSense for XAML resources not work
See original GitHub issueTranslation:
error netsdk1022 Duplicate 'Page' items were included. The .NET SDK includes 'Page' items from your project directory by default .....
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
XAML intellisense not showing suggestions for resources ...
Enable all .NET exceptions in "debugger ". Menu Debug > Windows > Exception Settings, then check Common Language Runtime Errors. 7. Switch to...
Read more >wpf - Visual Studio Intellisense not working on XAML only ...
Try building the project and deploying the project. There may be error in some dll or in some C# code. Try fixing all...
Read more >XAML code autocomplete (Intellisense) is disabled/ greyed ...
I uninstalled resharper and xaml auto complete does not working anymore. What I have tried: stackoverflow.com answer, not working; Repare by vs ...
Read more >VS 2015: Xaml IntelliSense not working in UI for WPF
Hi guys! I installed the new Visual Studio 2015, and created a new Telerik WPF project with reference to Telerik.Windows.Controls, Telerik.
Read more >Intellisense
If Visual Studio Intellisense unable to locate resources that are stored in a ResourceDictionary, follow this guide: First, create a new ResourceDictionary ......
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 Free
Top 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
Ohhhhh… I got it
The problem is the
DesignTimeResources.xaml
is not aPage
it is aResourceDictionary
only used by Visual Studio only during Design Time. You included it as a page and it will be compiled into the source code.Follow these steps Step 1 : Move the
DesignTimeResources.xaml
file in to Properties (create one if not existing) folder (not necessary but this will prevent it from mingling with other xaml files)Example :
Step 2 : Add this in your csproj file instead
If I add
<ItemGroup> <Page>...</Page> </ItemGroup>
into the*.csproj
, it will cause the project building failure as aboveNETSDK1022
error.If I remove the
<ItemGroup> <Page>...</Page> </ItemGroup>
node from*.csproj
, it becomes no building errors, but when I typing<SomeElement someAttribute={StaticResource }>
in VS xaml editor, it does not show any resources such asSystemControlForegroundBaseMediumBrush
etc…