Skip to content

Fix config save failure when Impl assembly is loaded from memory#32

Open
steveviuv wants to merge 1 commit into
AgentSmithers:masterfrom
steveviuv:fix-config-save-failure
Open

Fix config save failure when Impl assembly is loaded from memory#32
steveviuv wants to merge 1 commit into
AgentSmithers:masterfrom
steveviuv:fix-config-save-failure

Conversation

@steveviuv
Copy link
Copy Markdown

McpServerConfig previously relied on Assembly.Location to build the
config file path. In debug/unloadable mode, the Impl assembly may be
loaded from memory, which can leave Assembly.Location empty and cause
"The path is not of a legal form." when saving config.

Fall back to AppDomain.CurrentDomain.BaseDirectory and then
Environment.CurrentDirectory when the assembly path is unavailable.

McpServerConfig.ConfigPath previously relied on Assembly.Location
In debug / unloadable mode, the Impl assembly may be loaded from memory
This can make Assembly.Location empty and cause The path is not of a legal form.
Fix by falling back to AppDomain.CurrentDomain.BaseDirectory and then Environment.CurrentDirectory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant