microsoft / microsoft/TypeScript
TypeScript for .Net Projects
未关闭
@joj 已经在做这个了。
开始于 2026年3月27日。
Possible Improvement
- 主要语言
- Go
- 星标
- 111k
- 派生
- 14.3k
- 平均合并
- 2 天 4 小时
- 30 天内合并 PR
- 132
描述
Overview
We heard from people wanting to try TypeScript 7 in their .Net Projects. We're actively working on updating the Microsoft.MSBuild.TypeScript package to support TypeScript 7. In the meantime, I have created a new targets file you can use to get started now.
How to Use it
- Place this targets file next to your solution. Rename to Directory.Build.targes or if you already have a Directory.Build.targets file, you can rename to something else and import it directly in your csproj.
- Install tsgo globally from npm (you can also get it from your own build):
npm install -g tsgo
- Configure the TsgoExe property in your project file. The sample uses the default location, but your configuration may be different:
<PropertyGroup>
<TsgoExe>$(UserProfile)\AppData\Roaming\npm\node_modules\@typescript\native-preview\node_modules\@typescript\native-preview-win32-x64\lib\tsgo.exe</TsgoExe>
</PropertyGroup>
- That's it! TS files will be compiled as part of your build process
Known Issues
- The TypeScript nuget includes Language Services. This approach will not replace that functionality. If you want to try TypeScript 7 for Language Services in VS, you can go to Tools->Options and find "Enable JavaScript/TypeScript Native Language Service Preview" in Preview Features.
- This targets files only supports building loose .ts files or tsconfig.json based projects. If using tsconfig.json, it must be in the same folder as the project file.
- Cleaning behavior is only supported when using loose .ts files.
Feedback
Please provide feedback! For feedback on Language Services in VS, use Help->Send Feedback->Report a Problem. For build related feedback, please open an issue on github.com/microsoft/typescript-go.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
评估
这个 Issue 还没有评估数据。