We have a developer tool that contains the following components:
a MSBuild extension to generate C#/VB.NET classes from a custom file format;
project and item templates for developers to create files of that format in Visual Studio;
A common routine for developers to use this tool is:
create a C#/VB.NET project (either by using the project template or not);
add a file of the custom format, and edit the file. The file generally contains class and property definitions;
create other C#/VB.NET classes (either partial to the ones defined in the custom file, or helpers to manipuate those classes) in the same project;
build the project. This step invokes the custom MSBuild extension which generates C#/VB.NET classes based on the file created in step 2, and places the generated files in obj\;
create other projects and reference the one created in step 1;
This approach has been working really well for us. Without having to build the project between step 2 and 3, Visual Studio's intellisense can automatically pick up the classes and properties defined in the custom file.
However, with Resharper (v6.0.2202.688), we noticed that regardless of whether we are building the project between step 2 and 3, Resharper's intellisense won't work and its code analysis keeps reporting errors on those classes and properties. So I'm wondering if any one could shed some light on whether this is a bug in ReSharper, or there is something we could do to workaround it. Basically, we just need ReSharper's intellisense to play more nicely with code generated by MSBuild.
A few other notes:
<Target Name="MyCustomCompile" DependsOnTargets="ResolveReferences">
<Move SourceFiles="@(_GeneratedCompile)" DestinationFolder="$(IntermediateOutputPath)" OverwriteReadOnlyFiles="true">
<Output TaskParameter="MovedFiles" ItemName="Compile"/>
<Output TaskParameter="MovedFiles" ItemName="FileWrites"/>
Also, based on this post and a few other reasons, we decide not to use Custom Tool in Visual Studio, so please don't suggest this as a workaround.
Thanks in advance,