You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Investigate the missing file issue in MonacoRoslynCompletionProvider/Extensions
Identify if it's a file name typo or reference issue
Fix the build error by configuring the file to be copied during publish
Test the fix
Commit and push changes
Provide PR creation link
Problem:
The file ObjectExtengsion.cs exists in the source code but was not being copied to the output directory during publish/build. The CodeRunner.cs (lines 92-107) tries to locate this file at runtime using LocateObjectExtensionsFilePath(), but it wasn't included in the published output, causing the error: "Unable to locate MonacoRoslynCompletionProvider/Extensions/ObjectExtengsion.cs for publish runtime extensions."
Solution:
Added a <Content> item group in MonacoRoslynCompletionProvider.csproj to ensure the ObjectExtengsion.cs file is copied to the output directory:
Activity
gaoconggit commentedon Oct 17, 2025
@claude 解决这个问题
claude commentedon Oct 17, 2025
Claude finished @gaoconggit's task —— View job •
claude/issue-58-20251017-0011• Create PR ➔Fixed Build Error ✓
Tasks:
Problem:
The file
ObjectExtengsion.csexists in the source code but was not being copied to the output directory during publish/build. TheCodeRunner.cs(lines 92-107) tries to locate this file at runtime usingLocateObjectExtensionsFilePath(), but it wasn't included in the published output, causing the error: "Unable to locate MonacoRoslynCompletionProvider/Extensions/ObjectExtengsion.cs for publish runtime extensions."Solution:
Added a
<Content>item group inMonacoRoslynCompletionProvider.csprojto ensure theObjectExtengsion.csfile is copied to the output directory:Verification:
bin/Release/net9.0/Extensions/ObjectExtengsion.csChanges Made:
MonacoRoslynCompletionProvider/MonacoRoslynCompletionProvider.csprojto include the Extensions file as contentJob run | Branch
fix: 确保 ObjectExtengsion.cs 文件在发布时被复制到输出目录
gaoconggit commentedon Oct 17, 2025
@claude 这个方案不太好,感觉有安全隐患
claude commentedon Oct 17, 2025
Claude finished @gaoconggit's task —— View job •
claude/issue-58-20251017-0052• Create PR ➔Fixed Security Issue with Embedded Resources ✓
Tasks:
Security Issue Identified
您说得对!之前的方案确实存在安全隐患:
.cs源文件复制到发布输出会在生产环境中暴露源代码之前的代码 (
CodeRunner.cs:79-80) 在运行时读取源文件以将扩展方法注入到用户代码中。Implemented Solution: Embedded Resources
新的解决方案使用嵌入式资源:
MonacoRoslynCompletionProvider.csproj 修改:
CodeRunner.cs 修改:
LocateObjectExtensionsFilePath())LoadObjectExtensionsFromEmbeddedResource()方法从程序集的嵌入式资源中读取安全优势
Build Verification
Job run | Branch