Microsoft KB Archive/927511

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 18:34, 18 July 2020 by 3155ffGd (talk | contribs) (importing KB archive)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Article ID: 927511

Article Last Modified on 12/3/2007



APPLIES TO

  • Microsoft .NET Framework 2.0
  • Microsoft Visual Studio 2005 Team System Test Edition
  • Microsoft Visual Studio 2005 Team Edition for Software Architects
  • Microsoft Visual Studio 2005 Team Edition for Software Developers
  • Microsoft Visual Studio 2005 Team Edition for Software Testers
  • Microsoft Visual Studio 2005 Standard Edition
  • Microsoft Visual Studio 2005 Professional Edition
  • Microsoft Visual Studio 2005 Express Edition



Important This article contains information about how to modify the registry. Make sure that you back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows registry


Important notes

For users who have Microsoft Visual Studio 2005 Service Pack 1 installed

Visual Studio 2005 Service Pack 1 (SP1) is now available for download. This service pack includes all the Microsoft Visual Basic 2005 hotfixes that have been created to date. Visual Studio 2005 SP1 provides you the best overall performance and stability when you are developing in Visual Basic 2005.

For more information about Visual Studio 2005 SP1, visit the following Microsoft Developer Network (MSDN) Web site:

The hotfix that is described in this article provides the same improvements for the Visual Basic 2005 command-line compiler (Vbc.exe) that are included with Visual Studio 2005 SP1. If you have Visual Studio 2005 SP1 installed, and if one of the following conditions is true, you must apply only the .NET Framework 2.0 hotfix that is included with this hotfix package:

  • You are developing Web sites by using Microsoft ASP.NET 2.0.
  • You are building solutions outside the Visual Studio 2005 IDE by using the Visual Basic 2005 command-line compiler.

You must apply this hotfix on both development computers and deployment computers to obtain the Visual Studio 2005 SP1 fixes for the Visual Basic 2005 command-line compiler. For more information, see the "File information" section.

For users who do not have Visual Studio 2005 SP1 installed

If you do not have Visual Studio 2005 SP1 installed, and you are experiencing the symptoms that are described in this article, you must apply both the hotfixes that are included in this hotfix package. For more information, see the "File information" section.

SYMPTOMS

In Visual Studio 2005, you may experience the following problems.

Problem 1

When you import a generic type in a Visual Basic 2005 application, Visual Studio 2005 may exit unexpectedly (crash). Additionally, you may receive the following error message:

Microsoft Visual Basic Compiler has encountered a problem and needs to close. We are sorry for the inconvenience.

Problem 2

Under some special conditions, an interface member may be reimplemented incorrectly when you recompile a Visual Basic 2005 application.

RESOLUTION

Service pack information

To resolve this problem, obtain the latest service pack for Visual Studio 2005. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

929697 How to obtain the latest Visual Studio 2005 service pack


Hotfix information

A supported hotfix is now available from Microsoft. But the hotfix is intended only to correct the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next Visual Studio 2005 service pack that contains this hotfix. To resolve this problem immediately, visit the following Microsoft Web site:

Prerequisites

You must have the Microsoft .NET Framework 2.0 and Visual Studio 2005 installed to apply this hotfix.

Restart requirement

You do not have to restart the computer after you apply this hotfix.

Hotfix replacement information

This hotfix replaces the hotfixes that are described in the following Microsoft Knowledge Base articles:

915038 FIX: You may receive Visual Basic compiler error messages when you are developing a Visual Basic 2005 project in Visual Studio 2005


917452 FIX: You may experience performance issues when you use solutions that contain large Visual Basic projects in Visual Studio 2005


919904 FIX: You may receive an error message when you try to build a Web project that references a .NET Compact Framework 2.0 assembly in Visual Basic 2005


920145 FIX: You may receive an error message when you consume an assembly that has an obfuscated generic type in Visual Studio 2005


920805 FIX: You may experience slow performance when you work with a Visual Basic solution that contains many projects in Visual Studio 2005


924162 FIX: The Visual Basic 2005 compiler unexpectedly exits when you expand an item in the Visual Studio 2005 Watch window after you install the hotfix from KB article 920805


926405 FIX: The Visual Basic 2005 compiler unexpectedly exits when you work with a Visual Basic 2005-based project in Visual Studio 2005


926970 FIX: You may experience a performance problem when you debug a Visual Basic 2005 application in Visual Studio 2005 if the source code is on a network share


Registry information

Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall the operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.

If you have Visual Studio 2005 SP1 installed, you do not have to change the registry.

If you do not have Visual Studio 2005 SP1 installed, you must add and then enable the OptimizePDB registry entry to obtain the improved performance that this hotfix provides. To add the OptimizePDB registry entry, follow these steps:

  1. Click Start, click Run, type regedit, and then click OK.
  2. Locate and then right-click the following registry key:

    HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\VB Editor

    Note If you use Microsoft Visual Basic 2005 Express Edition, locate and then right-click the following registry key:

    HKEY_CURRENT_USER\Software\Microsoft\VBExpress\8.0\VB Editor

  3. Click New, and then click DWORD Value.
  4. Type OptimizePDB, and then press ENTER.
  5. Right-click OptimizePDB, and then click Modify.
  6. Type 1, and then click OK.
  7. Exit Registry Editor.

After you add the OptimizePDB registry entry, follow these steps:

  1. In Visual Studio 2005, start the Visual Basic application.
  2. On the Build menu, click Clean Solution.

Note The OptimizePDB registry entry improves the Visual Basic 2005 compiler. Therefore, the Visual Basic 2005 compiler can optimize the .pdb file. However, the new .pdb file format is not fully compatible with the old .pdb file format. Additionally, Visual Studio 2005 SP1 always uses the new .pdb file format. Therefore, a version of Visual Studio 2005 that does not have this hotfix applied or that does not have Visual Studio 2005 SP1 installed may be unable to recognize the new .pdb file format. To resolve this problem, use one of the following methods:

  • Apply this hotfix on all development computers.
  • Install Visual Studio 2005 SP1 on all development computers.
  • On the Build menu, click Clean Solution or click Rebuild Solution before you start to debug.

File information

This hotfix package includes the following hotfixes:

  • A Visual Studio 2005 hotfix
  • A .NET Framework 2.0 hotfix

If you have Visual Studio 2005 SP1 installed, and you are experiencing the symptoms that are described in this article, you must apply only the .NET Framework 2.0 hotfix to update the Visual Basic 2005 command-line compiler.

If you do not have Visual Studio 2005 SP1 installed, and you are experiencing the symptoms that are described in this article, you must apply both these hotfixes.

The English version of this hotfix package has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.

Visual Studio 2005 hotfix, x86-based versions
File name File version File size Date Time Platform
Cpde.dll 8.0.50727.246 487,936 20-Nov-2006 15:53 x86
Msenv.dll 8.0.50727.246 9,107,456 20-Nov-2006 16:08 x86
Msvb7.dll 8.0.50727.246 3,144,704 20-Nov-2006 16:10 x86
Msvbprj.dll 8.0.50727.246 2,779,648 20-Nov-2006 16:11 x86
The .NET Framework 2.0 hotfix, x86-based versions
File name File version File size Date Time Platform
Vbc.exe 8.0.50727.236 1,164,032 27-Oct-2006 22:05 x86
Visual Studio 2005 hotfix, x64-based versions
File name File version File size Date Time Platform
Msvb7.dll 8.0.50727.246 2,162,688 20-Nov-2006 11:19 x64
The .NET Framework 2.0 hotfix, x64-based versions
File name File version File size Date Time Platform
Vbc.exe 8.0.50727.236 1,800,960 27-Oct-2006 17:27 x64
Visual Studio 2005 hotfix, Itanium-based versions
File name File version File size Date Time Platform
Msvb7.dll 8.0.50727.246 3,978,240 20-Nov-2006 11:25 IA-64
The .NET Framework 2.0 hotfix, Itanium-based versions
File name File version File size Date Time Platform
Vbc.exe 8.0.50727.236 2,994,944 27-Oct-2006 18:23 IA-64


STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section. This problem was first corrected in Visual Studio 2005 Service Pack 1.

MORE INFORMATION

Steps to reproduce the problem

Problem 1

  1. Start Visual Studio 2005.
  2. On the File menu, click New Project.
  3. Under Project types, click Visual Basic.
  4. Under Templates, click Class Library.
  5. Type Test for the project name, and then click OK.
  6. In the Class1.vb file, replace the existing code with the following code.

    Imports Test.ContainerClass(Of Test.ConcreteClass)
    
    Public Class ErrorVB
    
        Private d As DateTime = DateTime.Now
    
        Public Sub Method1()
            Dim c1 As DateTime = d.Subtract(New TimeSpan(2, 0, 0, 0))
            Dim c2 As DateTime = d.AddDays(2)
    
            Dim x As InnerClass
    
        End Sub
    
        Public Sub Method2()
            Dim d1 As DateTime = d.Subtract(New TimeSpan(2, 0, 0, 0))
            Dim d2 As DateTime = d.AddDays(2)
    
            Dim x As InnerClass
    
        End Sub
    
    End Class
    
    Public Class ContainerClass(Of T)
    
        Public Class InnerClass
    
        End Class
    
    End Class
    
    Public Class ConcreteClass
    
    End Class

Problem 2

  1. Start Visual Studio 2005.
  2. On the File menu, click New Project.
  3. Under Project types, click Visual Basic.
  4. Under Templates, click Console Application.
  5. Type a project name, and then click OK.
  6. In the Module1.vb file, replace the existing code with the following code.

    Module Module1
    
        Sub Main()
            Dim I As I1
    
            I = New C2
            I.A()
    
            I = New C3
            I.A()
        End Sub
    
    End Module
    
    Class C1
        Implements I1
    
    
        Private Sub X() Implements I1.A
            Console.WriteLine("C1's implementation of I1.A")
        End Sub
    
        Private Sub Y() Implements I1.B
            Console.WriteLine("C1's implementation of I1.B")
        End Sub
    
    End Class
    
    Class C2
        Inherits C1
        Implements I1
    
        Overridable Sub A()
            Console.WriteLine("C2.A")
        End Sub
    End Class
    
    Class C3
        Inherits C1
        Implements I1
    
        Private Sub Z() Implements I1.B
            Console.WriteLine("C3's implementation of I1.B")
        End Sub
    
        Overridable Sub A()
            Console.WriteLine("C3.A")
        End Sub
    End Class
    
    Interface I1
        Sub A()
        Sub B()
    End Interface
  7. On the Build menu, click Build Solution.

You receive the following result:

C2.A
C3.A

However, you expect to receive the following result:

C1's implementation of I1.A
C1's implementation of I1.A

For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:

824684 Description of the standard terminology that is used to describe Microsoft software updates


Keywords: kbqfe kbpubtypekc kbhotfixserver KB927511