【问题标题】:Method not found using Microsoft.WindowsAzure.Storage (2.0.3.0)使用 Microsoft.WindowsAzure.Storage (2.0.3.0) 找不到方法
【发布时间】:2013-01-13 02:42:50
【问题描述】:

我刚刚从 nuget 升级了 Microsoft.WindowsAzure.Storage,我在 Visual Studio 2010 中遇到了奇怪的错误。

当从方法AddEntry 调用我的方法IncrementCountProperty 时,我收到以下错误:

Method not found: 'Void Microsoft.WindowsAzure.Storage.Table.EntityProperty..ctor(Int64)'.

(堆栈)

System.MissingMethodException: Method not found: 'Void Microsoft.WindowsAzure.Storage.Table.EntityProperty..ctor(Int64)'.
   at App.MyClass.IncrementCountProperty(Int32 companyId, String feedKey, Int64 incrementCount)
   at App.MyClass.AddEntry(Int32 companyId, String feedKey, FeedEntry entry) in C:\xxx\MyFile.cs:line 464

我意识到我在 IncrementCountProperty 中做错了什么,但奇怪的是,Visual Studio 无法识别 IncrementCountProperty 方法中的任何断点。如果我在 AddEntry 的调用行上放置一个断点,断点就可以正常工作。如果我然后按 F11 进入,我会直接得到异常。两者都在同一个类中声明

我尝试了以下方法:

  • 删除所有 pdb 文件
  • 删除 bin/debug 中的项目 dll
  • 在解决方案上运行 Clean
  • 重新启动 Visual Stuido
  • 重新启动我的电脑
  • 在 IncrementCountProperty 方法中抛出异常只是为了确保我的代码被实际调用。并且正在抛出异常。但没有调试器。

我还通过版本号和使用 ILDASM 工具验证了正在使用正确版本的 WindowsAzure 存储。

有人可以帮我解决这个问题吗?

【问题讨论】:

  • 你能检查Microsoft.WindowsAzure.Storage.dll的路径(使用'ProcExp /e'之类的工具)并检查那里的dll吗?也许这不是你所期望的?此外,还有 2.0.4.0 版本可用。

标签: c# azure-storage azure-sdk-.net


【解决方案1】:

它正在工作!

更新到WindowsAzure.Storage 2.0.4.1 后,它正在工作。自从我写下这个问题后不久,我就一直在尝试使用2.0.4.0。微软第 26 次发布了修订版 1,其中引用了 Microsoft.Data.OData 5.2.0(而不是 5.0.2)。

我的直觉告诉我这是问题所在。

【讨论】:

    猜你喜欢
    • 2021-08-13
    • 2018-01-13
    • 2013-04-01
    • 1970-01-01
    • 2019-02-10
    • 1970-01-01
    • 1970-01-01
    • 2011-10-01
    • 1970-01-01
    相关资源
    最近更新 更多