When you add TypeScript files to a class library and build the project, you’ll see that nothing happens. No matter what you try, no JavaScript files are created.
After comparing the csproj file with a MVC Web project, I noticed that a targets file is not referenced. I guess it’s a bug in the Visual Studio tooling…
To fix this, execute the following steps:
after
After comparing the csproj file with a MVC Web project, I noticed that a targets file is not referenced. I guess it’s a bug in the Visual Studio tooling…
To fix this, execute the following steps:
- Unload the project
- Edit the project file using an XML editor
- Add the following line
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.targets" />
after
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- Save the file and reload the project