Skip to content

MSBuild Typescript integration adds elements to the compilation using the full path on Linux #48271

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

Open
javiercn opened this issue Mar 15, 2022 · 0 comments
Assignees
Labels
Bug A bug in TypeScript

Comments

@javiercn
Copy link

Bug Report

We recently received a bug report in the ASP.NET Core repo (here) of a user having issues using Typescript + our JS Modules feature. The user claims that the issue only happens on Linux and upon investigation, it turns out that it seems that Typescript is adding the compilation outputs to the build using the full path instead of the relative path on Linux.

On windows it exposes the "correct" behavior adding the element to the item group using the relative path, which avoids the issue as the file is not added twice.

The result is that the build is broken in Linux (and possibly Mac OS) when the user tries to use TypeScript + ASP.NET Core.

🔎 Search Terms

MSBuild

🕗 Version & Regression Information

This is happening with ASP.NET Core .NET 6.0 and "Microsoft.TypeScript.MSBuild" Version="4.6.2"

💻 Code

There is a repro attached in the issue above

🙁 Actual behavior

Build fails because an asset is added twice to the build pipeline, in one case with the relative path and in the other with the absolute path, so they are considered different assets.

🙂 Expected behavior

Typescript adds the asset with the relative path in all OSes which avoids the asset being accounted twice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript
Projects
None yet
Development

No branches or pull requests

4 participants