我最近使用 Dotfuscator CE 和 Visual Studio 2015 Update 3 混淆了一个 DLL。这是我使用的 Dotfuscator.xml 文件。
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE dotfuscator SYSTEM "http://www.preemptive.com/dotfuscator/dtd/dotfuscator_v2.3.dtd">
<dotfuscator version="2.3">
<propertylist>
<property name="SourceDirectory" value="This Path Will Be Replaced By Visual Studio" />
<property name="SourceFile" value="This Filename Will Be Replaced By Visual Studio" />
</propertylist>
<input>
<asmlist>
<inputassembly>
<option>library</option>
<file dir="${SourceDirectory}\" name="${SourceFile}" />
</inputassembly>
</asmlist>
</input>
<output>
<file dir="${SourceDirectory}\" />
</output>
</dotfuscator>
现在的问题是,混淆后的程序集包含一些存储在 Settings.settings 中的信息。文件,当我的代码尝试访问设置文件中的数据时,它失败并出现以下异常。
The settings property 'ProxyTestURL' was not found
这里是读取设置的语法:
Dim strURI As String = My.Settings.ProxyTestURL
我知道有一个类似的问题“Dotfuscator:混淆后出错”,但它似乎既不完整也不稳健,尽管我也把我的评论放在那里但在这里我希望得到第二意见和更稳健的解决方案将我的设置文件文字重命名为混淆名称(如那里所述)。
最佳答案
您应该从重命名中排除 My.Settings
。这样做的说明在 the docs 中。 .
关于c# - 混淆后从 Settings.settings 文件读取,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42222308/