gpt4 book ai didi

c# - Spark编译 View 定位

转载 作者:太空宇宙 更新时间:2023-11-03 16:54:59 25 4
gpt4 key购买 nike

我对 Spark 有疑问。我已经编译了带有 View 的程序集,位于我创建的网站的 bin 子文件夹中,如下所示

engine.BatchCompilation(targetFolder, Global.AllKnownDescriptors());

在我的应用程序启动时,尝试加载已编译的 View :

svf.Engine.LoadBatchCompilation(Assembly.LoadFrom(Path.Combine(basePath, "SharedViews.dll")));

调试时,我可以看到这是成功的。但是 ViewEngine 找不到该 View 。它甚至不会在它们所在的 CompiledViewHolder 中查找它们。该问题可能是由错误的 IViewFolder 引起的吗?或者我应该做更多的事情来使用编译 View ?谢谢

最佳答案

不确定这是否有帮助,但在 documentation有以下段落:

There is no dynamic recompilation of classes that are loaded in this way and changes to the spark files will have no effect. However the files must be available on disk at runtime. Sorry about that - but the different frameworks still needs to test for the view files' existence to know what view descriptor it should instantiate.

您的目录结构中是否有 View 文件?

关于c# - Spark编译 View 定位,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2456745/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com