VS2022 Blazor WebAssembly 发布前对自己的dll进行混淆

1. 新建DotfuscatorCE混淆xml,放在项目的bin文件夹中

2. 在项目属性的”生成后事件“复制下述命令行:

if $(ConfigurationName)==Release "D:Program Files (x86)Microsoft Visual Studio2019CommunityCommon7IDEExtensionsPreEmptiveSolutionsDotfuscatorCEdotfuscator.exe" /q "$(ProjectDir)binDotfuscator1.xml"
if $(ConfigurationName)==Release xcopy /e /y "$(ProjectDir)binDotfuscated*.*" "$(ProjectDir)objRelease et6.0"

红字的地方较特殊,即不能复制到 inRelease et6.0 下,否则发布程序读到的不是混淆后的dll

原文地址:https://www.cnblogs.com/fjwuyongzhi/p/15379154.html