简体   繁体   English

在Visual Studio中构建时显示Typescript命令行选项

[英]Show Typescript command line options when building in Visual Studio

I'm trying to familiarize myself with the VS 2015 Typescript project, and the differences between all the build options. 我试图让自己熟悉VS 2015 Typescript项目以及所有构建选项之间的差异。 When I read questions/answers on SO, they are usually referring to command line options, and I don't always know how they translate to the Typescript Build options in the VS 2015 UI. 当我阅读有关SO的问题/答案时,它们通常是指命令行选项,而且我并不总是知道它们如何转换为VS 2015 UI中的Typescript Build选项。

Is there a window somewhere (or extension?) that shows the actual command line that visual studio runs when you select the various project Typescript Build options? 当您选择各种项目的Typescript Build选项时,是否有一个窗口(或扩展名)显示Visual Studio运行的实际命令行?

Visual Studio compiles TypeScript via Microsoft.TypeScript.targets , that pass a path to options file to tsc.exe, eg: Visual Studio通过Microsoft.TypeScript.targets编译TypeScript,该脚本将选项文件的路径传递到tsc.exe,例如:

"C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.5\tsc.exe"  @"C:\Users\Username\AppData\Local\Temp\tmp12bc368455ec43d08c6a17ac865eb778.rsp"

content of .rsp file: .rsp文件的内容:

--sourcemap --target ES6 --noEmitOnError --locale en-US "C:\Users\Username\Documents\Visual Studio 2015\Projects\TypeScriptHTMLApp1\TypeScriptHTMLApp1\app.ts" ......

Unfortunately it is a temporary file, so it's hard to get options from it. 不幸的是,它是一个临时文件,因此很难从中获取选项。

You can open .csproj file in text editor, find MSBuild options and get command-line equivalents: 您可以在文本编辑器中打开.csproj文件,找到MSBuild选项并获取等效的命令行:

https://github.com/Microsoft/TypeScript/wiki/Setting-Compiler-Options-in-MSBuild-projects https://github.com/Microsoft/TypeScript/wiki/Setting-Compiler-Options-in-MSBuild-projects

Update: You can enable verbose build output in Tools -> Options: 更新:您可以在工具->选项中启用详细的构建输出: 在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我可以在Visual Studio 2008的项目属性中的命令行选项中使用一个变量来标识项目目录吗? - Is there a variable I could use to identify the project directory at the command line options in the project properties in Visual Studio 2008? 在不使用命令行安装Visual Studio的情况下执行Visual Studio单元测试时发生错误 - Error when executing visual studio unit tests without installing visual studio using command line 使用命令行选项在Linux上构建.netstandard库 - Building .netstandard library on linux using command line options 从命令行附加Visual Studio调试器 - Attaching Visual Studio debugger from command line Visual Studio命令行生成参数 - Visual Studio command line build arguments Visual Studio:显示代码行的经过时间 - Visual Studio: Show elapsed time for line of codes 在Visual Studio外部运行时,为什么我的命令行应用程序在远程程序集上出错? - Why does my command line application error out on remote assembly when ran outside Visual Studio? 通过命令行使用MSBuild而不是在Visual Studio上使用无效的令牌错误 - Invalid Token Errors when using MSBuild via Command Line but not on Visual Studio 我可以设置visual studio在构建时使用psake吗? - Can I set visual studio to use psake when building? 在Visual Studio中构建时/ bin中不产生DLL / EXE - No DLLs/EXEs produced in the /bin when building in Visual Studio
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM