-
Notifications
You must be signed in to change notification settings - Fork 25.1k
[Blazor] webassembly-lazy-load-assemblies.md - Forms package already referenced #34242
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
Conversation
guardrex
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See if my suggestion makes sense. I agree that the text is wrong, but a replacement could meet the original goal of making it clear what packages are important here.
| * Visual Studio: Right-click the solution file in **Solution Explorer** and select **Add** > **New project**. From the dialog of new project types, select **Razor Class Library**. Name the project `GrantImaharaRobotControls`. Do **not** select the **Support pages and view** checkbox. | ||
| * Visual Studio Code/.NET CLI: Execute `dotnet new razorclasslib -o GrantImaharaRobotControls` from a command prompt. The `-o|--output` option creates a folder and names the project `GrantImaharaRobotControls`. | ||
|
|
||
| The example component presented later in this section uses a [Blazor form](xref:blazor/forms/index). In the RCL project, add the [`Microsoft.AspNetCore.Components.Forms`](https://www.nuget.org/packages/Microsoft.AspNetCore.Components.Forms) package to the project. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be better to state what's going on with the packages here. This could say something like ...
The example component presented later in this section uses a [Blazor form](xref:blazor/forms/index). Because the RCL was created without supporting pages and views, the RCL includes a package reference for [`Microsoft.AspNetCore.Components.Web`](https://www.nuget.org/packages/Microsoft.AspNetCore.Components.Web), which transitivity includes the [`Microsoft.AspNetCore.Components.Forms`](https://www.nuget.org/packages/Microsoft.AspNetCore.Components.Forms) package.
[!INCLUDE[](~/includes/package-reference.md)]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you create the RCL with "Support pages and view" checked, the new project still successfully compiles the Robot.razor component (with <EditForm> and <InputRadioGroup>), most likely because of <FrameworkReference Include="Microsoft.AspNetCore.App" />.
Why do you think we need to include package-related info in the article?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Truly, it was just a passing concern. I didn't know what would happen in that configuration. Let's go ahead with your suggestion.
Co-authored-by: Luke Latham <[email protected]>
guardrex
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this! 🎉
The
Microsoft.AspNetCore.Components.Formspackage is already transitively referenced byMicrosoft.AspNetCore.Components.Webpackage (which is included in the RCL template). No need to add explicit reference toFormspackage.Internal previews