gpt4 book ai didi

vb.net - Visual Studio 2015 Analyzer 引发异常

转载 作者:行者123 更新时间:2023-12-04 02:18:44 24 4
gpt4 key购买 nike

更新后VS 2015 更新 1 RC VS 2015 更新 1 ,我不断收到以下错误消息:

Analyzer'Microsoft.CodeAnalysis.VisualBasic.CodeFixes.SimplifyTypeNames.VisualBasicSimplifyTypeNamesDiagnosticAnalyzer'threw an exception of type 'System.ArgumentNullException' with message'Value cannot be null. Parameter name: source'


在我的一个项目中。 代码分析 在该项目上被禁用(就像我在解决方案中的所有项目一样),所以我尝试打开和关闭它,但仍然是同样的问题。
似乎我仍然可以构建和运行我的解决方案,但升级后事情似乎并不能正常工作:
  • 一切都运行得很慢
  • 进行更改并构建后,它不会应用更改

  • 有没有其他人在最近的更新之后甚至之前遇到过这个问题?
    在这里找到了潜在的解决方法: https://github.com/dotnet/roslyn/issues/6682用户发布 dpoeschl .
    这是他的原文:

    Workaround: Check this checkbox: Tools | Options | Text Editor | Basic| Code Style | Qualify member access with 'Me'

    dpoeschl's solution

    This workaround has two side-effects (that I can think of so far):

    1. You will no longer get a visual indicator of the superfluous Me. or the associated code-fix, or the "Fix all occurrences in" options foreasily achieving compliance.

    2. Any code generation features that generate fully qualified member accesses and depend on the Simplifier to remove them if appropriate(or that explicitly check this option) will now generate non-compliantcode by default.

    Enabling this option is particularly non-invasive in both VS2015 &VS2015 Update 1 because this option is only enforced in one direction.That is, the checkbox being unchecked means the analyzer runs, doessome deeper analysis (that fails in this case), and offers you alightbulb when you have qualified member accesses, while the checkboxbeing checked means that we opt out of the deeper analysis very earlyand you don't get any lightbulbs telling you to add Me. qualification.


    它对我有用,它也可以解决其他人的问题。

    最佳答案

    这是更新 1 中引入的缺陷,并且已经被跟踪 at Roslyn GitHub as #6682自 2015 年 10 月 11 日起。
    检查那里的状态更新。

    更新: Visual Studio 2015 Update 2 is now out问题在那里得到解决。

    关于vb.net - Visual Studio 2015 Analyzer 引发异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34042055/

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