开发者

Any tool that can change all the References in the Solution for us?

When we have a solution with more than one project and some of these project开发者_Go百科s 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?


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜