microsoft / microsoft/TypeScript

When using the MSBuild package with Blazor library extra content files are added to nupkg

オープン
#42,907 コメント 7 件 リアクション 0 件 担当者 3 名 GitHub で見る

@HannahOshlag がすでに取り組んでいます。

2022年9月2日 から。

Visual Studio
主要言語
Go
スター
111k
フォーク
14.3k
平均マージ
2日 4時間
マージ済み PR(30日)
132

説明

Bug Report

When using the Microsoft.Typescript.MSBuild 4.2.1-rc to pack a Blazor Library project for nuget package, the compiled javascript files are added to the content and contentFiles folders of the nuget package, not just to staticWebAssets that Blazor build picks up.

GetTypeScriptOutputForPublishing MSBuild target seems to be the source of errors, if the content of that target is commented out, the nuget package does not have the above problem.

UPDATE

The real sideeffects of this coming to the surface when the build nuget package is consumed in another Blazor project and being built in VS 2019 16.x. As the JS files are showing up in the consuming project as project items and they should not. The worse thing is that if you put a tsconfig.json into the Logging package no matter if it is a <None.... item, that will also be packed and will cause compilation failure in the consuming project as there will be no source files to compile (that's how we started to notice this problem).

Repro
  1. Clone https://github.com/BlazorExtensions/Logging
  2. dotnet pack
  3. Observe the contents of the nupkg file
🔎 Search Terms

msbuild, nuget, blazor

🙁 Actual behavior

See in summary above.

🙂 Expected behavior

Nuget package should not have those extra files.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。