Visual Studio TypeScript settings not performed during deployment

After following the instructions here to enable TypeScript support in Visual Studio 2012, I started getting below exceptions when deploying Azure.

What's bad about it?

Command: C: \ DWASFiles \ Sites \ apolyon \ VirtualDirectory0 \ site \ deployments \ Tools \ deploy.cmd Processing deployment of .NET Web Application. C: \ DWASFiles \ sites \ apolyon \ VirtualDirectory0 \ site \ repository \ ApolyonRadio \ ApolyonRadio.csproj (771.3): error MSB4019: imported project "D: \ Program Files (X86) \ MSBuild \ Microsoft \ VisualStudio \ v11.0 \ TypeScript \ Microsoft.TypeScript.targets "was not found. Verify that the path in the declaration is correct and that the file exists on disk. An error occurred while deploying the website. Processing deployment of .NET Web Application. C: \ DWASFiles \ sites \ apolyon \ VirtualDirectory0 \ site \ repository \ ApolyonRadio \ ApolyonRadio.csproj (771.3): error MSB4019: imported project "D: \ Program Files (X86) \ MSBuild \ Microsoft \ VisualStudio \ v11.0 \ TypeScript \ Microsoft.TypeScript.targets "was not found. Verify that the path in the declaration is correct and that the file exists on disk. An error occurred while deploying the website. D: \ kuduservice \ Wwwroot \ Bin \ Scripts \ starter.cmd C: \ DWASFiles \ Sites \ apolyon \ VirtualDirectory0 \ site \ deployments \ tools \ deploy.cmd

+4
source share
2 answers

I am doing TypeScript compilation in a file, saving locally, so I don’t need to import this parameter during publication.

Therefore, adding the attribute Condition = "'$ (Configuration)' == 'Debug'" when configuring the import as described below is a problem. This is what I found best for a better solution.

<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.targets" Condition="'$(Configuration)' == 'Debug'" /> 
+2
source

As mentioned in my comment on Freshblood's answer, there is a more general solution:

<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersio‌​n)\TypeScript\Microsoft.TypeScript.targets" Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualSt‌​udioVersion)\TypeScript\Microsoft.TypeScript.targets')" />

+3
source

Source: https://habr.com/ru/post/1501015/


All Articles