使用 aspnet_merge 会对 .svc 文件产生错误

发布于 2024-09-29 17:34:44 字数 658 浏览 5 评论 0原文

我正在预编译所有网站,并使用 aspnet_merge 工具将所有 App_Web* dll 文件合并为一个。该工具还负责更新相应的 .compiled 文件,以指向新的合并程序集。但是,对于 .svc 文件,.compiled 文件不会更新,这会在运行时出现以下错误

[FileNotFoundException: Could not load file or assembly 'App_Web_10iin0kr, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.]

如果我在以下位置打开 .compiled 文件记事本并将 App_Web_10iin0kr 替换为 Web (这是我合并的 dll 文件的名称),一切正常。这有点烦人,因为构建和发布都是自动的,所以我必须编写一个脚本来作为构建后步骤执行此操作。我找不到任何文档或对此有抱怨的人,但在我在 MSDN 上开始新线程之前,我想听听你们中的任何人是否也遇到过同样的问题,以及是否有解决。

I'm precompiling all my websites and using the aspnet_merge tool to merge all the App_Web* dll files into one. The tool takes care of updating the corresponding .compiled file as well to point to the new merged assembly. BUT, for .svc files the .compiled file is not updated which gives me the following error at runtime

[FileNotFoundException: Could not load file or assembly 'App_Web_10iin0kr, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.]

If i open the .compiled file in notepad and replaces App_Web_10iin0kr with Web (which is the name of my merged dll file) everything works fine. Its a bit annoying since building and publishing is all automatic so i would have to write a script that did this as a post-build step. I haven't been able to find any documentation or people complaining about this, but before i start a new thread on MSDN i want to hear any of you guys if you've been running into the same problem as well and if there is a work around.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

自由范儿 2024-10-06 17:34:44

这里什么都没有...猜它没有得到解决,微软根本没有响应,所以我只需要进行合并后处理:(

Nothing here... guess its not being resolved, Microsoft is not responding at all so i just have to do post-merge processing :(

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文