Skip to content

Commit c701767

Browse files
authored
Merge 7ec06ab into 657fb58
2 parents 657fb58 + 7ec06ab commit c701767

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Confuser.Core/Confuser.Core.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<TargetFrameworks>net461;netstandard2.0</TargetFrameworks>
88
<SignAssembly>true</SignAssembly>
99
<AssemblyOriginatorKeyFile>..\ConfuserEx.snk</AssemblyOriginatorKeyFile>
10+
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
1011
</PropertyGroup>
1112

1213
<PropertyGroup Label="Assembly Information">

Confuser.Core/PluginDiscovery.cs

+4-3
Original file line numberDiff line numberDiff line change
@@ -98,24 +98,25 @@ protected virtual void GetPluginsInternal(
9898
ConfuserContext context, IList<Protection> protections,
9999
IList<Packer> packers, IList<ConfuserComponent> components) {
100100
protections.Add(new WatermarkingProtection());
101+
var currentAssemblyLocation = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
101102
try {
102-
Assembly protAsm = Assembly.Load("Confuser.Protections");
103+
Assembly protAsm = Assembly.LoadFrom($"{currentAssemblyLocation}/Confuser.Protections.dll");
103104
AddPlugins(context, protections, packers, components, protAsm);
104105
}
105106
catch (Exception ex) {
106107
context.Logger.WarnException("Failed to load built-in protections.", ex);
107108
}
108109

109110
try {
110-
Assembly renameAsm = Assembly.Load("Confuser.Renamer");
111+
Assembly renameAsm = Assembly.LoadFrom($"{currentAssemblyLocation}/Confuser.Renamer.dll");
111112
AddPlugins(context, protections, packers, components, renameAsm);
112113
}
113114
catch (Exception ex) {
114115
context.Logger.WarnException("Failed to load renamer.", ex);
115116
}
116117

117118
try {
118-
Assembly renameAsm = Assembly.Load("Confuser.DynCipher");
119+
Assembly renameAsm = Assembly.LoadFrom($"{currentAssemblyLocation}/Confuser.DynCipher.dll");
119120
AddPlugins(context, protections, packers, components, renameAsm);
120121
}
121122
catch (Exception ex) {

0 commit comments

Comments
 (0)