I have a JSON class like this:
public class UpdateCheck
{
public bool UpdatesAvailable { get; set; }
public string LinkOfNewVersion { get; set; }
}
But the value of UpdatesAvailable
and LinkOfNewVersion
are null when I confuse my assembly using ConfuserEx :/
I've tried all the following:
Adding the [Obfuscation(Exclude = false, Feature = "-rename")]
attribute above my JSON class:
[Obfuscation(Exclude = false, Feature = "-rename")]
public class UpdateCheck
{
public bool UpdatesAvailable { get; set; }
public string LinkOfNewVersion { get; set; }
}
Adding the [Serializable]
attribute above my JSON class:
[Serializable]
public class UpdateCheck
{
public bool UpdatesAvailable { get; set; }
public string LinkOfNewVersion { get; set; }
}
Adding both attributes above my JSON class:
[Serializable]
[Obfuscation(Exclude = false, Feature = "-rename")]
public class UpdateCheck
{
public bool UpdatesAvailable { get; set; }
public string LinkOfNewVersion { get; set; }
}
But all what I've tried failed :/
My obfuscation properties:
<rule pattern="true" preset="maximum" inherit="false">
<protection id="anti ildasm" />
<protection id="anti tamper" />
<protection id="constants" />
<protection id="ctrl flow" />
<protection id="anti dump" />
<protection id="anti debug" />
<protection id="invalid metadata" />
<protection id="ref proxy" />
<protection id="resources" />
<protection id="typescramble" />
<protection id="rename" />
</rule>
And when I remove the "rename" protection from my ConfuserEx config file, my assembly crashes like that:
Any help would be appreciated.
Thanks!