When we have a solution with more than one project and some of these projects are using references to the project in the same solution, for debugging purposes we change the reference to point to the Project , not to the DLL ... well we do it with hand! I was wondering if there is tool that does this for us automatically? so when I have a solution and I run this tool, it should be able to point the references to their project references?
+1
A:
Maybe using a code generation tool using CodeSmith or T4 templates. There you could setup the mappings once, and recreate it automatically. You got to then figure out the deployment part of the genned code.
Brian
2010-10-08 16:56:33
+1
A:
You might be able to use MSBuild to help you. If you edit your csprog file so that you have 2 ItemGroup blocks with your references...
<ItemGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<Reference Include="System" />
...
</ItemGroup>
<ItemGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
...
</ItemGroup>
... then you would get different references in different builds. Note, VS.NET might not refresh the list of references, but you'll see the difference when you build.
This may mean you need to update your csproj by hand, or run some tool to create these two sets of references, but from then on your builds will take care of things automatically.
Martin Peck
2010-10-08 17:03:11