Skip to content
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

Cannot publish when using single file output via TypeScriptOutFile #6467

Closed
mykohsu opened this issue Jan 13, 2016 · 13 comments
Closed

Cannot publish when using single file output via TypeScriptOutFile #6467

mykohsu opened this issue Jan 13, 2016 · 13 comments
Assignees
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue Needs More Info The issue still hasn't been fully clarified

Comments

@mykohsu
Copy link

mykohsu commented Jan 13, 2016

Copying file Scripts/compiledFromTS.js to obj\Release\Package\PackageTmp\Scrippts\compiledFromTS.js failed. Could not find file 'Scripts/compiledFromTS.js'.

This is because the individual js files are not generated with single file output. The single output is also not published.

Probably related to #3178

@mykohsu mykohsu changed the title Cannot publish when using single file output Cannot publish when using single file output via TypeScriptOutFile Jan 13, 2016
@mhegazy
Copy link
Contributor

mhegazy commented Jan 13, 2016

what version of TS are you using? if you are using 1.7.4, is it the same issue as #5894?

@mhegazy mhegazy added the Needs More Info The issue still hasn't been fully clarified label Jan 13, 2016
@mykohsu
Copy link
Author

mykohsu commented Jan 15, 2016

I'm using 1.7.6 with VS 2015. I can verify that ItemGroup's Content Include is using relative paths, not absolute like in #5894.

@mhegazy
Copy link
Contributor

mhegazy commented Jan 15, 2016

@mykohsu can you share your repro?

@mykohsu
Copy link
Author

mykohsu commented Jan 16, 2016

Unfortunately the repro is internal only so may be difficult to reproduce. Weirdly, this is now working - I suspect there was conflict with a gulp script.

However, is it a known issue that the single file output is not published unless that target file is also added to the project? Is this the desired behavior?

@paulvanbrenk
Copy link
Contributor

This may be related to the following:

Can you try the following in the TypeScript targets file for VS 2015 (C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\TypeScript), can you change the following line:

<TypeScriptBuildConfigurations Condition="'$(TypeScriptOutFile)' != ''">$(TypeScriptBuildConfigurations) --out &quot;$(TypeScriptOutFile)&quot;</TypeScriptBuildConfigurations>

to

<TypeScriptBuildConfigurations Condition="'$(TypeScriptOutFile)' != ''">$(TypeScriptBuildConfigurations) --outFile &quot;$(TypeScriptOutFile)&quot;</TypeScriptBuildConfigurations>

I changed --out to --outFile

@mhegazy
Copy link
Contributor

mhegazy commented Feb 20, 2016

@mykohsu any updates on this issue? did the workaround help?

@mhegazy mhegazy added the Bug A bug in TypeScript label Feb 20, 2016
@firecube
Copy link

I have the same issue where I am using typescript 1.8.6 with a tsconfig file specifying an outFile. This workaround didn't help.

What I did in the end is to add a build condition around the ItemGroup that contains all of my TypeScriptCompile elements to limit it to Debug mode. My publish settings are for a Release configuration and my ts outFile is included as part of the project so it gets copied on build.

Not ideal but it got me going.

<ItemGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <TypeScriptCompile Include="app\components\customer\app.ts" /> ... etc

@paulvanbrenk
Copy link
Contributor

Closing this as it's unclear we can actually do anything here. We fixed the issue where specifying the outfile option in the tsconfig.json file would not work with publishing.

@brianj1084
Copy link

@paulvanbrenk is there an update that will fix the TypeScript targets file without manually editing it?

@jamesfancy
Copy link

@paulvanbrenk so, what's the solution.

@paulvanbrenk
Copy link
Contributor

@jamesfancy for which question? The original bug is fixed in 2.0.

@paulvanbrenk paulvanbrenk added the Fixed A PR has been merged for this issue label Jul 18, 2016
@jamesfancy
Copy link

@paulvanbrenk Thank you. I am waiting for 2.0 release.

@cwoolum
Copy link

cwoolum commented Aug 17, 2016

With 1.8.6, this will work if you use the project properties instead of using a tsconfig.json. It's not ideal but it works on a build server without modifying targets.

@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
Bug A bug in TypeScript Fixed A PR has been merged for this issue Needs More Info The issue still hasn't been fully clarified
Projects
None yet
Development

No branches or pull requests

7 participants