0

I am working on a .NET 8 WPF application that undergoes obfuscation using SmartAssembly. During the build, runtime.config.json is generated automatically, but SmartAssembly picks WindowsBase.dll from Microsoft.NETCore.App instead of Microsoft.WindowsDesktop.App, causing obfuscation errors. i.e. During obfuscation with SmartAssembly, WindowsBase.dll was being resolved from Microsoft.NETCore.App instead of Microsoft.WindowsDesktop.App, leading to an invalid symbol error.

To resolve this, I modified the framework order in runtime.config.json to ensure Microsoft.WindowsDesktop.App is listed before Microsoft.NETCore.App. This change resolved the obfuscation issue, but I want to confirm:

Is it safe to modify runtime.config.json manually post-build via a script? Can this impact runtime behavior on client machines, especially in framework-dependent deployments? Is there an official way to enforce framework resolution order during build instead of modifying runtime.config.json manually?

appName.rnutimeconfig.json file content changes

Environment: .NET 8.0 WPF Application Obfuscation Tool: SmartAssembly Windows 10/11 Deployment

1
  • Please don't post screenshots of code. Post the code itself and use the formatting tools here. Commented Apr 4 at 1:15

0

Your Answer

By clicking β€œPost Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.