我正在捆绑一堆程序集,包括 ServiceStack.Text。运行 mkbundle 时,它告诉我它正在嵌入:
embedding: /home/user/Verisys/build/ServiceStack.Text.dll
但是,当我尝试运行生成的可执行文件时,我得到了这个:
Unhandled exception
System.ApplicationException: RootDir '/opt/mono32/lib/mono/gac/ServiceStack.Text/4.0.0.0__e06fbc6124f57c43' for virtual path does not exist
at ServiceStack.VirtualPath.FileSystemVirtualPathProvider.Initialize () [0x00000] in <filename unknown>:0
at ServiceStack.VirtualPath.FileSystemVirtualPathProvider..ctor (IAppHost appHost, System.IO.DirectoryInfo rootDirInfo) [0x00000] in <filename unknown>:0
at ServiceStack.VirtualPath.FileSystemVirtualPathProvider..ctor (IAppHost appHost, System.String rootDirectoryPath) [0x00000] in <filename unknown>:0
at ServiceStack.ServiceStackHost.Init () [0x00000] in <filename unknown>:0
at MyExe.OnStart (System.String[] args) [0x00000] in <filename unknown>:0
知道为什么它试图从 GAC 加载这个程序集,而不是使用嵌入式程序集吗?