DLL 引用的奇怪问题

发布于 2024-12-02 23:44:21 字数 649 浏览 2 评论 0原文

好吧,这是我有限的头脑无法弄清楚的:

我们有一个现有的 .Net 应用程序,它使用 .dll 从供应商创建 PDF 文件。旧版本中的设置会在一组单词下划线,但 1) 不会在单词之间的空格下划线,2) 将下划线放在字母下方的下一个像素处,因此字母和单词之间没有空格。强调。这是我们开始使用的 .dll 版本。

X 公司推出了新版本的 .dll,它为单词之间的空格添加了下划线,并将下划线下移了几个像素。

我们卸载旧版本的 .dll,将其从 GAC 中删除,确保系统上的任何位置都没有 .dll 的副本,然后安装新版本。在VS中,在引用下,我们可以看到.dll是最新版本。然而,当我们运行应用程序时,结果是单词带有下划线,并且下划线向下几个像素,但单词之间的空格没有下划线。

我们创建了一个新的测试项目,引用了 .dll,并得到了所需的结果,其中带有空格下划线,并且下划线向下几个像素。

Sooooo...现有项目曾经引用旧版本,但现在引用新版本,正在显示新旧版本组合的行为。这怎么可能? VS 项目的内部工作中是否有什么东西可能会导致这种情况?有人见过这样的事情吗?

预先感谢您的任何想法

更新 我让它在 IDE 中正常工作,但是当它安装在计算机上时,它仍然显示混合结果。安装项目中一定有某些内容未正确提取 .dll。

Ok, here is one that my limited mind cannot figure out:

We have an existing .Net app that uses a .dll that creates PDF files from a vendor. A setting in an older version would underline a group of words, but 1) did not underline the spaces between the words, and 2) put the underline at the next pixel below the letters, so there was no white space between the letters and the underline. This is the version of the .dll we started with.

Company X puts out a new version of the .dll that underlines the spaces between words, and drops the underline down a couple of pixels.

We uninstall the old version of the .dll, remove it from the GAC, making sure that there are no copies of the .dll anywhere on the system, and the install the new version. In VS, under references, we can see that the .dll is the latest version. However, when we run the app, the result is that the words are underlined, and the underline is down a couple of pixels, but the spaces between the words are not underlined.

We created a new test project, referenced the .dll, and got the desired results, with spaces underlined, and the underline down a couple of pixels.

Sooooo...the existing project, that used to reference the old version, but now references the new version, is showing behavior that is a combination of the old and new versions. How is this possible? Is there something buried in the inner working of a VS project that could cause this? Has anyone ever seen anything like this?

Thanks in advance for any ideas

Update
I have it working correctly in the IDE, but when it gets installed on a machine, it is still showing the hybrid results. There must be something in the setup project that is not pulling the .dll correctly in.

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

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

发布评论

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

评论(1

慢慢从新开始 2024-12-09 23:44:21

如果您有一个类库项目(例如 MyProject.Core),并且该项目内部有一个对 DLL 更新的引用(例如 ThirdParty.dll),如果您如果希望 Visual Studio 的 IntelliSense 更新该新 DLL 的更改,请尝试以下操作:

  1. 双击 MyProject.Core 项目的 References 文件夹
  2. 删除 ThirdParty.dll 参考
  3. 添加ThirdParty.dll参考
  4. 重建MyProject.Core
  5. 检查VS IntelliSense是否已更新

If you have a Class Library Project (e. g. MyProject.Core) and you have inside that Project a reference to an update of a DLL (e. g. ThirdParty.dll), if you want that the IntelliSense of the Visual Studio updates the changes of that new DLL, try this:

  1. Double click in the References folder of your MyProject.Core project
  2. Delete the ThirdParty.dll old reference
  3. Add the ThirdParty.dll new reference
  4. Rebuild MyProject.Core
  5. Check that VS IntelliSense has been updated
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文