Supported target platforms
(Hello and many thanks in advance)
I have got problems with a library targeting to the dotnet 4.7.1 platform
• Using https://github.com/mkaring/ConfuserEx.git (release/2.0) • ConfuserEx.CLi.exe • Simple project file:
Problem: • Looking into the output with dotpeek => no confusion takes place • Doing the same stuff with the library targeting to dotnet 4.5.1 => the confusion takes place
Another problem: • Another library targeting to dotnet standard 2.0 confused by confuserEx causes a System.TypeLoadException on startup
Question: Is dotnet standard 2.0 and dotnet 4.7.1 generally supported?
Hello,
.NET Framework is fully supported. The support for the very old versions (1.0 - 2.0) is very limited, but later than that it works. The support for .NET Standard 2.0 is at time a little problematic, because ConfuserEx is not yet able to properly handle the additional dependency reference files that are created for .NET Standard and .NET Core builds.
The problem with .NET Standard 2.0 you describe may be cause by the wrong assemblies being used. In that case it usually helps to add all the reference assemblies to the ConfuserEx project file as external references.
As for the first project, I can't help you with the information I got... I think you tried to attach a project file but something went wrong. If you add the project file I may be able to help more.
attached the project file(at the initial post) i am using for the test with only a few basic entries (for the library build with 4.5.1 it does the trick for 4.7.1 not)
for the .net standard problem:
In that case it usually helps to add all the reference assemblies to the ConfuserEx project file as external references. do you have an example?? do you mean "probePath" ??
many thanks
In your project file there is something very wrong with the base directory.
The path C:\...\someone.Common.Busconfig\bin\Release is illegal. You can't "go up" on directory from the root drive.
sorry for confusion, i only minified it a little bit. please ignore the path, it is not exact the version i used.
the tool runs without any error message and the outfile is created with my version ... but it can still be read without obfuscation by dotpeek (the 4.7.1 version)
I see. It's still difficult to say what the actual issue is. I tested it with a random .NET 4.7.1 application and everything seems to work.
A relatively common “problem“ is the debug symbol file (*.pdb) that is next to the assembly. Those files often contain the path to the original source files. If that file is present dotpeek simply shows the original source file.
Maybe that is the problem I your case?
Good morning
I did some additional tests. My current assumption. My problems are related to use of .netstandard libraries. For testing I switched over a former .netstandard lib to 4.71 and checked the confusion output for both:
- .netstandard does not work (still readable and processed without ERROR message)
- 4.7.1 does (no matter whether the pdb file is next to the dll)
Do you have a running Confuser.CLI project file example processing .netstandard libraries ??
Hello,
I noticed a problem in relation to the .NET Standard/.NET Core projects yesterday that is related to the extensive usage of type redirects in the .NET Standard libraries. This problem seems to originate in dnlib (the library used to process the assemblies). I'll get back to you once I know more. The problem with the current 2.0 branch is that it at times does not show the last error message in the log. So there may be a problem, but it's just now showing it.
I think I found the issue that was causing trouble with your .NET Standard assembly, but I seems to have created a problem with the reference proxy protection I am still trying to track down. If you want to you can try to build ConfuserEx yourself, because the build server is right now not producing any new assemblies due to the problem. I'll try to fix this asap.
Hi & Many thanks
So, i need to disable protection "ref proxy" in order to test the current version? I will test your fixes as soon as you are finished. Any prediction when we may expect ...??
@duhtmep The current snapshot version of the release/2.0 branch is on working order, You can try it.
H, I have the same problem. I using version 1.2.0. is it fixed there? or should i downlod the sourcecode and build a new exe? Please advice
@AlenToma The "fix" (I am not sure if that is actually this bug that has been fixed) is only the release/2.0 branch.
Find the build assemblies on the buildserver
The problem im having with netstandard 2.0 using it with xamarin.android is that the app crash when i use ConfuserEx on my netstandard 2.0.
I dont really understand why.
ConfuserEx dose not even throw an error what so ever.
I spend the whole day trying to figure out the problem without any solution :)
By the way the release on the build server thrwo an error
Unexpected error:
Microsoft.Extensions.CommandLineUtils.CommandParsingException: Unrecognized option '-n'
at Microsoft.Extensions.CommandLineUtils.CommandLineApplication.HandleUnexpectedArg(CommandLineApplication command, String[] args, Int32 index, String argTypeName)
at Microsoft.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
at Confuser.CLI.Program.Main(String[] args) in C:\projects\confuserex\Confuser.CLI\Program.cs:line 138
Could you please help me figure this out?
Here you can see the dll the orginal one and the one generated by ConfuserEx
https://mega.nz/#!k4RFCQKJ!4t4S3Px2KA-8TNOPzHiB86yYn6ePZto7EpkLS5VSaYg
Im using those settings, please feel free to tell me what is wrong
<project outputDir="E:\Projects\Youtube.Manager\Youtube.Manager\Youtube.Manager.Droid\obj\Release\90\android\assets\temp" baseDir="E:\Projects\Youtube.Manager\Youtube.Manager\Youtube.Manager.Droid\obj\Release\90\android\assets" xmlns="http://confuser.codeplex.com">
<module path="Youtube.Manager.Models.Container.dll">
<rule pattern="true" preset="none" inherit ="false">
<protection id="anti debug" />
<protection id="anti ildasm" />
<protection id="constants" />
<protection id="ctrl flow" />
<protection id="ref proxy" />
<protection id="rename">
<argument name="mode" value="letters" />
</protection>
</rule>
</module>
</project>
ConfuserEx work greet with my xamarin.android project but not with netstandard 2.0.
Never mind, found the problem, i hade to remove rename and ref proxy for it to work.
Really bad but hade no choice :)
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.