Support for Net3.1, Net5, Net6 windows forms apps available when?
ak98
Posts: 8 Bronze 2
When I try to load a newly created netcore winforms app dll an error message is indicating unable to load runtime config.
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
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
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWindowsForms>true</UseWindowsForms>
</PropertyGroup>
Example assembly attributes for a netcore 3.1 dll
// Assembly WinFormsApp1, Version 1.0.0.0 [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows=true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETCoreApp,Version=v3.1", FrameworkDisplayName="")] [assembly: AssemblyCompany("WinFormsApp1")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("WinFormsApp1")] [assembly: AssemblyTitle("WinFormsApp1")] |
Example assembly attributes for a Net6 dll
// Assembly WinFormsApp1, Version 1.0.0.0 [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows=true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName="")] [assembly: AssemblyCompany("WinFormsApp1")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("WinFormsApp1")] [assembly: AssemblyTitle("WinFormsApp1")] [assembly: TargetPlatform("Windows7.0")] [assembly: SupportedOSPlatform("Windows7.0")] |
Am I missing something?
Is this a feature that will be added to smartassembly
my current version is 8.0.4.4860
Best Answer
-
ak98 Posts: 8 Bronze 2OK. 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"
Answers
?? may be of use
contents
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"
https://forum.red-gate.com/discussion/comment/166808/#Comment_166808
Not working for me with RTM .net6 on a WPF application with the paths:
<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>