1、When I was testing this feature, I found that if the name of the project contains a space, it will report an error when publishing, please check, thank you.
pic.png (50.85 KiB) Viewed 9449 times
2、At the same time, how to use functions such as 'Memory Protection', 'Debugger', 'Virtualization Tools Found' message, etc., which can be directly used in the gui?
It seems you don't need our software, because you can't even solve such a "simple problem" by yourself. I don't understand why you think that "Wpf App.exe" is a VMProtect project file.
Admin wrote: ↑Fri Dec 29, 2023 2:29 pm
It seems you don't need our software, because you can't even solve such a "simple problem" by yourself. I don't understand why you think that "Wpf App.exe" is a VMProtect project file.
Thank you very much, I successfully solved the problem, it was indeed that I used the wrong code.
ps. My English is not good, and I am not very familiar with this software, but now I understand what VMProtect project file is. Anyway, thank you again for your patient answer.
I have two questions about PublishSingleFile=true.
1. Am I correct in assuming the console version is being used here?
And it won't work with a Lite license?
2. I get the error:
[Error] Can't resolve assembly "Avalonia.Controls, Version=11.3.7.0, Culture=neutral, PublicKeyToken=c8d484a7012f9a8b"
namespae Avalonia.Controls is located in the Avalonia.dll assembly, which was added to the package as a NuGet package.
What should I do to make VMProtect see it?
I have the following structure in the .exe container:
cnc.dll - executable code with "main" function.
com.dll - assembly - where the main code is, included from cnc.dll
It's com.dll that needs to be protected.
I can't protect it even without linking to SingleFile.
Now I'm trying it on a regular Net application (without SingleFile).
And if I run VMProtect.exe on cnc.dll, everything is fine.
But if VMProtect.exe tries to protect com.dll, I get the error:
Can't resolve type "System.Byte[], System.Runtime, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" (token: 0xc0000eb)
So, it turns out that included assemblies can't be protected?
Only the executable assembly can?
Is there a way out of this situation?
I rebuilt the application to use a single executable DLL, but it didn't help.
The error persists:
Can't resolve type "System.Byte[], System.Runtime, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" (token: 0xc0000eb)
On the GUI on SinglFile:
Now the same thing, but with "CommunityToolkit.Mvvm".
And this assembly is in "Imports" too.
???
If I run a simple application (not a SinglFile) from the GUI, compilation succeeds.
But the application won't launch.
PS: In the code, I only set:
[Obfuscation(Feature = "strings", Exclude = false)].
And I didn't enable virtualization.
What could be causing it not to launch?
PS: In the Windows logs:
Application: JupiterCNC.exe
CoreCLR Version: 9.0.1025.47515
.NET Version: 9.0.10
Description: The process was terminated due to an unhandled exception. Exception Info: System.TypeLoadException: Could not load type 'System.DoubleNumerics.Vector3' from assembly 'JupiterCNC, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' due to value type mismatch.
at System.Signature.GetSignature(Void* pCorSig, Int32 cCorSig, RuntimeFieldHandleInternal fieldHandle, IRuntimeMethodInfo methodHandle, RuntimeType declaringType)
at System.Reflection.RuntimeMethodInfo.<get_Signature>g__LazyCreateSignature|25_0()
at System.Reflection.RuntimeMethodInfo.FetchNonReturnParameters()
at System.Reflection.RuntimeMethodInfo.GetParameters()
at InvokeStub_(Object, Span`1)
at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.Emit.DynamicMethod.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at 563F5FA9.0FB29B3A()
at 563F5FA9.2EA869A8(Object 578EBD3D, Int32 7C01B93D)
--- End of stack trace from previous location ---
at 563F5FA9.4AB1E91F.F3333F1E(Object DFADEC00)
at 563F5FA9.2EA869A8(Object 578EBD3D, Int32 7C01B93D)
at 563F5FA9.DA17ED05()
at 563F5FA9.2EA869A8(Object 578EBD3D, Int32 7C01B93D)
--- End of stack trace from previous location ---
at 563F5FA9.4AB1E91F.F3333F1E(Object DFADEC00)
at 563F5FA9.2EA869A8(Object 578EBD3D, Int32 7C01B93D)
at .cctor()
PS: System.DoubleNumerics.dll is located in the bin directory, where 'System.DoubleNumerics.Vector3' is defined.
You wrote: >You should exclude renaming for all classes used in reflection
I don't use Reflection anywhere in my code.
But I tried adding the tag to the project file:
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>
But it didn't work, the error was the same: Could not load type 'System.DoubleNumerics.Vector3'
And the docs for "AutoGenerateBindingRedirects" say: It doesn't apply to newer implementations of .NET, including .NET 6 and later versions.
So, you can no longer disable it in .NET projects.
Or did you mean something else, not "AutoGenerateBindingRedirects"?
You wrote: >or switch off the "Strip debug information" option
Disabled in the GUI.
This also didn't work, the same error: Could not load type 'System.DoubleNumerics.Vector3'
I checked with the following debug information types:
<DebugType>portable</DebugType>
<DebugType>full</DebugType>-
<DebugType>embedded</DebugType>