gpt4 book ai didi

c# - stdole.dll 已经从不同的位置加载了吗?

转载 作者:行者123 更新时间:2023-11-30 12:30:36 34 4
gpt4 key购买 nike

我正在尝试在 Visual Studio 2010 中构建一个由多个项目组成的解决方案,但其中一个项目在编译时出现了一个奇怪的错误:

Cannot load referenced assembly: C:\Windows\assembly\GAC\stdole\7.0.3300.0_b03f5f711d50a3a\stdole.dll
System.IO.FileLoadException - API restriction: The assembly 'file:\\\<same as above>' has already loaded from a different location. It cannot be loaded from a new location within the same appdomain.

起初我认为我需要删除这个 stdole.dll 引用,所以我删除了它。但是,在删除它之后,我得到了以下错误:

The type or namespace 'stdole' could not be found (are you missing a using directive or an assembly reference?)

再次添加引用返回第一个错误。

我明白为什么会出现最后一个错误,但我不明白为什么会出现第一个错误。我是 .NET 的新手,并且是我目前所在公司中唯一拥有任何 C# 经验的人,这意味着这里没有人可以帮助我。我也花了一些时间尝试在线查找解决方案,但我在这个领域缺乏经验,这让我很难找到我能理解的答案。

如有任何帮助,我们将不胜感激!

最佳答案

您可以通过地址直接添加对文件的引用例如:

C:\WINDOWS\assembly\GAC\stdole\7.0.3300.0__b03f5f7f11d50a3a\stdole.dll

不是来自 GAC(注册大会)

关于c# - stdole.dll 已经从不同的位置加载了吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15834038/

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