[GH-ISSUE #19] System.Xml.XmlException: 'Data at the root level is invalid. Line 1, position 1.' #16

Open
opened 2026-02-26 01:35:47 +03:00 by kerem · 1 comment
Owner

Originally created by @alejo9010 on GitHub (Sep 14, 2021).
Original GitHub issue: https://github.com/junian/Standard.Licensing/issues/19

anyone knows how to fix this issue please? im triying the default license generator from the guide, but im getting this in my app.

Originally created by @alejo9010 on GitHub (Sep 14, 2021). Original GitHub issue: https://github.com/junian/Standard.Licensing/issues/19 anyone knows how to fix this issue please? im triying the default license generator from the guide, but im getting this in my app.
Author
Owner

@itsjoshsmith commented on GitHub (Oct 6, 2021):

The load function seems to want the XML string rather than the file path, its not very clear in the docs. See code below;

using System.IO;

string xml = File.ReadAllText("License.lic");
var license = License.Load(xml);

That should work.

<!-- gh-comment-id:936261157 --> @itsjoshsmith commented on GitHub (Oct 6, 2021): The load function seems to want the XML string rather than the file path, its not very clear in the docs. See code below; `using System.IO;` `string xml = File.ReadAllText("License.lic");` `var license = License.Load(xml);` That should work.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Standard.Licensing#16
No description provided.