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

Unified project system (new TFM integration with build/publish/SWA) #46398

Open
mkArtakMSFT opened this issue Feb 1, 2023 · 5 comments
Open
Assignees
Labels
area-blazor Includes: Blazor, Razor Components enhancement This issue represents an ask for new feature or an enhancement to an existing one feature-blazor-single-project feature-full-stack-web-ui Full stack web UI with Blazor Pillar: Dev Experience Priority:1 Work that is critical for the release, but we could probably ship without
Milestone

Comments

@mkArtakMSFT
Copy link
Member

mkArtakMSFT commented Feb 1, 2023

  • Support net8.0-browser TFM on the SDK and runtime side.
  • Update Static Web Assets to account for multitargeted projects.
    • The project needs to include the assets produced by the net8.0-browser TFM.
    • We need to handle the different TFM combinations here
    • We need to do work to support multi-targeting during build and publish.
@mkArtakMSFT mkArtakMSFT added enhancement This issue represents an ask for new feature or an enhancement to an existing one area-blazor Includes: Blazor, Razor Components Priority:1 Work that is critical for the release, but we could probably ship without feature-full-stack-web-ui Full stack web UI with Blazor labels Feb 1, 2023
@mkArtakMSFT mkArtakMSFT added this to the .NET 8 Planning milestone Feb 1, 2023
@javiercn
Copy link
Member

@SteveSandersonMS
Copy link
Member

Also copying a comment from #48758:

We need to update the new project template and SDK rules so that:

  • There are good conventions for including/excluding things in the Server and WebAssembly builds based on:
    • Directory
    • Filename
    • #if
  • We help developers not to include code or other assets like config in the WebAssembly compilation by mistake
    • For example, we might only include .cs files from a WebAssembly or Shared directory
    • For project/package references, we might have special metadata for "server", "webassembly", and "shared". Then if you add any project/package reference and it doesn't have this metadata (which is the case by default) then:
      • During development this logs a warning
      • During publish it's an error
      • ... so that developers aren't prevented from following existing tutorials (especially important for learners) but they do get a reasonable warning that they have to take some action before publishing to express a clear intent

@guimabdo
Copy link

Hi! I started testing and loving the new Blazor since RC1.

I noticed this unified experience is not in .net8 milestone anymore.

Will we be able to create a single project with Server and Client elements, at least in a preliminary way with .NET8?

  • maybe with some experimental tool?
  • Or only in .NET9?
  • Or has this not been decided yet?

Thanks!


FYI, I'd like to structure something like this:

  • My.Project.csproj
    • Server/ (server only)
      • Components/
        • HomePage.razor
    • WebAssembly/
      • Components/
        • PeoplePage.razor (Auto)
    • Application/
      • People/
        • ListPeopleHandler.server.cs (server only)
        • ListPeopleHandler.client.cs (client only)
        • IListPeopleHandler.cs (both)
        • PersonDto.cs (both)

@SteveSandersonMS
Copy link
Member

@guimabdo No, because of clear community feedback in #49079, we decided to focus on the multiproject solution for .NET 8 (that is, when you need both Server and WebAssembly build outputs). We are still open to creating a single project option in .NET 9 or later, but there is no option for that in .NET 8.

@ghost
Copy link

ghost commented Dec 21, 2023

Thanks for contacting us.

We're moving this issue to the .NET 9 Planning milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues.
To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components enhancement This issue represents an ask for new feature or an enhancement to an existing one feature-blazor-single-project feature-full-stack-web-ui Full stack web UI with Blazor Pillar: Dev Experience Priority:1 Work that is critical for the release, but we could probably ship without
Projects
None yet
Development

No branches or pull requests

5 participants