VS2013 Typescript:多个项目的引用和调试 [英] VS2013 Typescript: Referencing and debugging with multiple projects

查看:24
本文介绍了VS2013 Typescript:多个项目的引用和调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经制作了一个用 TypeScript 编写的库,现在我想为此制作一个示例应用程序.

I've made a library written in TypeScript, and now I want to make a sample app for this.

为此,我在当前的 Visual Studio 解决方案中添加了一个新项目.

To do that, I added a new project to my current Visual Studio solution.

文件夹树是这样的:

SamiTS
├───SamiTS
└───SamiTSSampleApp

并且我使用以下方法添加了对我的库的引用:

and I added a reference to my library using:

///<reference path='../SamiTS/samiconverter.ts' />

现在我可以很好地将它们构建在一起,但是我无法使用 Visual Studio 进行调试,因为它将 SamiTSSampleApp 文件夹设置为根目录,因此我无法使用../SamiTS"访问 SamiTS 文件夹

Now I can build them together well, but I cannot debug with Visual Studio as it sets SamiTSSampleApp folder as the root directory so that I cannot access SamiTS folder with '../SamiTS'

我能解决这个问题吗,不用将我的库(由多个文件组成,编译成一个文件)复制到新文件夹中?

Can I solve this problem, without copying my library (composed of multiple files, compiled into one single file) to the new folder?

推荐答案

我使用了一个 after build 任务来复制文件.现在我使用 grunt-ts 来生成单个合并文件.

I used an after build task to copy the file over. Now I use grunt-ts to generate the single merged file.

这篇关于VS2013 Typescript:多个项目的引用和调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆