运行后出现bug

BUG反馈 · 326 次浏览
Wanpeng 创建于 2022-06-08 11:10

c:\Users\13206\AppData\Local\Temp\CSSCRIPT\dynamic\18984.f51d346a-aed9-458b-9238-82792dcf8f2c.tmp(23,11): error CS1061: “Microsoft.Office.Interop.Word.Range”不包含“SetStyleIfExist”的定义,并且找不到可接受类型为“Microsoft.Office.Interop.Word.Range”的第一个参数的扩展方法“SetStyleIfExist”(是否缺少 using 指令或程序集引用?)

   在 csscript.CSExecutor.ProcessCompilingResult(CompilerResults results, CompilerParameters compilerParams, ScriptParser parser, String scriptFileName, String assemblyFileName, String[] additionalDependencies)
   在 csscript.CSExecutor.Compile(String scriptFileName)
   在 csscript.CSExecutor.Compile(String scriptFile, String assemblyFile, Boolean debugBuild)
   在 CSScriptLibrary.CSScript.LoadWithConfig(String scriptFile, String assemblyFile, Boolean debugBuild, Settings scriptSettings, String compilerOptions, String[] refAssemblies)
   在 CSScriptLibrary.CSScript.LoadCode(String scriptText, String tempFileExtension, String assemblyFile, Boolean debugBuild, String[] refAssemblies)
   在 CSScriptLibrary.CodeDomEvaluator.CompileCode(String scriptText)
   在 CSScriptLibrary.CodeDomEvaluator.CompileMethod(String code)
   在 Cesar.Office.Interop.Program.<>c.<RunScriptByCsScript>b__10_0(String code) 位置 G:\笔记本\04-Code\CSharp\01-Office\Cesar.Office.Interop\Cesar.Office.Interop\Program.cs:行号 349
   在 Cesar.Lib.Helper.CsCacheHelper.GetAssembly(String script, CompileFunc compileFunc, String referenceAssembly, Boolean useCache) 位置 E:\04Code\CSharp\01-Library\Cesar.Lib\Cesar.Lib\Helper\CsCacheHelper.cs:行号 42
   在 Cesar.Office.Interop.Program.RunScriptByCsScript(String script, Dictionary`2 param) 位置 G:\笔记本\04-Code\CSharp\01-Office\Cesar.Office.Interop\Cesar.Office.Interop\Program.cs:行号 344
   在 Cesar.Office.Interop.Program.PostHandler(String path, String body, Dictionary`2 headers) 位置 G:\笔记本\04-Code\CSharp\01-Office\Cesar.Office.Interop\Cesar.Office.Interop\Program.cs:行号 226

--------------------------------------------

请在反馈时将上述信息粘贴给我,谢谢!


回复内容
Cesar 2022-06-08 15:12
#1

谢谢反馈,更新下试试

Wanpeng 回复 Cesar 2022-06-08 23:25 :

已成功,感谢大佬~

回复主贴