Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CsScript exec code
#2
Prints error in LA Output:
Quote:FAILED TO COMPILE
code(1,7): error CS0246: The type or namespace name 'Spire' could not be found (are you missing a using directive or an assembly reference?)
code(12,19): error CS0246: The type or namespace name 'Document' could not be found (are you missing a using directive or an assembly reference?)
code(16,27): error CS0103: The name 'FileFormat' does not exist in the current context
Quote:Failed to compile:
Failed to load r. System.IO.FileNotFoundException: Could not find a part of the path 'D:\RPA\spire\10.5.0\NET9.0\Spire.Doc.dll'.
File name: 'D:\RPA\spire\10.5.0\NET9.0\Spire.Doc.dll'
 ---> System.IO.DirectoryNotFoundException: Could not find a part of the path 'D:\RPA\spire\10.5.0\NET9.0\Spire.Doc.dll'.
   at line 41 in CsScript.cs, CsScript.<>c.<Compile>b__3_1(String o)
   at line 41 in CsScript.cs, CsScript.Compile(String code, Boolean library, String[] c, String[] r, List`1 errors)
   >>
   --- Raw stack trace ---
   at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at Roslyn.Utilities.StandardFileSystem.OpenFile(String filePath, FileMode mode, FileAccess access, FileShare share) in C:\code-lib\roslyn\src\Compilers\Core\Portable\FileSystem\ICommonCompilerFileSystem.cs:line 64
   at Roslyn.Utilities.CommonCompilerFileSystemExtensions.OpenFileWithNormalizedException(ICommonCompilerFileSystem fileSystem, String filePath, FileMode fileMode, FileAccess fileAccess, FileShare fileShare) in C:\code-lib\roslyn\src\Compilers\Core\Portable\FileSystem\ICommonCompilerFileSystem.cs:line 32
   at Roslyn.Utilities.CommonCompilerFileSystemExtensions.OpenFileWithNormalizedException(ICommonCompilerFileSystem fileSystem, String filePath, FileMode fileMode, FileAccess fileAccess, FileShare fileShare) in C:\code-lib\roslyn\src\Compilers\Core\Portable\FileSystem\ICommonCompilerFileSystem.cs:line 40
   at Microsoft.CodeAnalysis.MetadataReference.CreateFromFile(String path, MetadataReferenceProperties properties, DocumentationProvider documentation) in C:\code-lib\roslyn\src\Compilers\Core\Portable\MetadataReference\MetadataReference.cs:line 245
   at CsScript.<>c.<Compile>b__3_1(String o) in C:\code\ok\files\Extensions\CsScript\CsScript.cs:line 41
   at System.Linq.Enumerable.ArraySelectIterator`2.MoveNext()
   at System.Collections.Generic.SegmentedArrayBuilder`1.AddNonICollectionRange(IEnumerable`1 source)
   at System.Linq.Enumerable.Concat2Iterator`1.ToArray()
   at CsScript.Compile(String code, Boolean library, String[] c, String[] r, List`1 errors) in C:\code\ok\files\Extensions\CsScript\CsScript.cs:line 41

 


Messages In This Thread
CsScript exec code - by Davider - 08-03-2025, 03:40 AM
RE: CsScript exec code - by Gintaras - 08-03-2025, 03:49 AM
RE: CsScript exec code - by Davider - 08-03-2025, 04:05 AM
RE: CsScript exec code - by Gintaras - 08-03-2025, 04:15 AM
RE: CsScript exec code - by Davider - 08-03-2025, 04:34 AM
RE: CsScript exec code - by Gintaras - 08-03-2025, 04:39 AM
RE: CsScript exec code - by Davider - 08-03-2025, 04:50 AM
RE: CsScript exec code - by Gintaras - 08-03-2025, 05:08 AM
RE: CsScript exec code - by Davider - 08-03-2025, 05:26 AM
RE: CsScript exec code - by Gintaras - 08-03-2025, 05:49 AM
RE: CsScript exec code - by Davider - 08-03-2025, 06:03 AM
RE: CsScript exec code - by Davider - 08-06-2025, 11:46 PM
RE: CsScript exec code - by Gintaras - 08-07-2025, 11:28 AM
RE: CsScript exec code - by Davider - 08-07-2025, 02:02 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)