Typescript: Typescript 2.0 beta VS2015 U3 publish issue.

Created on 14 Jul 2016  ·  9Comments  ·  Source: microsoft/TypeScript

TypeScript Version: 2.0.0 beta VS2015 U3

Step

  1. Install Typescript 2.0.0 beta
  2. Create blank webapplication project.
  3. Add typescript file.
  4. Install nuget package Typescript msbuild 2.0.0 beta
  5. Build project successfully with any error.
  6. Publish project get error.

Copying file WebApplication20file1.js to objReleasePackagePackageTmpWebApplication20file1.js failed. Could not find a part of the path 'WebApplication20file1.js'. WebApplication20 C:Program Files (x86)MSBuildMicrosoftVisualStudiov14.0WebMicrosoft.Web.Publishing.targets 2998

The file in objTypeScriptCompilerOutput.text shows project name has been dupilicated.

Expected behavior:
c:(solution name)(project name)file1.js
c:(solution name)(project name)file1.map.js
Actual behavior:
c:(solution name)(project name)(project name)file1.js
c:(solution name)(project name)(project name)file1.map.js

Bug Fixed

Most helpful comment

Figured it out...

As a work around you can add the following to the project file:
<TypeScriptProjectDir>$(MSBuildProjectDirectory)\</TypeScriptProjectDir> after the <TypeScriptToolsVersion>2.0</TypeScriptToolsVersion> element.

All 9 comments

I'm hitting this also.
error

It prevents me from publishing my web app, which is a showstopper.

Anyone know of a workaround? It's looking like I'll need to uninstall TS 2.0 beta for VS 2015.

@paulvanbrenk can you take a look.

@JudahGabriel or @lg314 can post a _diagnostic_ build log? Does this only reproduce with the NuGet package? Is this an ASP.NET v4 or v5/Core project?

Does this only reproduce with the NuGet package?

I didn't use the NuGet package; I just downloaded and installed TS 2.0 beta for VS 2015.

can post a diagnostic build log?

Sure. How do I do that? You want the full objTypeScriptCompilerOutput.text file?

Is this an ASP.NET v4 or v5/Core project?

This is a ASP.NET v4 project.

Repro steps are super simple, and take about 60 seconds:

  1. Install the TS 2.0 beta for VS 2015.
  2. In Visual Studio, File-> New MVC project.
  3. Add a TypeScript file to the project.
  4. Build -> Publish. Publish anywhere, including the local file system. Voila, the publish will fail.

Figured it out...

As a work around you can add the following to the project file:
<TypeScriptProjectDir>$(MSBuildProjectDirectory)\</TypeScriptProjectDir> after the <TypeScriptToolsVersion>2.0</TypeScriptToolsVersion> element.

Thanks so much for the workaround, Paul! I'll give it a try.

Have a fixed in the VS repo, this will be in the next 2.0 release.

@paulvanbrenk 's suggested fix of <TypeScriptProjectDir>$(MSBuildProjectDirectory)\</TypeScriptProjectDir> definitely fixed the issue! Any ETA on when this will be released? I downloaded the TS 2.0 beta and still encountered the issue.

TS 2.0 RC (2.0.2) has already been released (https://blogs.msdn.microsoft.com/typescript/2016/08/30/announcing-typescript-2-0-rc/).

Was this page helpful?
0 / 5 - 0 ratings