为什么移动项目后 VB.net 编译器会崩溃?

发布于 2024-07-22 05:09:14 字数 999 浏览 3 评论 0原文

我正在将数据从旧笔记本电脑迁移到新笔记本电脑,包括 Visual Studio 2008 中的一些 vb.net 项目。但是当我尝试在新笔记本电脑上打开其中一些项目时,我很快会收到一个对话框,指出 vb 编译器已崩溃并询问我是否要关闭、调试或在线检查解决方案。 然后,令人沮丧的是,Visual Studio 关闭了。

在旧笔记本电脑上打开这些项目时不会崩溃,并且其他迁移的项目打开时也不会崩溃。 因此,项目的某些财产一定会因移动而受到损坏。

我进行了搜索并找到了具有类似问题的人的帖子,但没有答案。 为什么会发生这种情况?我该如何解决?

错误详细信息:

Problem signature:
  Problem Event Name:   APPCRASH
  Application Name: devenv.exe
  Application Version:  9.0.21022.8
  Application Timestamp:    47317b3d
  Fault Module Name:    kernel32.dll
  Fault Module Version: 6.0.6001.18215
  Fault Module Timestamp:   4995344f
  Exception Code:   e06d7363
  Exception Offset: 0002f328
  OS Version:   6.0.6001.2.1.0.768.3
  Locale ID:    4105

Additional information about the problem:
  LCID: 1033

Read our privacy statement:
  http://go.microsoft.com/fwlink/?linkid=50163&clcid=0x0409

旧笔记本电脑是 Windows XP,使用 Visual Studio Professional。 新笔记本电脑是Windows Vista并使用Visual Studio团队。 “迁移”是源文件的直接复制粘贴。

I'm migrating data from an old laptop to a new laptop, including some vb.net projects in visual studio 2008. But when I try to open some of them on the new laptop, I quickly get a dialog stating that the vb compiler has crashed and asking me if I want to close, debug, or check online for solutions. Visual studio then, frustratingly, closes.

The projects don't crash when opened on the old laptop, and other migrated projects open without crashing. So it must be some property of the projects that becomes corrupted by moving them.

I've done searches and found posts by people with similar-sounding problems, but no answers. Why is this happening, and how do I fix it?

Error Details:

Problem signature:
  Problem Event Name:   APPCRASH
  Application Name: devenv.exe
  Application Version:  9.0.21022.8
  Application Timestamp:    47317b3d
  Fault Module Name:    kernel32.dll
  Fault Module Version: 6.0.6001.18215
  Fault Module Timestamp:   4995344f
  Exception Code:   e06d7363
  Exception Offset: 0002f328
  OS Version:   6.0.6001.2.1.0.768.3
  Locale ID:    4105

Additional information about the problem:
  LCID: 1033

Read our privacy statement:
  http://go.microsoft.com/fwlink/?linkid=50163&clcid=0x0409

The old laptop is windows xp and uses visual studio professional. The new laptop is windows vista and uses visual studio team. The 'migration' was a straight copy paste of the source files.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

走走停停 2024-07-29 05:09:14

项目文件可能引用了不再存在的位置(即它位于旧笔记本电脑上,而不是新笔记本电脑上)。 例如,驱动器是否不同(D:一个驱动器,C:另一个驱动器)?

The project file may be referencing a location that no longer exists (i.e. it was on the old laptop and not on the new one). For example, are the drives different (D: on one and C: on the other)?

長街聽風 2024-07-29 05:09:14

该项目崩溃是因为与以下代码片段等效的任何内容都会使 VS2008 崩溃,但不会使 VS2008 SP1 崩溃:

Public Class B(Of T)
    Protected Function P(ByVal arg As T) As Boolean
    End Function
End Class
Public Class C
    Inherits B(Of Integer)
    Private Sub New(ByVal arg As Integer)
        Dim d = Function() P(arg)
    End Sub
End Class

注意:

  • 升级到 SP1 可以修复该问题。
  • 'Boolean' 或 'Integer' 没有什么特别的,它们只是方便的类型,
  • 将两个 sub 组合成一个类可以使 bug 消失。
  • 在基类函数中使用非泛型参数可以使错误消失。
  • 在子类中使用非构造函数子可以使错误消失。
  • 该 bug 的简单 C# 翻译不会导致 C# 编译器崩溃。

我终于可以把它归咎于编译器了。 不是我的错!

The project crashes because anything equivalent to the following snippet of code crashes VS2008, but not VS2008 SP1:

Public Class B(Of T)
    Protected Function P(ByVal arg As T) As Boolean
    End Function
End Class
Public Class C
    Inherits B(Of Integer)
    Private Sub New(ByVal arg As Integer)
        Dim d = Function() P(arg)
    End Sub
End Class

Notes:

  • Upgrading to SP1 fixes the problem.
  • There's nothing special about 'Boolean' or 'Integer', they were just convenient types
  • Combining both subs into a single class makes the bug disappear.
  • Using a non-generic argument in the base class function makes the bug disappear.
  • Using a non-constructor sub in the child class makes the bug disappear.
  • A naive C# translation of the bug doesn't cause the C# compiler to crash.

I can finally blame it on the compiler. Not my fault!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文