Skip to content

Typescript Tools 1.8.6 breaks publish to File System in VS2015 #7741

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
simonfanz opened this issue Mar 31, 2016 · 4 comments
Closed

Typescript Tools 1.8.6 breaks publish to File System in VS2015 #7741

simonfanz opened this issue Mar 31, 2016 · 4 comments
Labels
Duplicate An existing issue was already created

Comments

@simonfanz
Copy link

Summary

Apologies if this is not the right place to log this, but I seem to have the exact same issue as described here:

#5894

but with VS2015 and the latest release of Typescript tools (1.8.6)

I've attached a sample project illustrating the issue. Essentially it's an empty web application with a single app.ts typescript file in a src folder, and a tsconfig.json file redirecting the output to a folder wwwroot.

TypeScript Version:
1.7.5 (according to tsc -v from commandline - not really sure if Visual studio uses the same?)
Typescript tools for Visual Studio: 1.8.6.0

Code

{
  "compilerOptions": {
    "noImplicitAny": false,
    "noEmitOnError": true,
    "removeComments": false,
    "sourceMap": true,
    "target": "es5",
    "outDir": "./wwwroot/"
  },
  "exclude": [
    "node_modules",
    "wwwroot"
  ]
}

TSTest.zip

Expected behavior:

I can publish the project using File System publish method

Actual behavior:

The publish fails with the error message:

Copying file src\app.js to obj\Release\Package\PackageTmp\src\app.js failed. Could not find file 'src\app.js'.

@mhegazy
Copy link
Contributor

mhegazy commented Mar 31, 2016

This is a duplicate of #7322

and caused by the same underling issue described in #7247. the problem is that the build targets that pass the expected outputs to publishing pipeline does not read the tsconfig.json contents, it only reads the contents in the project file XML configuration, and this it thinks the output fro src\app.ts should be src\app.js and not wwwroot\app.js.

@mhegazy mhegazy added the Duplicate An existing issue was already created label Mar 31, 2016
@simonfanz
Copy link
Author

Thanks, feel free to close this issue.

As a workaround I've included my output folder and output javascript files in the project, then I can do a normal build (using tsconfig.json file for the typescript settings) and then to publish I add the following entry to the first PropertyGroup in the csproj file:

<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>

A bit ugly and manual, but at least it works... I'd be interested if there are any easier workarounds though.

@mhegazy
Copy link
Contributor

mhegazy commented Mar 31, 2016

sorry about that. hopefully we have a fix in a nightly nuget package soon.

@StefanKern
Copy link

Well it's closed an fixed, but I still spent a few hours debugging it.
What solved it was installing the latest Typescipt plugin for VS 2015.

It can be found here: https://github.com/Microsoft/TypeScript/releases

Direct download link: https://www.microsoft.com/en-us/download/details.aspx?id=48593

@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

3 participants