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

Transient ProjectReference to .esproj breaks build due to IgnoreJavaScriptOutputAssembly target running before IncludeTransitiveProjectReferences #46347

Open
duckblaster opened this issue Jan 28, 2025 · 5 comments
Assignees
Labels
Area-esproj Issues related to the Javascript project system Area-NetSDK
Milestone

Comments

@duckblaster
Copy link

Describe the bug

With this project structure:

  • ProjA.csproj
    • ProjectReference: ProjB.csproj
      -ProjB.csproj
    • ProjectReference: ProjC.esproj
  • ProjC.esproj

Building the solution fails with because it is looking for ProjC.dll

This is caused by the IgnoreJavaScriptOutputAssembly target in Microsoft.Common.CurrentVersion.targets running before IncludeTransitiveProjectReferences

To Reproduce

Exceptions (if any)

Further technical details

  • Include the output of dotnet --info
  • The IDE (VS / VS Code/ VS4Mac) you're running on, and its version
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-NetSDK untriaged Request triage from a team member labels Jan 28, 2025
@marcpopMSFT marcpopMSFT self-assigned this Jan 28, 2025
@marcpopMSFT
Copy link
Member

Do you have an https://aka.ms/binlog to share from the build failure?

@marcpopMSFT marcpopMSFT added this to the Discussion milestone Jan 28, 2025
@marcpopMSFT marcpopMSFT removed the untriaged Request triage from a team member label Jan 28, 2025
@duckblaster
Copy link
Author

duckblaster commented Jan 28, 2025

I have a repo which demonstrates the issue, as well as binlogs and a workaround (see the workaround branch for that): https://github.com/duckblaster/IgnoreJavaScriptOutputAssemblyBugDemo

There also some screenshots from the binlog showing the relevant sections

@duckblaster
Copy link
Author

There is also a bug in the Microsoft.VisualStudio.JavaScript.Sdk SDK/Targets/SDK.WebAssets.targets file: the PropertyGroup at the start should be in a .props file, as it is setting defaults for StaticWebAssetSourceId and StaticWebAssetBasePath

@baronfel baronfel added the Area-esproj Issues related to the Javascript project system label Jan 28, 2025
@baronfel
Copy link
Member

cc @joj

@joj
Copy link

joj commented Jan 30, 2025

I think @javiercn will understand the logic behind this better, but I think the property group is correct where it is. StaticWebAssetSourceId is overridable (but defaults to $(ProjectName), and StaticWebAssetBasePath is set depending on the Source Id. We could make BasePath not change a value if it's already set. I'm not sure if that's something that we want in web assets, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-esproj Issues related to the Javascript project system Area-NetSDK
Projects
None yet
Development

No branches or pull requests

4 participants