I writing plugin that analyze our own XAML like markup files. That files linked (like in WPF) with generated part (*.g.cs files) and user part (*.cs files). Problem is that generated files including in our project (because of project building problem inside Visual Studio). So, resharper analyze that files as normal *.cs files, search there for fields, methods, etc. But, like in wpf, fields actually declared in our markup files through "x:Name" attribute. For example:
<?xml version="1.0" encoding="utf-8" ?>
Generated cs file:
partial class MyUserControl : System.Windows.Markup.IComponentConnector
private Panel Test;
void System.Windows.Markup.IComponentConnector.Connect(Int32 index, Object target)
case 1: Test = (Panel)target; break;
User cs file:
public partial class MyUserControl
public void SomeMethod()
Test.Width = 200;
In my plugin I'm creating new type declaration for type MyUserControl and add field declaration to ITypeDeclaration.MemberDeclarations for x:Name="Test". But this member declaration conflicts with member, that declared in generated file and resharper highlight usages of this field as error with duplicate name tooltip.
The question is: Can I ask resharper to not analyze my generated files from plugin, or from any settings? Or can I manually (from my plugin) remove some type declarations of IDeclaredElement?
I'm already try "Skip Files and Folders" settings and "Generated Code" settings in resharper with no success. If I add generated files to "Skip Files and Folders" - those files not highlighted by resharper, but their content is readed and added to intellisense.