Typescript does not generate .js from TFS publication

I will try to be as specific as possible.

We work with TFS and we use typescript for client scripts.

When we develop locally, we can do everything perfectly fine, but the problem is with published websites from TFS.

The problem is that when we want to perform a deployment, or if we want to automate it, we need to work around it, because in _PublishedWebsites typescript nothing seems to be compiled, and the script folder contains only .ts files.

Currently, a workaround is to go to the build folder and copy the .js files. This workaround works for now, but I think the ideal scenario would be to have .js files generated in the _PublishedWebsites folder.

We tried different options, but we could not find a solution, but the information found around is not very large.

Any help would be appreciated.

Thanks.

EDIT: we are using VS 2013 and the latest version of TFS and typescript. Ts files are added to the MVC project.

+6
source share
3 answers

Fixed automatically with the latest update!

+1
source

I had the same problem and for me this worked:

  • In Visual Studio, right-click on your project and upload it.
  • Right-click on the project again and edit the csproj file.
  • Be sure to import Typescript immediately after Microsoft.CSharp.targets.

Example:

<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.targets" /> 
+3
source

How are you trying to deploy or automate it?

If you are just doing an online deployment or similar deployment through a visual studio, then saving javascript files as part of the solution should solve this problem.

If you are performing continuous integration with TFS or performing another automatic build, you need to install TypeScript on the build server and run the compiler on bulid.

Another option (which I did when I did not have access to the build server) was to copy the TypeScript compiler to the TFS project and check it and direct the project to a new location.

More information is available here: http://manfredlange.blogspot.co.nz/2014/01/aspnet-mvc-typescript-azure-website-and.html

0
source

All Articles