我刚刚从 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
- 对解决方案进行 Ran Clean
- 重新启动 Visual Stuido
- 重新启动我的电脑
- 在 IncrementCountProperty 方法中抛出异常只是为了确保我的代码确实被调用。并且正在抛出异常。但没有调试器。
我还通过版本号和使用 ILDASM 工具验证了正在使用的 WindowsAzure 存储的正确版本。
有人可以帮我解决这个问题吗?
最佳答案
成功了!
更新到 WindowsAzure.Storage 2.0.4.1
后,它可以正常工作。自从我写完问题后不久,我就一直在尝试使用 2.0.4.0
。第 26 次微软发布了修订版 1,其中引用了 Microsoft.Data.OData 5.2.0
(而不是 5.0.2
)。
我的直觉告诉我这就是问题所在。
关于c# - 使用 Microsoft.WindowsAzure.Storage (2.0.3.0) 找不到方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14584424/