Comments
7 comments
-
Followup : I found this file 'WinFormsApp1.runtimeconfig.json' in the output folder along with the dll
?? may be of use
contents{ "runtimeOptions": { "tfm": "net6.0", "frameworks": [ { "name": "Microsoft.NETCore.App", "version": "6.0.0-rc.1.21451.13" }, { "name": "Microsoft.WindowsDesktop.App", "version": "6.0.0-rc.1.21451.3" } ], "configProperties": { "System.Reflection.Metadata.MetadataUpdater.IsSupported": false } } }
-
OK. hacking in to this
Pointed the UI at dll in the obj folder not bin folder
SA UI then complained about not able to find dependencies
added these dll search paths (dont point to individual files)C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\6.0.0-rc.1.21451.3C:\Program Files\dotnet\shared\Microsoft.NETCore.App\6.0.0-rc.1.21451.13
can now obfuscate a basic forms app with smartassembly
note that the SA Configuration for search paths is kept in
"C:\ProgramData\Red Gate\SmartAssembly 8\SmartAssembly.settings"
-
WARNING WARNING WARNING
Although this works , having the core framework paths in the search path will screw up subsequent DotNet Framwwork builds in a BAD way.
DNF builds complete without warnings but the application will not run and will crash silently on startup due to missing references to version 6 DLL's on client machines.
Needless to say, this will really ruin your day if you deploy both Net6 and DNF applications and you must manually alter the reference paths -- ie remove NET6 reference paths from smartassembly before obfuscating Ditnet framwork applications.
note that the SA Configuration for search paths is kept in
"C:\ProgramData\Red Gate\SmartAssembly 8\SmartAssembly.settings"
-
With the release of .NET 6 this week, it would be great if this could be resolved. It seems that if you publish your app as self-contained, SmartAssembly works with a WinForms application, but it fails as described above when publishing as framework-dependent.
-
@orudge An answer from a person from RedGate saying that there is no information at the moment on .net6 support
https://forum.red-gate.com/discussion/comment/166808/#Comment_166808
-
ak98 said:OK. hacking in to this
Pointed the UI at dll in the obj folder not bin folder
SA UI then complained about not able to find dependencies
added these dll search paths (dont point to individual files)C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\6.0.0-rc.1.21451.3C:\Program Files\dotnet\shared\Microsoft.NETCore.App\6.0.0-rc.1.21451.13
can now obfuscate a basic forms app with smartassembly
note that the SA Configuration for search paths is kept in
"C:\ProgramData\Red Gate\SmartAssembly 8\SmartAssembly.settings"
Not working for me with RTM .net6 on a WPF application with the paths:<SearchPath>C:\Program Files\dotnet\shared\Microsoft.NETCore.App\6.0.0</SearchPath>
<SearchPath>C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\6.0.0</SearchPath>Workaround is working. See my next message below...
-
Finally the workaround described above is working.In my case, I had to reorder the paths because it contains a file with a same name but one was good and not the other. So, for me, the good order is:
<SearchPath>C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\6.0.0</SearchPath>
<SearchPath>C:\Program Files\dotnet\shared\Microsoft.NETCore.App\6.0.0</SearchPath>
And I also had to add the full `\bin\Release` path so that it could find the missing dlls....
Add comment
Please sign in to leave a comment.
This happens with blank / new winforms apps created in netcore 3.1/5/6 having no other dependencies than netcore winforms.
Can the runtime config be configured?
example project in netcore 6
Example assembly attributes for a netcore 3.1 dll
Example assembly attributes for a Net6 dll
Am I missing something?
Is this a feature that will be added to smartassembly
my current version is 8.0.4.4860