Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typescript/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-core/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Typescript 在asp core vs 2015中禁用自动类型脚本编译_Typescript_Asp.net Core - Fatal编程技术网

Typescript 在asp core vs 2015中禁用自动类型脚本编译

Typescript 在asp core vs 2015中禁用自动类型脚本编译,typescript,asp.net-core,Typescript,Asp.net Core,我创建了一个新的空asp核心项目。我添加了一个简单的ts文件 现在,默认情况下,它会自动编译为javascript 在asp core之前,项目对话框中有一个选项。但是在当前的核心解决方案中没有项目对话框 我还尝试了本文中描述的内容。 因此,我将true添加到xproj文件的firest属性组中,但它没有改变任何内容 前一段时间我安装了typescript完整的软件包,可能与此有关 关于如何停止visual studio在核心应用程序中自动编译typescript文件,有什么建议吗 xProj现

我创建了一个新的空asp核心项目。我添加了一个简单的ts文件

现在,默认情况下,它会自动编译为javascript

在asp core之前,项目对话框中有一个选项。但是在当前的核心解决方案中没有项目对话框

我还尝试了本文中描述的内容。 因此,我将
true
添加到xproj文件的firest属性组中,但它没有改变任何内容

前一段时间我安装了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>

14
$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
真的
43a95da8-804b-459b-8082-fdceb957a8d2
大口
奥布吉
垃圾桶\
v4.6.1
2

编辑tsconfig.json并将
compileOnSave
设置为
false


除了手动配置外,具有内置TypeScript支持的项目类型在“项目设置”页面上有一个TypeScript Build选项卡,在该选项卡中可以切换保存时编译选项,但不能在核心项目类型中切换。我有什么要求;)在VS2017的“项目设置”页面中,切换“保存时编译”对我没有任何帮助。这就解决了!
{
   "compileOnSave": false,
   "compilerOptions": {
       "noImplicitAny" : true
   }
}