Invalid Resx file error after adding Resx files in Resources folder
Hello,
I am unable to add different languages to my Blazor application. I followed the instructions on the page Localization of Blazor Components
However, I am unable to open the SfResources.resx file. The following message appears:
MSB3103 Invalid Resx file. System.Xml.XmlException: '>' is an unexpected token. The expected token is '='. Line 25, position 76.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.ParseAttributes()
at System.Xml.XmlTextReaderImpl.ParseElement()
at System.Xml.XmlTextReaderImpl.ParseElementContent()
at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r)
at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r, LoadOptions o)
at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
at Microsoft.Build.Tasks.ResourceHandling.MSBuildResXReader.ReadResources(Stream s, String filename, Boolean pathsRelativeToBasePath, TaskLoggingHelper log, Boolean logWarningForBinaryFormatter)
How can I resolve this issue?
Hi Gasser,
Greetings from Syncfusion Support!
We have reviewed your query regarding the Invalid Resx file error while enabling localization in your Blazor application. We attempted to replicate the issue in our local environment following the same steps, but the error did not occur on our end. For your reference, we have attached a sample project where localization works without any issues.
Also, based on the error details you provided, we suspect that the issue might be caused by an unexpected character (>), as indicated in line number 25 of your SfResources.resx. To resolve this, please remove the extra or invalid character from that line and try again.
If you are still encountering the error, kindly share the following details so we can provide a quick and accurate solution:
- A replicable sample of your project where the issue occurs
- The specific control(s) you are using
- The Resx file you added (or its contents)
This information will help us identify the root cause and provide you with an appropriate fix.
Looking forward to your response.
Regards,
Karthikeyan P
Attachment: LocalizationResx_20b4a3a2.zip
Hello Karthikeyan,
Thank you very much for your reply.
After analyzing the issue, it turns out that I downloaded the source code for the HTML page that displays the contents of the SFResources.resx file, rather than the contents of the resx file itself, as the GitHub site allows.
I am very sorry to have bothered you with such a simple mistake on my part.
You can close the ticket; the solution proposed in the documentation works very well.
Best regards,
J-D Gasser
Hi Gasser,
You're welcome. Please get back to us if you need further assistance.
Regards,
Karthikeyan P
- 3 Replies
- 3 Participants
-
GA Gasser
- Dec 14, 2025 05:01 PM UTC
- Dec 18, 2025 05:39 AM UTC