locked
Errors after installing vs2010 SP1 RRS feed

  • Question

  • I installed VS2010 SP1/TFS2010 SP1. Now VB solutions that built successfully now fail Rebuild with massive lists of errors, eg:

    Error 14 'IsNothing' is not declared. It may be inaccessible due to its protection level. C:\Projects\NewDox\DOXLink\DocType.vb 142 12 DOXLink
    Error 12 'ChrW' is not a member of 'VisualBasic'. C:\Projects\NewDox\DOXLink\DOXDBDataSet.Designer.vb 14947 120 DOXLink
    Error 44 'Computer' is not a member of 'My'. C:\Projects\NewDox\DOXLink\LanFolder.vb 110 20 DOXLink
    Error 15 'vbCrLf' is not declared. It may be inaccessible due to its protection level. C:\Projects\NewDox\DOXLink\Document.vb 290 110 DOXLink
    Error 37 'Right' is not declared. It may be inaccessible due to its protection level. C:\Projects\NewDox\DOXLink\LanFolder.vb 99 16 DOXLink

    and

    Error 2 Type 'Microsoft.VisualBasic.CompilerServices.DesignerGenerated' is not defined. C:\Projects\Payslips\Payslips\Main.Designer.vb 1 2 Payslips
    Error 3 'Application' is not a member of 'My'. C:\Projects\Payslips\Payslips\Main.vb 102 28 Payslips
    Error 5 'MsgBox' is not declared. It may be inaccessible due to its protection level. C:\Projects\Payslips\Payslips\Main.vb 174 13 Payslips
    Error 2 Type 'Microsoft.VisualBasic.CompilerServices.DesignerGenerated' is not defined. C:\Projects\Payslips\Payslips\Main.Designer.vb 1 2 Payslips

    Since these are from production releases that I opened to test the problem, I know that they are not developer introduced code bugs. Something has gone seriously wrong with my Visual Studio VB environment.

     

    HELP!!!

     

     

     


    David Soussan
    • Moved by Larcolais Gong Monday, March 14, 2011 7:17 AM (From:Visual Studio Setup and Installation)
    Friday, March 11, 2011 11:08 AM

Answers

  • Hi Everyone,

     

    just to update and end this thread:

    I rebuilt the PCs with Windows 7 and the problem was solved. So it was the upgrade from Vista to Windows 7 that was the root cause of this problem. Why? I don't know!!!

     

    Thanks for your time and trouble on this. ;¬)

     


    David Soussan
    • Marked as answer by David Soussan Wednesday, April 6, 2011 9:18 AM
    Wednesday, April 6, 2011 9:17 AM

All replies

  • Hi David,

    I found that you have reported your feedback on Connect Site. Here’s it.

    I will help you moving your thread into VB general forum. You will get more helpful suggestions there.

    Best Regards,


    Larcolais Gong[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, March 14, 2011 7:16 AM
  • Hi David,

    This code bellow 

      Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        If Not IsNothing(Text) Then
          Dim x = ChrW(51) & vbCrLf & Application.StartupPath
        End If
    

    Does not give any problem in building and running. 

    It is in a brand new project with VB2010 SP1 and the standard Framework 4 clientprofile

    What makes your code different from this?


    Success
    Cor
    Monday, March 14, 2011 8:34 AM
  • I installed VS2010 SP1/TFS2010 SP1. Now VB solutions that built successfully now fail Rebuild with massive lists of errors

    Hello David,

    Thanks for your post.

    Which VS edition does the VB solutions work fine in? Are the VB solutions upgraded into VS2010? Based on my understanding, after you installed VS2010 SP1/TFS2010 SP1, and rebuild the VB solutions, then a list of errors occured. If so, would you mind provide the project code? If so, we could reproduce the issue on our side. Please check below link which seems similar to the issues you described.

    http://social.msdn.microsoft.com/Forums/en/tfsbuild/thread/91407825-8e79-474d-bd22-229f24ff0cd6

    You could also try Team Foundation Server - Build Automation forum for more better suggestions. If you have any concerns, please feel free to follow up.

    Have a nice day.

    Best regards


    Liliane Teng [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, March 14, 2011 8:50 AM
  • Projects were developed only in VS2010.

     

    I'm trying out the solution in that linked thread and will report back.


    David Soussan
    Monday, March 14, 2011 4:15 PM
  • David,

    Are you trying the beta or the true SP1, in the beta was in my idea a bug for TFS2010, I'm now running with both but than not the beta.

     


    Success
    Cor
    Monday, March 14, 2011 4:19 PM
  • True SP1. I never installed the Beta but waited for the SP1 RTM.

    I tried the suggestion to reinstall VS2010 itself after installing the service pack -made no difference whatsoever :(

     

    Now, my guess is that those error messages mean that the namespaces are not being imported so that basic VB functions like IsNothing() are not recognised. I tried importing them explicitly but to no avail.

     

    Anybody got any other ideas?

     


    David Soussan
    Monday, March 14, 2011 5:37 PM
  • Does this occur on a newly created project rather than an existing project ?

     

    Monday, March 14, 2011 6:18 PM
  • Does this occur on a newly created project rather than an existing project ?

    On a new Windows Forms project I immediately get the following errors:

     

    Error    1    Type 'Microsoft.VisualBasic.CompilerServices.DesignerGenerated' is not defined.    C:\Users\david.soussan\AppData\Local\Temporary Projects\Test2\Form1.Designer.vb    1    2    Test2
    Error    2    'ApplicationServices' is not a member of 'VisualBasic'.    C:\Users\david.soussan\AppData\Local\Temporary Projects\Test2\My Project\Application.Designer.vb    26    24    Test2
    Error    3    'IsSingleInstance' is not a member of 'Test2.My.MyApplication'.    C:\Users\david.soussan\AppData\Local\Temporary Projects\Test2\My Project\Application.Designer.vb    27    13    Test2
    Error    4    'EnableVisualStyles' is not a member of 'Test2.My.MyApplication'.    C:\Users\david.soussan\AppData\Local\Temporary Projects\Test2\My Project\Application.Designer.vb    28    13    Test2
    Error    5    'SaveMySettingsOnExit' is not a member of 'Test2.My.MyApplication'.    C:\Users\david.soussan\AppData\Local\Temporary Projects\Test2\My Project\Application.Designer.vb    29    13    Test2
    Error    6    'ShutDownStyle' is not a member of 'Test2.My.MyApplication'.    C:\Users\david.soussan\AppData\Local\Temporary Projects\Test2\My Project\Application.Designer.vb    30    13    Test2
    Error    7    'ApplicationServices' is not a member of 'VisualBasic'.    C:\Users\david.soussan\AppData\Local\Temporary Projects\Test2\My Project\Application.Designer.vb    30    32    Test2
    Error    8    sub 'OnCreateMainForm' cannot be declared 'Overrides' because it does not override a sub in a base class.    C:\Users\david.soussan\AppData\Local\Temporary Projects\Test2\My Project\Application.Designer.vb    34    33    Test2
    Error    9    'MainForm' is not a member of 'Test2.My.MyApplication'.    C:\Users\david.soussan\AppData\Local\Temporary Projects\Test2\My Project\Application.Designer.vb    35    13    Test2
    Error    10    'Form1' is a type in 'Test2' and cannot be used as an expression.    C:\Users\david.soussan\AppData\Local\Temporary Projects\Test2\My Project\Application.Designer.vb    35    27    Test2
    Error    11    Type 'Microsoft.VisualBasic.HideModuleNameAttribute' is not defined.    C:\Users\david.soussan\AppData\Local\Temporary Projects\Test2\My Project\Resources.Designer.vb    27    6    Test2
    Error    12    'Application' is not a member of 'My'.    C:\Users\david.soussan\AppData\Local\Temporary Projects\Test2\My Project\Settings.Designer.vb    33    16    Test2
    Error    13    'Application' is not a member of 'My'.    C:\Users\david.soussan\AppData\Local\Temporary Projects\Test2\My Project\Settings.Designer.vb    47    44    Test2
    Error    14    Type 'Microsoft.VisualBasic.HideModuleNameAttribute' is not defined.    C:\Users\david.soussan\AppData\Local\Temporary Projects\Test2\My Project\Settings.Designer.vb    61    6    Test2


    David Soussan
    Tuesday, March 15, 2011 1:33 PM
  • Hello David,

    From the errors, such as the first one:

    Error    1    Type 'Microsoft.VisualBasic.CompilerServices.DesignerGenerated' is not defined.    C:\Users\david.soussan\AppData\Local\Temporary Projects\Test2\Form1.Designer.vb    1    2    Test2

    The type 'Microsoft.VisualBasic.CompilerServices.DesignerGenerated' is defined in Microsoft.VisualBasic.dll, so it seems that your project doesn't reference to this assembly.

    Have you tried VB Compiler runtime switch (/vbruntime)? This switch will enable Visual Basic developers to target their apps and libraries at platforms where the full Visual Basic Runtime hasn’t traditionally been available. More explaination, please read this link:

    http://blogs.msdn.com/b/vbteam/archive/2011/01/10/vb-core-new-compilation-mode-in-visual-studio-2010-sp1.aspx

    WHAT IT IS?

    The new command line option /vbruntime* (with an asterisk) will embed a reduced version of the Visual Basic runtime into the compiled assembly and therefore eliminate the dependency on the VB Runtime assembly since this assembly does not ship on all .Net platforms such as Windows Phone 7 and XNA.
    The feature can be used from the VBC command line compiler or by adding an entry <VBRuntime>Embed</VBRuntime> into the .vbproj file.

    In general, its intended use is only for specific project templates that target platforms that don’t ship with a VB runtime. 

    HOW DO I KNOW IT’S ACTUALLY DONE ANYTHING?

    To see the effects of using this switch you can create a simple console application and compile it using the new functionality (either command line or project file).  To see the embedded use tools such as “Reflector” or ILDASM to disassemble the assembly. You’ll notice that “Microsoft.VisualBasic“ namespace was added to your assembly.
    You can also see that there is no reference to VB runtime assembly in the in the referenced assembly list in your assembly header.

    More information:http://support.microsoft.com/kb/983509

    By the way, how do you build the application? Using Team Build/MSbuild in TFS or Build solution/Rebuild solution in Visual Studio? If you use Team Build/MsBuild, I recommend you could try TFS forum for more better suggestions.

    If you have any concerns, please feel free to follow up.

    Best regards


    Liliane Teng [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, March 16, 2011 8:35 AM
  • For me too.  No VB solutions which compiled fine earlier to SP1 compiled after SP1.

    Silverlight projects are missing "WindowsBase" reference and this reference is not found in the .NET references list window.

    Other projects are missing "Microsoft.VisualBasic" reference and this reference is found in .NET references list window but VS2010SP1 throws an error stating "A reference to 'Microsoft.VisualBasic' could not be added. This component is already automatically referenced by the build system."

    Please do not ask us to create new project with VS2010SP1 and move all project files into this project.  We are talking about high critical, hundreds of screens silverlight/web projects in finance domain.

    1. This SP1 is 1.5GB.  We do not want to download another 1.5GB+ to fix this issue.  We want a fix only to this issue.
    2. After an SP1 with Sev-1 for VB developers, we still have not got a target date for the fix.  Are we supposed to uninstall SP1 and wait for new SP1?  This is not acceptable as we are unsure as uninstalling SP1 may not garuntee VS210 would work as smooth as earlier.
    3. Does it mean that Microsoft Dev team has converted 100% to C#?  Does the VB team in Microsoft know this SP1 at all or was it not tested with VB projects?

    Someone please throw some light on this.


    Raja Venkatesh
    Friday, March 18, 2011 5:04 AM
  • RRV,

    Will you create your own question thread. 

    I was confused because why David told only at the end it was Silverlight but I see you have hi jacked this thread to put a message which contains more rant than information?


    Success
    Cor
    Friday, March 18, 2011 7:01 AM
  • David,

    I've also created a new application even like you with the name Application.

    Not any problem running that, can you after clicking in top of solution designer Show all files show us how that file application.designer.vb looks like?

    Should be something like this.

    <Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
    Partial Class Form1
      Inherits System.Windows.Forms.Form
    
      'Form overrides dispose to clean up the component list.
      <System.Diagnostics.DebuggerNonUserCode()> _
      Protected Overrides Sub Dispose(ByVal disposing As Boolean)
        Try
          If disposing AndAlso components IsNot Nothing Then
            components.Dispose()
          End If
        Finally
          MyBase.Dispose(disposing)
        End Try
      End Sub
    
      'Required by the Windows Form Designer
      Private components As System.ComponentModel.IContainer
    
      'NOTE: The following procedure is required by the Windows Form Designer
      'It can be modified using the Windows Form Designer. 
      'Do not modify it using the code editor.
      <System.Diagnostics.DebuggerStepThrough()> _
      Private Sub InitializeComponent()
        components = New System.ComponentModel.Container()
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.Text = "Form1"
      End Sub
    
    End Class
    
    


    Success
    Cor
    Friday, March 18, 2011 7:09 AM
  • The problem appears to stem from a bad install of SP1.   The install had failures which have left the machine in a bad state and did not rollback fully.

    If SP1 installed correctly without any problems then we have not found any issues.

    We are working to try to identify the cause of the initial failure.

    Friday, March 18, 2011 4:29 PM
  • Please log a connect bug

    http://connect.microsoft.com/

    And product team will able to provide assistance to resolve your problem and gather information which will enable them to pinpoint a root cause of the issue.

    Friday, March 18, 2011 4:32 PM
  • Hi David,

    This code bellow 

      Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load

        If Not IsNothing(Text) Then

          Dim x = ChrW(51) & vbCrLf & Application.StartupPath

        End If

     Does not give any problem in building and running. 

    It is in a brand new project with VB2010 SP1 and the standard Framework 4 clientprofile

    What makes your code different from this?


    Success
    Cor


    Hello David,

    I agree with Cor. After I installed VS2010 SP1 and run above code in a new project with .NET Framework 4.0 clientprofile. It also works fine on my side. Did you install VS2010SP1 from this link? Please try to only install VS2010 SP1 to check the situation on your side and let us know the result. If it works fine, the problem may be occured at TFS2010 SP1 side.

    http://www.microsoft.com/downloads/en/details.aspx?FamilyID=75568aa6-8107-475d-948a-ef22627e57a5&displaylang=en

    Have a nice day.

    Best regards


    Liliane Teng [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, March 21, 2011 8:19 AM
  • Hello David,

    What's the situation on your side now? If you have any concerns, please feel free to follow up.

    Have a nice day.

    Best regards


    Liliane Teng [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, March 23, 2011 6:57 AM
  • Hi Liliane

    just to update you:

    I had to uninstall SP1 just to get any work done, so I can't try a lot of the suggestions  and tests here.

    I have a spare PC that I will try to use to investigate SP1 - when I can make time and space in a hectic delivery schedule. In fact this will be one of those that I have to do at home :(

    Yes, I used the web install from microsoft downloads - on both machines that were updated.

    I submitted this problem along with all the requested logs to Connect but no response as yet.

     

    Thanks everyone for your time on this :)


    David Soussan
    Wednesday, March 23, 2011 10:42 AM
  • Can you send me the link to connect bug

    abowles@hotmail.com

     

    Wednesday, March 23, 2011 3:17 PM
  • Cor, here are the application.designer.vb and the form1.designer.vb

    '------------------------------------------------------------------------------
    ' <auto-generated>
    '     This code was generated by a tool.
    '     Runtime Version:4.0.30319.225
    '
    '     Changes to this file may cause incorrect behavior and will be lost if
    '     the code is regenerated.
    ' </auto-generated>
    '------------------------------------------------------------------------------

    Option Strict On
    Option Explicit On


    Namespace My
       
        'NOTE: This file is auto-generated; do not modify it directly.  To make changes,
        ' or if you encounter build errors in this file, go to the Project Designer
        ' (go to Project Properties or double-click the My Project node in
        ' Solution Explorer), and make changes on the Application tab.
        '
        Partial Friend Class MyApplication
           
            <Global.System.Diagnostics.DebuggerStepThroughAttribute()>  _
            Public Sub New()
                MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
                Me.IsSingleInstance = false
                Me.EnableVisualStyles = true
                Me.SaveMySettingsOnExit = true
                Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses
            End Sub
           
            <Global.System.Diagnostics.DebuggerStepThroughAttribute()>  _
            Protected Overrides Sub OnCreateMainForm()
                Me.MainForm = Global.WindowsApplication1.Form1
            End Sub
        End Class
    End Namespace

    -------------------------------------------------------------------------

    <Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
    Partial Class Form1
        Inherits System.Windows.Forms.Form

        'Form overrides dispose to clean up the component list.
        <System.Diagnostics.DebuggerNonUserCode()> _
        Protected Overrides Sub Dispose(ByVal disposing As Boolean)
            Try
                If disposing AndAlso components IsNot Nothing Then
                    components.Dispose()
                End If
            Finally
                MyBase.Dispose(disposing)
            End Try
        End Sub

        'Required by the Windows Form Designer
        Private components As System.ComponentModel.IContainer

        'NOTE: The following procedure is required by the Windows Form Designer
        'It can be modified using the Windows Form Designer. 
        'Do not modify it using the code editor.
        <System.Diagnostics.DebuggerStepThrough()> _
        Private Sub InitializeComponent()
            components = New System.ComponentModel.Container()
            Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
            Me.Text = "Form1"
        End Sub

    End Class

    ------------------------------------------------------------

     

    Still nothing works. This problem occurs on 2 different machines so it is more than just 'What is installed on your machine?'. I suspect that it would happen on any other machine we have here but I'm not going to test that theory because people need to get work done.


    David Soussan
    Thursday, March 24, 2011 11:36 AM
  • David,

    With this code I've only one problem, that is that the Option Strict is not at the top of the rows. 

    Can it be that you once have put that in your designer generated code by hand and that in SP1 version this is currently verified?

    Be aware you can also set the Option Strict by 

    Tools -> Options -> Project and Solutions => VB defaults 

    (I see now that it is nicely done in SP 1, in past it was always Basic from 1985)

    (I remove those things always by simply do change in files)


    Success
    Cor

    Thursday, March 24, 2011 12:33 PM
  • I have not recieved any email response to you problem.   Please email me and I can discuss your connect bug.

    Thursday, March 24, 2011 2:30 PM
  • spotty, I sent the link this morning. Should have arrived at your hotmail account by now?

     

    Anyway here is the link to connect

     

     

    http://connect.microsoft.com/VisualStudio/feedback/details/650831/vs2010-sp1-problem

     

     


    David Soussan
    Thursday, March 24, 2011 3:28 PM
  • David,

    Did you also try what I wrote?


    Success
    Cor
    Thursday, March 24, 2011 3:38 PM
  • Everyone, please be aware:

     

    When I create the test project I do NOTHING except create the project. I EDIT NOTHING. I ADD NOTHING. All I do is create a simple winforms project, run a Rebuild and get the hundreds of error messages because fundamental VB language constructs and commands are not recognised despite the fact that the Project Properties states that VB is referenced and the namespace imported. So please don't waste your time and mine by asking if I've added "code by hand" etc.

     

    Cor, as it happens I have my VB Defaults set with OPTION STRICT OFF. However on the test machine I had not set this so it defaulted to ON. I also tend to code the OPTIONS at the top of my class files just to make them clear to anyone who follows behind, but then I'm a belt-and-braces type of coder :)


    David Soussan
    Thursday, March 24, 2011 3:39 PM
  • Hi, I found probably one reason for the errors i encountered.  I had Microsoft Windows SDK 7.0A.  I use WinXP SP3,  Dell Lattitude D630.  But the download page of VS2010 SP1 says not to install the SP1 on a x64 PC which has Windows SDK 7.  But mine is x86.

    What else could be the cause?


    Raja Venkatesh
    Thursday, March 24, 2011 5:20 PM
  • Rather than simply posting here - please email me and I can work to resolve this.

     

    Thursday, March 24, 2011 5:40 PM
  • Please Email me skytribe@hotmail.com so I can gather some logs and work to resolve your issue.

     

    Thursday, March 24, 2011 5:42 PM
  • Hello David,

    I am writing to check the status of the issue on your side. Have you resolved with spotty's help?

    Have a nice day.

    Best regards


    Liliane Teng [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, March 28, 2011 9:43 AM
  • Hi Everyone,

     

    just to update and end this thread:

    I rebuilt the PCs with Windows 7 and the problem was solved. So it was the upgrade from Vista to Windows 7 that was the root cause of this problem. Why? I don't know!!!

     

    Thanks for your time and trouble on this. ;¬)

     


    David Soussan
    • Marked as answer by David Soussan Wednesday, April 6, 2011 9:18 AM
    Wednesday, April 6, 2011 9:17 AM
  • Folks, I'm having the exact same problem as David had.  And it happened immediately after installing SP1.   It's totally maddening.  I cannot rebuild any PC's with Windows 7 so i cannot solve the problem the way David did.  Can anyone help?  

    I have not changed any operating systems.  My laptop has, and forever has had, Windows Vista Home Premium.

    If someone knows a solution besides changing operating systems I would be most appreciative to find it out.  Thank you.

     

     

     

    Tuesday, January 10, 2012 3:50 PM
  • kyLucky and did you try already what I an hour ago wrote about setting the full framework again. 

    Maybe it is even set, like that, but nobody has yet replied.


    Success
    Cor
    Tuesday, January 10, 2012 5:37 PM
  • Hi,

    I completely uninstalled VS2010 SP1 and reinstalled the same SP1 (Only SP1) online.  I got everything (All earlier source) working back.

    Most of my projects are in Silverlight and few in WPF but all (100%) are in VB.NET language which all started working fine.

    Thanks.  Sorry for the frustration i put earlier.

    Good Luck

    RRV


    Raja Venkatesh
    Tuesday, January 10, 2012 6:04 PM
  • kyLucky and did you try already what I an hour ago wrote about setting the full framework again. 

    Maybe it is even set, like that, but nobody has yet replied.


    Success
    Cor


    Cor, I couldn't find anything that you wrote an hour ago.  The framework I'm targeting is the .NET Framework 4

    Any suggestions?   It seems that the vast majority of people have no problem after installing SP1 but then there are poor bas... like David and I.

     

    Tuesday, January 10, 2012 6:24 PM
  • Raja, I uninstalled both VS 2010 and SP1.  I then reinstalled VS 2010 and the same problems existed.  It seems that installing SP1 caused the problems but uninstalling and not having it all all does not fix the problem.   It somehow changed something in the OS that no one knows how to change back.  I'll try anything at this point.   Short of what David had to do to fix his problem which was to build another PC and load on a new OS.  I don't know how to build anything.   I used to know how to build a VS project but now I have my doubts about even that. :)
    Tuesday, January 10, 2012 6:27 PM