当启用了原生代码调试AccessViolationException消失 [英] AccessViolationException goes away when native code debugging is enabled

查看:496
本文介绍了当启用了原生代码调试AccessViolationException消失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到一个 AccessViolationException 当我运行的谷歌云端硬盘API样本在Visual Studio 2012。我的项目是针对.NET 4.5。我得到线185除外:

I get an AccessViolationException when I run the Google Drive API sample in Visual Studio 2012 on Windows 7 x64. My project is targeting .Net 4.5. I get the exception on line 185:

await service.Files.Delete(file.Id).ExecuteAsync();




  • 这发生在调试版本和发布模式,并在所有平台( 86,64,值为anycpu)。

  • 这不,当我没有附加调试器(开始不调试)运行发生。

  • 它确实当我能够在项目属性中的启用原生代码调试不会发生。

  • 任何想法,为什么启用原生代码调试,可能阻止?例外

    Any ideas why enabling native code debugging might prevent the exception?

    请注意:运行示例需要的NuGet包(预发布):的 Google.Apis.Drive.v2

    Note: running the sample requires the NuGet package (prerelease): Google.Apis.Drive.v2

    编辑:我希望谷歌的人会附和,并告诉他们是否已经看到了这个问题,以及因的样本说明说:

    I wish Google people would chime in and tell if they've seen this as well because the sample instructions say:


    • 打开Goog​​leApisSamples.sln与Visual Studio中

    • 单击上构建>重建解决方案

    • 执行中Drive.Sample\bin\Debug中的.exe

    因为他们走出去的方式,以直接从debug文件夹,而不是只说运行样品执行EXE这是怪异。

    which is weird since they go out of their way to execute the exe directly from the debug folder instead of just saying "Run the sample".

    推荐答案

    这仅仅是一个在黑暗中拍摄,但我有这竟然是由Visual Studio中引起类似的问题宿主进程。结果
    你可以禁用它,看看是否有任何改变。

    It is just a shot in the dark, but I had a similar issue which turned out to be caused by the visual studio hosting process.
    you can disable it and see if anything has changed.

    您可以从项目属性做> 调试>取消选中启用Visual Studio的托管服务

    You can do it from Project properties > Debug > uncheck the Enable the visual studio hosting service

    这篇关于当启用了原生代码调试AccessViolationException消失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆