-
Notifications
You must be signed in to change notification settings - Fork 25.1k
Closed
Labels
BlazorPri2Source - Docs.msDocs Customer feedback via GitHub IssueDocs Customer feedback via GitHub Issueaspnet-core/svcblazor/subsvcdoc-enhancement
Description
Description
I think the dummy class namespace should be set something other than what is written in the documentation. Because the compiler detects an already existing class with the same name.
The dummy class:
namespace BlazorSample.Localization;
public class SharedResource
{
}And the class generated from .resx:
namespace BlazorSample.Localization {
using System;
...
public class SharedResource {
private static global::System.Resources.ResourceManager resourceMan;
...Which throws:
Localization\SharedResource.Designer.cs(25,18,25,32): error CS0101: The namespace 'BlazorSample.Localization' already contains a definition for 'SharedResource'
If you change the namespace of the dummy class to the root namespace all will be well.
Page URL
Content source URL
https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/blazor/globalization-localization.md
Document ID
d6f07538-228e-9f96-680f-6c324caf11d6
Article author
Metadata
Metadata
Assignees
Labels
BlazorPri2Source - Docs.msDocs Customer feedback via GitHub IssueDocs Customer feedback via GitHub Issueaspnet-core/svcblazor/subsvcdoc-enhancement
Type
Projects
Status
Done