开发者

How to configure Visual Studio to create all projects including a reference to a specific dll?

开发者 https://www.devze.com 2022-12-13 02:15 出处:网络
I 开发者_JAVA技巧am tired of adding a reference to System.ServiceModel in each project I create. Is there any way to automate this?Maybe you can create a template and use it every time ...You can upda

I 开发者_JAVA技巧am tired of adding a reference to System.ServiceModel in each project I create. Is there any way to automate this?


Maybe you can create a template and use it every time ...


You can update the existing (default) project templates and add the reference to it. Templates are located in this directory on my box: C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE

Look for the project templates folder and then navigate based on the type of project you are creating and the language you are using.

Here's a snippet of the classlibrary project template that I think is what you are looking for:

<ItemGroup>
    <Reference Include="System"/>
    $if$ ($targetframeworkversion$ == 3.5)
    <Reference Include="System.Core">
        <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Xml.Linq">
        <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Data.DataSetExtensions">
        <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>    
    $endif$
    <Reference Include="System.Data"/>
    <Reference Include="System.Xml"/>
</ItemGroup>

Just add your reference to the list.

0

精彩评论

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

关注公众号