TFS 2015 xaml 在 ASP.NET MVC4 中构建 TypeScript 2.x "experimentalDecorators"
TFS 2015 xaml build TypeScript 2.x "experimentalDecorators" in ASP.NET MVC4
我们有一个带有 "old" xaml 构建的 tfs 2015,我想用 webpack 部署一个 Angular 2 网站。
我可以在 tfs 上安装 npm 并使用 webpack 编译我的项目,方法是添加工作正常的简单目标我在 tfs 临时目录上看到我的 node_modules 文件夹和编译的 wwwroot。
<PropertyGroup>
<WebsitePath>$(MSBuildProjectDirectory)/../../Gui/Web/</WebsitePath>
...
</PropertyGroup>
<Target Name="npminstall">
<Exec WorkingDirectory="$(WebsitePath)" Command="npm install" />
<Exec WorkingDirectory="$(WebsitePath)" Command="npm run build:dev" />
</Target>
但是 TFS 代理在尝试编译 .net dll 时给我一条错误消息
Build: Experimental support for decorators is a feature that is subject to change in a future release.
Set the 'experimentalDecorators' option to remove this warning.
我知道这个错误是我在开始使用 VS 和 NG2 时遇到的,我需要在我的 csproj 文件中添加一些节点
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DevMvc|AnyCPU'">
<TypeScriptTarget>ES5</TypeScriptTarget>
<TypeScriptJSXEmit>None</TypeScriptJSXEmit>
<TypeScriptCompileOnSaveEnabled>True</TypeScriptCompileOnSaveEnabled>
<TypeScriptNoImplicitAny>False</TypeScriptNoImplicitAny>
<TypeScriptModuleKind>CommonJS</TypeScriptModuleKind>
<TypeScriptRemoveComments>False</TypeScriptRemoveComments>
<TypeScriptOutFile />
<TypeScriptOutDir />
<TypeScriptGeneratesDeclarations>False</TypeScriptGeneratesDeclarations>
<TypeScriptNoEmitOnError>True</TypeScriptNoEmitOnError>
<TypeScriptSourceMap>True</TypeScriptSourceMap>
<TypeScriptMapRoot />
<TypeScriptSourceRoot />
<TypeScriptExperimentalDecorators>True</TypeScriptExperimentalDecorators>
<TypeScriptEmitDecoratorMetadata>True</TypeScriptEmitDecoratorMetadata>
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
</PropertyGroup>
然后 VS 中的项目编译,我再次将此行添加到我的 csproj 但它不是 helping/working 用于 TFS 构建
在 VS 中,我目前使用 tsconfig.json
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"noImplicitAny": false,
"types": [
"node"
]
},
"awesomeTypescriptLoaderOptions": {
"useWebpackText": true
},
"exclude": [
"node_modules",
"dist",
"typings/main",
"typings/index.d.ts"
],
"compileOnSave": true
}
有人知道我必须做什么才能在 TFS 2015 上编译该项目。
TypeScript 2.0.6 也安装在构建服务器上。
当我们从 tfs 2010 升级时,我们不会将 xaml Processtemplate 更改为新的。我所要做的就是选择 TFS 2015
中包含的新 Xaml Buildprocesstemplates 之一
我们有一个带有 "old" xaml 构建的 tfs 2015,我想用 webpack 部署一个 Angular 2 网站。
我可以在 tfs 上安装 npm 并使用 webpack 编译我的项目,方法是添加工作正常的简单目标我在 tfs 临时目录上看到我的 node_modules 文件夹和编译的 wwwroot。
<PropertyGroup>
<WebsitePath>$(MSBuildProjectDirectory)/../../Gui/Web/</WebsitePath>
...
</PropertyGroup>
<Target Name="npminstall">
<Exec WorkingDirectory="$(WebsitePath)" Command="npm install" />
<Exec WorkingDirectory="$(WebsitePath)" Command="npm run build:dev" />
</Target>
但是 TFS 代理在尝试编译 .net dll 时给我一条错误消息
Build: Experimental support for decorators is a feature that is subject to change in a future release.
Set the 'experimentalDecorators' option to remove this warning.
我知道这个错误是我在开始使用 VS 和 NG2 时遇到的,我需要在我的 csproj 文件中添加一些节点
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DevMvc|AnyCPU'">
<TypeScriptTarget>ES5</TypeScriptTarget>
<TypeScriptJSXEmit>None</TypeScriptJSXEmit>
<TypeScriptCompileOnSaveEnabled>True</TypeScriptCompileOnSaveEnabled>
<TypeScriptNoImplicitAny>False</TypeScriptNoImplicitAny>
<TypeScriptModuleKind>CommonJS</TypeScriptModuleKind>
<TypeScriptRemoveComments>False</TypeScriptRemoveComments>
<TypeScriptOutFile />
<TypeScriptOutDir />
<TypeScriptGeneratesDeclarations>False</TypeScriptGeneratesDeclarations>
<TypeScriptNoEmitOnError>True</TypeScriptNoEmitOnError>
<TypeScriptSourceMap>True</TypeScriptSourceMap>
<TypeScriptMapRoot />
<TypeScriptSourceRoot />
<TypeScriptExperimentalDecorators>True</TypeScriptExperimentalDecorators>
<TypeScriptEmitDecoratorMetadata>True</TypeScriptEmitDecoratorMetadata>
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
</PropertyGroup>
然后 VS 中的项目编译,我再次将此行添加到我的 csproj 但它不是 helping/working 用于 TFS 构建
在 VS 中,我目前使用 tsconfig.json
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"noImplicitAny": false,
"types": [
"node"
]
},
"awesomeTypescriptLoaderOptions": {
"useWebpackText": true
},
"exclude": [
"node_modules",
"dist",
"typings/main",
"typings/index.d.ts"
],
"compileOnSave": true
}
有人知道我必须做什么才能在 TFS 2015 上编译该项目。
TypeScript 2.0.6 也安装在构建服务器上。
当我们从 tfs 2010 升级时,我们不会将 xaml Processtemplate 更改为新的。我所要做的就是选择 TFS 2015
中包含的新 Xaml Buildprocesstemplates 之一