Closed ashahabov closed 2 years ago
You can always declare a library as external.
You can do that by adding external="true"
in the module
tag. Those attributes are considered dependencies and will not get obfuscated.
The second error still points to confuserex being unable to find a specific type. Where is Windows.Foundation.Collections.IMapView
2` located? You may need to add that library as well to the project.
Windows.Foundation.Collections.IMapView
also in the same Windows.winmd library.
Regard external=true
attribute, if I use it:
<project baseDir="obj\Release" outputDir="..\Release" xmlns="http://confuser.codeplex.com">
<rule pattern="true" preset="aggressive" />
<module path="MyProduct.exe">
<rule pattern="true" preset="aggressive" inherit="false"></rule>
</module>
<module path="..\..\..\libs\Windows.winmd" external="true"></module>
</project>
it does not affect — it still throws initial exception about Windows.Storage.Streams.InMemoryRandomAccessStream::Dispose()
:
Confuser.MSBuild.targets(69, 5): Could not resolve method: System.Void Windows.Storage.Streams.InMemoryRandomAccessStream::Dispose() (Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime)
There is a bug in 1.5 that may cause this. Could you give the 1.6 RC version a try. This should sort it out.
I was able to resolve this issue with "ref proxy".mode=strong
setting. Here is my work .crproj:
<project baseDir="obj\Release" outputDir="..\Release" xmlns="http://confuser.codeplex.com">
<rule pattern="true" preset="aggressive" inherit="false" />
<module path="MyProduct.exe">
<rule pattern="true" preset="aggressive" inherit="false">
<protection id="ref proxy">
<argument name="mode" value="strong" />
</protection>
</rule>
</module>
</project>
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
*.csproj v1
Here is my initial *.csproj file:
Build fails with:
My application uses
Windows.winmd
library.*.csproj v2
Now I am trying to avoid
Windows.winmd
obfuscation with the following updates:This also failed, but this time on the other type:
Since
Windows.winmd
does not relate to my business code, I would like to avoid obfuscation for that. Is it possible? Or how I can resolve the latest issue?