我创建了一个新的空的asp core项目。我添加了一个简单的ts文件。
现在默认情况下它会自动编译成javascript。
在asp core之前,项目对话框中有一个选项。但是在当前的核心解决方案中没有项目对话框。
我还尝试了post中描述的方法。 所以我在xproj文件的第一个属性组中添加了
一段时间前,我安装了typescript完整包,也许与此有关?
如何停止Visual Studio在核心应用程序中自动编译typescript文件?有什么建议吗?
现在xProj看起来像这样
现在默认情况下它会自动编译成javascript。
在asp core之前,项目对话框中有一个选项。但是在当前的核心解决方案中没有项目对话框。
我还尝试了post中描述的方法。 所以我在xproj文件的第一个属性组中添加了
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
,但这并没有改变任何东西。一段时间前,我安装了typescript完整包,也许与此有关?
如何停止Visual Studio在核心应用程序中自动编译typescript文件?有什么建议吗?
现在xProj看起来像这样
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
<!-- Makes the TypeScript compilation task a no-op -->
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
<PropertyGroup Label="Globals">
<ProjectGuid>43a95da8-804b-459b-8082-fdceb957a8d2</ProjectGuid>
<RootNamespace>GulpTs</RootNamespace>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<ItemGroup>
<DnxInvisibleContent Include="bower.json" />
<DnxInvisibleContent Include=".bowerrc" />
</ItemGroup>
<Import Project="$(VSToolsPath)\DotNet.Web\Microsoft.DotNet.Web.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>