On main site it says it supports .NET (Core) but I cannot get a protected app to run. A .NET 6 (former known as .NET Core) application, just like on .NET Core 3.1, has
[]the .NET DLL file
[]a native host executable
If I protect the .NET dll file the native host executable cannot launch it, because its no longer .NET. Protecting the native host executable is kinda useless since all the code is within the .NET dll file. I can also publish my .NET app as a single file + self contained which generates a large 130mb single executable. But after protecting it its only a 5mb large executable, it seems that it has removed all the bundled .NET files from the single file.
So my question since there is nothing about this in the documentation: How to protect a .NET (6 / 5 / Core 3.1) application?
As you can see my .NET test application is the WpfApp10.dll file. WpfApp10.exe is the native host which checks for .NET 6 runtime, then host and launch the dll file. I need to basically protect the WpfApp10.dll file and it should still get launched via WpfApp10.exe but its not. With .NET 3.1 Core and still with .NET 6 there are no .NET executables anymore. Its always the bundle of .NET dll and native host executable. As I said before I can publish as single file (this sadly requires to also publish as self contained so I cannot attach it as it would be 130mb large but I can share project files and tell you how to generate this single file). As far as I know single file just embeds all the .NET files into the native host application and then load them from memory on start. Protecting such a single file however removes all the embedded .NET files. So this doesn’t work as well. net6.0-windows.zip (78.4 KB)
You are right, now it also works fine here. My main application now also works except of:
“Pack the output file” is checked. In this case I don’t even get the demo messagebox of VMP on start. Nothing happens if I double click the executable the process just disappears in task manager
I figured out its because of using Eazfuscator as .NET obfuscator. Only using VMP as protection there still an issue with using “Strip debug information” as I’m getting this after the VMP demo messagebox:
System.Windows.Markup.XamlParseException: The method or operation is not implemented.
---> System.NotImplementedException: The method or operation is not implemented.
at System.Windows.Baml2006.Baml2006SchemaContext.ResolveBamlType(BamlType bamlType, Int16 typeId)
at System.Windows.Baml2006.Baml2006SchemaContext.GetXamlType(Int16 typeId)
at System.Windows.Baml2006.Baml2006SchemaContext.GetProperty(Int16 propertyId, XamlType parentType)
at System.Windows.Baml2006.Baml2006Reader.Process_PropertyWithConverter()
at System.Windows.Baml2006.Baml2006Reader.Process_OneBamlRecord()
at System.Windows.Baml2006.Baml2006Reader.Process_BamlRecords()
at System.Windows.Baml2006.Baml2006Reader.Read()
at System.Windows.Markup.WpfXamlLoader.TransformNodes(XamlReader xamlReader, XamlObjectWriter xamlWriter, Boolean onlyLoadOneNode, Boolean skipJournaledProperties, Boolean shouldPassLineNumberInfo, IXamlLineInfo xamlLineInfo, IXamlLineInfoConsumer xamlLineInfoConsumer, XamlContextStack`1 stack, IStyleConnector styleConnector)
at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
Are you sure that you try the latest demo version (3.5.1.1343)? It seems you use 3.5.0 or older version because the latest demo version works with your latest example without any problems.