microsoft / microsoft/TypeScript
TypeScript for .Net Projects
Offen
@joj arbeitet bereits daran.
Seit 27.3.2026.
Possible Improvement
- Vorherrschende Sprache
- Go
- Sterne
- 111k
- Forks
- 14.3k
- Ø Merge
- 2 T. 4 Std.
- Gemergte PRs (30 T.)
- 132
Beschreibung
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.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Bewertung
Dieses Issue wurde noch nicht bewertet.