Code analysis for generated partials

I have a custom MSBuild task that generates a partial class. Suppose the generated class looks like this:

public partial class Foo {
    private TextBox TextBox1 { get; set; }

The generated files are placed in obj/Debug and are not included in the solution.

In my code, I'd like to be able to write "TextBox1." and see intellisense from ReSharper. But instead, ReSharper cannot see the property, and highlights it in red with the option to create it.

Visual Studio's intellisense (if I press Ctrl+J) does recognise the property and shows me the intellisense, and if I right-click and "Go to definition" on the property it takes me to the generated file. So it seems to be a ReSharper issue.

ReSharper does seem to support similar situations with XAML for WPF solutions and ASPX for ASP.NET, so I'd like to know what's involved in making it work for my build task. Do the generated partial files need to be output to a specific directory or from a specific build task?

Edit: It appears RIA services had a similar issue:

I hope that the fix wasn't specific for RIA services and that I will be able to leverage it.


1 comment
Comment actions Permalink

Hello Paul
     Could you please attach a small sample solution demonstrating this problem? Thank you!

Andrey Serebryansky

Support Engineer

JetBrains, Inc

"Develop with pleasure!"


Please sign in to leave a comment.