Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide an Add Reference feature for Visual Studio projects #2180

Closed
NoelAbrahams opened this issue Mar 2, 2015 · 2 comments
Closed

Provide an Add Reference feature for Visual Studio projects #2180

NoelAbrahams opened this issue Mar 2, 2015 · 2 comments
Labels
Suggestion An idea for TypeScript Visual Studio Integration with Visual Studio

Comments

@NoelAbrahams
Copy link

Hi,

The set-up we currently have for managing a large number of projects in Visual Studio is the following:

  • Ensure each project generates a .d.ts file in an output directory.

  • If project A depends on the types in project B then create a project dependency using the VS dialogue.

  • In project B add file _references.ts and add the following snippet in order to import the types from project A:

      /// <reference path='../projectA/output/typings.d.ts' />

This feature request is to provide an "Add Reference" dialogue that does the following:

  • The dialogue is launched from the context menu for a project (i.e. right-click on project B and select "Add Reference")

  • Permits selection of declaration files, e.g. projectA/output/types.d.ts.

  • Once the item is selected the reference is added to a section in .csproj

    <References>
      <Reference Include="typings">
          <HintPath>..\projectA\output</HintPath>
      </Reference>
    </References>
  • The TypeScript compiler and language service use this reference exactly the same as if it were defined in _references.ts.

@RyanCavanaugh RyanCavanaugh added Suggestion An idea for TypeScript Visual Studio Integration with Visual Studio labels Mar 4, 2015
@MicahZoltu
Copy link
Contributor

I have put together an interim solution (CC0 license in case Microsoft wants to add make it official or take it over). The Readme.md has the details, but the short of it is that it is a NuGet package you can install that adds primitive support for adding references between Visual Studio TypeScript projects.

https://github.com/Zoltu/BuildTools.TypeScript.FromReferences

Feedback and Pull Requests welcome!

@RyanCavanaugh
Copy link
Member

We ended up implementing #3469 which is largely in lieu of this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Suggestion An idea for TypeScript Visual Studio Integration with Visual Studio
Projects
None yet
Development

No branches or pull requests

3 participants