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
VsTsc does not respect <Link> item metadata for build outputs for UWP #15322
Comments
This is interesting. My knee jerk reaction is to say it’s by design but don’t want to shoot it down before understanding your goal. The thing is, we pass all the *.ts files in the project all at once to the tsc.exe, and the compiler doesn’t allow per-file output location. To implement what you want we’d have to first group files by output location and then invoke multiple calls to the compiler. We're trying to keep things simple in our MSBuild functionality and have it parallel Would it be an acceptable compromise to use the |
Can the |
I have a similar issue. Folder structure: WebApp
scripts
page1.ts
page2.ts
common1.ts - link
Common
scripts
common1.ts
common2.ts |
<PropertyGroup>
<TypeScriptOutDir>foo\bar</TypeScriptOutDir>
</PropertyGroup>
Note that this doesn't mean you'll necessarily get a flat output structure -- rather the source directory tree will be mirrored under the outdir you specified. You could reference @ifle Sounds like you have a working solution. I think you can leave out the included |
We can't leave out the included .ts files from the csproj because we need a way to update them in VS |
I did some digging and while I'm not in a working state, I understand both your comments & why it's behaving the way it is. tl;dr: tsc.exe wasn't actually compiling the
|
@grork @ifle sorry for the long delay on this. I experimented with a bunch of approaches and unfortunately there's no great way of accomplishing what you want. Without some MSBuild hackery, there's no current combination of switches/project properties that will take input files from arbitrary directories and output them in a single directory (or allow fine grained control over where each file is emitted). I will keep looking into what we can add to VS/MSBuild to help. I do have a recommendation though. Have you considered using |
Closing because |
VsTsc does not respect item metadata for build outputs for UWP, and instead placed in the root of the outputted AppX.
TypeScript Version: 2.1.5 / VS2017 15.1.26403.7
Code
Expected behavior:
When compiled, I expect Foo.ts to be outputted into MyFolder\foo.js.
Actual behavior:
a) It shows up in the solution explorer in the right place (E.g. it's in MyFolder\foo.ts as a project item (good)
b) It compiled (good)
c) when it's deployed in my UWP, it's in the root folder, which means all my paths & references to it now fail to resolve the file.
The text was updated successfully, but these errors were encountered: