这是一个常见问题,我将提供答案。
这是一个常见问题,我将提供答案。
Typescript 0.9.5+依赖于Microsoft.VisualStudio.Shell.11.0.dll。因此,这些说明将不再更新。
以下内容仅供教育目的。请遵守所有许可和重新分发要求。有关TypeScript的先前版本,请参阅此答案的编辑历史记录。
"%wix%\bin\dark.exe" -x .\TypeScriptSetup TypeScriptSetup.0.9.1.1.exe
执行以下命令
IF NOT DEFINED ProgramFiles(x86) SET ProgramFiles(x86)=%ProgramFiles%
SET VSDir=%ProgramFiles(x86)%\Microsoft Visual Studio 10.0\Common7\IDE
SET Devenv=%VSDir%\devenv.exe
对于Windows 7用户,执行以下命令:
TypeScript_CORE.msi /l* log.txt VS11_EXTENSIONS_DIR="%VSDir%\Extensions\Microsoft" VS11_NEWSCRIPTITEMS_DIR="%VSDir%\NewFileItems" VS11DEVENV="%Devenv%" VS11_TARGETSINSTALLFOLDER="%ProgramFiles(x86)%\MSBuild\Microsoft\VisualStudio\v10.0\TypeScript"
对于Windows Vista用户,需要使用Wix构建新的安装程序。"%wix%\bin\dark.exe" -x .\TypeScript_CORE TypeScript_Core.msi
------------------------------------------------------------------------
3 <Product Id="{5A908D89-0620-4CC0-A8B8-2CB4A7B0772C}" Codepage="1252" Language="1033" Manufacturer="Microsoft Corporation" Name="TypeScript for Microsoft® Visual Studio® 2012" UpgradeCode="{F15B62A0-4478-4924-876A-867617EC4B8C}" Version="0.9.1.1">
4 <Package Comments="This installer database contains the logic and data required to install TypeScript for Microsoft® Visual Studio® 2012." Compressed="yes" Description="TypeScript for Microsoft® Visual Studio® 2012" InstallerVersion="500" Languages="1033" Manufacturer="Microsoft Corporation" Platform="x86" />
3 <Product Id="{5A908D89-0620-4CC0-A8B8-2CB4A7B0772C}" Codepage="1252" Language="1033" Manufacturer="Microsoft Corporation" Name="TypeScript for Microsoft® Visual Studio® 2010" UpgradeCode="{F15B62A0-4478-4924-876A-867617EC4B8C}" Version="0.9.1.1">
4 <Package Comments="This installer database contains the logic and data required to install TypeScript for Microsoft® Visual Studio® 2010." Compressed="yes" Description="TypeScript for Microsoft® Visual Studio® 2010" InstallerVersion="405" Languages="1033" Manufacturer="Microsoft Corporation" Platform="x86" />
------------------------------------------------------------------------
------------------------------------------------------------------------
15(删除) <CustomAction Id="VS11_CAUpdateConfig" Property="VS11DEVENV" ExeCommand="/updateConfiguration" Return="ignore" Execute="deferred" Impersonate="no" />
16(删除) <CustomAction Id="VWD11_CAUpdateConfig" Property="VWD11EXPRESS" ExeCommand="/updateConfiguration" Return="ignore" Execute="deferred" Impersonate="no" />
------------------------------------------------------------------------
------------------------------------------------------------------------
222 <Directory Id="MSBuild_Microsoft_VisualStudio_11" Name="v11.0">
220 <Directory Id="MSBuild_Microsoft_VisualStudio_11" Name="v10.0">
------------------------------------------------------------------------
------------------------------------------------------------------------
293 <Feature Id="TypeScriptInstallation" Level="1" Title="TypeScript for Microsoft&® Visual Studio® 2012 Setup">
291 <Feature Id="TypeScriptInstallation" Level="1" Title="TypeScript for Microsoft&® Visual Studio® 2010 Setup">
------------------------------------------------------------------------
------------------------------------------------------------------------
427(删除) <Property Id="WixPdbPath" Value="D:\nightly\release-0.9.1.1\srcSetup\wix\outs\x86ret\enu\cooked\TypeScript_CORE_net.wixpdb" />
------------------------------------------------------------------------
------------------------------------------------------------------------
663 <ProgressText Action="CAIsVSRunning">Checking if Microsoft® Visual Studio® 2012 is running</ProgressText>
660 <ProgressText Action="CAIsVSRunning">Checking if Microsoft® Visual Studio® 2010 is running</ProgressText>
------------------------------------------------------------------------
------------------------------------------------------------------------
712 <Control Id="VSRunningStatus" Type="Text" X="25" Y="110" Width="320" Height="110" Text="Microsoft® Visual Studio® 2012 is running, It is recommended that you close it before proceeding [ProductName] Setup." TabSkip="yes" />现有项目需要在项目文件底部添加以下元素。请注意,在BeforeBuild元素之前已添加的元素。
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<TypeScriptTarget>ES3</TypeScriptTarget>
<TypeScriptIncludeComments>true</TypeScriptIncludeComments>
<TypeScriptSourceMap>true</TypeScriptSourceMap>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<TypeScriptTarget>ES3</TypeScriptTarget>
<TypeScriptIncludeComments>false</TypeScriptIncludeComments>
<TypeScriptSourceMap>false</TypeScriptSourceMap>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>-->
杂项
在 TypeScript 不再出现在“程序和功能”列表中之前,可能需要执行两次卸载操作。第一次卸载后,通过按 F5 键刷新应用程序列表。卸载后仍可能存在某些文件。
TypeScript_CORE.msi 中有其他自定义调试器路径属性。我假设此时 VS 2010 与向不同源文件进行脚本调试不兼容。但是,其他人可能希望尝试使其工作。其他自定义属性名称为:VS11_DEBUGGER_DIR、VS11_DEBUGGER_X64_DIR 和 VS11_REMOTEDEBUGGER_DIR。
还有其他自定义属性可启用使用 Visual Web Developer 或 Visual Web Developer Express 中的一个或两个进行安装。我无法测试这些产品的安装。TypeScript_CORE.msi 文件中与此安装相关的自定义属性是:VWD11_EXTENSIONS_DIR、VWDExpress11 和 VWD11_NEWSCRIPTITEMS_DIR。
功能
%ProgramFiles(x86)%
环境变量不存在,因此在该平台上的用户应改用%ProgramFiles%
。 - Samdevenv /Setup
将实现相同的功能,尽管速度较慢。 - Samv10.0
文件夹中的问题实际上也影响了你在0.9.1.1版本中的上述说明。早些时候我没有意识到这一点,因为我安装了之前的TypeScript版本,然后才安装了0.9.1.1版本。我更新了我的回答以定义VS11_TARGETSINSTALLFOLDER
变量来解决这个问题。(这都是针对Windows 7的) 我可能会看看能否编辑你的内容来修复它。 - Sam按照Richard Collette的Windows 7说明操作后,安装程序应该会出现以下错误信息,然后完成安装:
无效的命令行。未知开关:updateConfiguration。使用方式为:devenv [solutionfile | projectfile | anyfile.ext] [switches]
如果出现任何问题,可以尝试运行以下命令:
"%Devenv%" /Setup