【发布时间】: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