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

Cannot read resources that depend on serialization #282

Open
textproofreading opened this issue Jul 13, 2020 · 1 comment
Open

Cannot read resources that depend on serialization #282

textproofreading opened this issue Jul 13, 2020 · 1 comment
Labels
more info needed up for grab Pull requests are welcome.

Comments

@textproofreading
Copy link

textproofreading commented Jul 13, 2020

I use obfuscar in my small and simple c# application with default config file.

My project has no any resources content , file / icon ...

The error message show as below:


Loading project obfuscar_settings.config...
Processing assembly: XXX, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
Loading assemblies...Extra framework folders: Done.

Hiding strings...

Renaming:  fields...Parameters...Properties...Events...Methods...Types...

Unhandled Exception: System.NotSupportedException: Cannot read resources that depend on serialization.
   at System.Resources.ResourceReader._LoadObjectV2(Int32 pos, ResourceTypeCode& typeCode)
   at System.Resources.ResourceReader.LoadObjectV2(Int32 pos, ResourceTypeCode& typeCode)
   at System.Resources.ResourceReader.ResourceEnumerator.get_Entry()
   at System.Resources.ResourceReader.ResourceEnumerator.get_Current()
   at System.Linq.Enumerable.CastIterator[TResult](IEnumerable source)+MoveNext()
   at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source, Int32& length)
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.OrderedEnumerable`1.GetEnumerator()+MoveNext()
   at Obfuscar.Obfuscator.GetXamlDocuments(AssemblyDefinition library) in E:\obfuscar\Obfuscar\Obfuscator.cs:line 723
   at Obfuscar.Obfuscator.RenameTypes() in E:\obfuscar\Obfuscar\Obfuscator.cs:line 523


before I send this post , I searched for a while , but still has no any clue for solve above problem .

thanks for you help.

@lextm lextm added more info needed up for grab Pull requests are welcome. labels Aug 22, 2020
@Budsy
Copy link

Budsy commented Apr 30, 2021

I had this error on an Azure VM, but the app ran fine on my development box. In my case, I only had to take out the window Icon and put it back to the null default. Now the app runs, but of course no icon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more info needed up for grab Pull requests are welcome.
Projects
None yet
Development

No branches or pull requests

3 participants