k1tbyte/Wand-Enhancer · critical · Exception
[ENHANCER] Proxy DLL resource not found
Error message
[ENHANCER] Proxy DLL resource not found
What it means
AttachProxyDll loads the embedded resource named 'proxydll' (Constants.ProxyDllResouceName) which is the version.dll proxy dropped into the WeMod root to load enhancer code into Wand. A null stream means the resource is not embedded in the assembly.
Source
Thrown at WandEnhancer/Core/Enhancer.cs:427
: 0;
if (defaultScriptCount == 0)
{
throw new FileNotFoundException("[ENHANCER] Remote renderer script artifacts are missing. Run `cd web-panel && pnpm run build` before patching.", targetScriptsRoot);
}
int selectedScriptCount = CopySelectedJavaScriptFiles(_config.CustomScriptPaths, targetScriptsRoot);
int localScriptCount = CopyJavaScriptFiles(localCustomScriptsRoot, targetScriptsRoot);
_logger($"[ENHANCER] Injected remote panel assets and renderer scripts into app.asar (default: {defaultScriptCount}, selected: {selectedScriptCount}, local: {localScriptCount})", ELogType.Info);
}
private void AttachProxyDll()
{
var assembly = Assembly.GetExecutingAssembly();
var dll = assembly.GetManifestResourceStream(Constants.ProxyDllResouceName);
if (dll == null)
{
throw new Exception("[ENHANCER] Proxy DLL resource not found");
}
var destPath = Path.Combine(_weModConfig.RootDirectory, "version.dll");
using (var fileStream = File.Create(destPath))
{
dll.CopyTo(fileStream);
}
_logger("[ENHANCER] Proxy DLL attached", ELogType.Info);
}
public void Patch()
{
Common.TryKillProcess(_weModConfig.BrandName);
if (!File.Exists(_backupPath))
{
_logger("[ENHANCER] Creating backup...", ELogType.Info);
File.Copy(_asarPath, _backupPath);
}
elseView on GitHub (pinned to 643c8f8b62)
Solutions
- Confirm the .csproj has an EmbeddedResource entry for the proxy DLL with LogicalName 'proxydll' (matching Constants.ProxyDllResouceName).
- Ensure the proxydll binary exists at the expected source path.
- Rebuild the solution.
- Verify with a scratch probe: Assembly.GetExecutingAssembly().GetManifestResourceNames() must list 'proxydll'.
Example fix
<!-- .csproj -->
<!-- before: resource missing -->
<!-- after: -->
<ItemGroup>
<EmbeddedResource Include="proxydll\version.dll">
<LogicalName>proxydll</LogicalName>
</EmbeddedResource>
</ItemGroup> Defensive patterns
Strategy: validation
Validate before calling
// Assert the proxy DLL is embedded before exposing the patch action
bool hasProxy = Assembly.GetExecutingAssembly()
.GetManifestResourceStream(Constants.ProxyDllResouceName) != null;
if (!hasProxy) throw new InvalidOperationException("proxydll resource not embedded; rebuild the C# project."); Try / catch
try { enhancer.Patch(); }
catch (Exception ex) when (ex.Message == "[ENHANCER] Proxy DLL resource not found") {
// rebuild with the EmbeddedResource + LogicalName 'proxydll'
} Prevention
- Add a unit test asserting GetManifestResourceStream("proxydll") is non-null.
- Keep the .csproj EmbeddedResource LogicalName aligned with Constants.ProxyDllResouceName.
- Fail the build if the proxy DLL binary is missing from source.
When it happens
Trigger: AttachProxyDll() at Enhancer.cs:423-428 during Enhancer.Patch(): assembly.GetManifestResourceStream("proxydll") returns null.
Common situations: The .csproj does not include proxydll as an EmbeddedResource (or lacks LogicalName 'proxydll'); the binary was renamed/removed from source; the build configuration excludes it; building from a fork that lacks the proxy DLL.
Related errors
- Required workspace artifact not found: {Path.Combine(segment
- Embedded resource not found: {resourceName}
- [ENHANCER] Remote bridge artifact is missing. Run `cd web-pa
- [ENHANCER] Remote renderer script artifacts are missing. Run
AI-assisted analysis of k1tbyte/Wand-Enhancer@643c8f8b62 (2026-08-13).
Data as JSON: /api/errors/10d1ea39959fbdb2.
Report an issue: GitHub.