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 template conventions and mitigating accidental inclusion in WebAssembly build #48758

Closed
SteveSandersonMS opened this issue Jun 13, 2023 · 2 comments
Assignees
Labels
area-blazor Includes: Blazor, Razor Components feature-full-stack-web-ui Full stack web UI with Blazor

Comments

@SteveSandersonMS
Copy link
Member

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
@SteveSandersonMS SteveSandersonMS added area-blazor Includes: Blazor, Razor Components feature-full-stack-web-ui Full stack web UI with Blazor labels Jun 13, 2023
@SteveSandersonMS SteveSandersonMS self-assigned this Jun 13, 2023
@SteveSandersonMS SteveSandersonMS added this to the 8.0-preview7 milestone Jun 13, 2023
@danroth27
Copy link
Member

Is this a duplicate of #46398?

@SteveSandersonMS
Copy link
Member Author

Yes, closing as duplicate of that.

@SteveSandersonMS SteveSandersonMS closed this as not planned Won't fix, can't repro, duplicate, stale Sep 14, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Oct 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components feature-full-stack-web-ui Full stack web UI with Blazor
Projects
None yet
Development

No branches or pull requests

3 participants