-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better support for Azure/Kudu #1702
Comments
Have you considered calling tsc.js from the command-line? It runs fine with cscript (WSH) so you don't even need Node.js installed. |
Yeah, and I have a part of my build system using that, for a particular set of files that I need compiled with some custom parameters. But the vast majority of my 100 or so source TS files are just a standard part of my web project, as I like the automatic compilation, incremental builds, and all the tool support that comes with just having them built as a part of the standard Visual Studio web project and build process. So far as I'm aware, it's not possible - or at least, not easy - to point tsc.js to a .csproj file and have it compile everything. And so forth. Doing it that way seems like it's going against the tide, and when I tried manual command-line compilation before, I spent most of my time fighting tools. I'm not eager to go back to that if I can avoid it :-). |
Try installing this on a machine without VS and you should get the compiler (tsc.exe): https://visualstudiogallery.msdn.microsoft.com/2d42d8dc-e085-45eb-a30b-3f7d50d55304 Alternatively you could get the npm package for TypeScript. |
That's actually precisely the problem. In these third party environments, I can't install the Visual Studio tools. I can install the compiler into node, but that doesn't integrate easily with the standard Visual Studio build process - I have to maintain a separate set of batch files, AND somehow turn off the normal VS integration, because otherwise it gives me a build error. |
If you could point tsc at a .csproj file on disk, would that solve your problem? |
Just a helpful comment: If you want a standard JS / CSS build pipeline you will need to look outside MSBuild inevitably. |
I guess I'm still a little confused about the exact scenario/ask. You have a build server and need to install TypeScript without installing Visual Studio? That's what the link I gave is for. Why can you install node and use npm on the machine but not install tsc.exe? I don't understand why you have to turn off the 'normal' VS integration to avoid build errors if this is a machine without Visual Studio on it. |
@smithkl42 The latest grunt-ts supports targeting a .csproj or .vsproj file directly. You can use Visual Studio to do your compiles when you're working interactively and grunt-ts from the command-line and they share the files and configuration specified in the VS project. |
Very cool! I'll take a look at that. |
FYI: got two minor bug reports so you may wish to wait until Monday. |
This probably applies to other third-party, automated build environments as well - but see the issue here:
projectkudu/kudu#721
Basically, in order to use TypeScript in projects targeting Azure Websites using Kudu as the build system, the TS tools need to be installed on the website, which means that we need to wait for the Azure website team to include the TS tools on their images. They're a busy team, and at the moment, they still haven't added support for 1.3, let alone 1.4.
It would be really hand if there were some way to get the Visual Studio integration to use a compiler installed with NuGet (or in some other way associated with the project), rather than entirely depending on a per-machine install.
Alternatively, any suggestions for getting TS to build successfully without having the tools installed on the machine?
The text was updated successfully, but these errors were encountered: