Results 1 to 30 of 30

Thread: Visual Studio 2005

  1. #1

    Thread Starter
    Fanatic Member cpatzer's Avatar
    Join Date
    Sep 2004
    Posts
    537

    Visual Studio 2005

    What a piece of garbage! I just lost two days work for apparently no reason at all. All of my subs, functions and variables were just deleted by VS.NET! Only my properties remained.

    Has anyone else experienced this?

    Do you know how to get my work back?
    In life you can be sure of only two things... death and taxes. I'll take death.

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Visual Studio 2005

    Hmm, can you tell us more of how it was lost or any error messages?
    I dont think you should save anything yet as it may overwrite the corruption and the loss will be irreversable.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Visual Studio 2005

    if you open the .vb files in notepad is the code there?

    i mean that sounds pretty odd considering they are really just text files..

    also, no offense, but he who does not back up his stuff, is destined to have this happen at one point or another...

  4. #4

    Thread Starter
    Fanatic Member cpatzer's Avatar
    Join Date
    Sep 2004
    Posts
    537

    Re: Visual Studio 2005

    I just started writing the program 2 days ago. Normally back up every three days. Some how one of my menu objects got renamed and the designer choked. I went in renamed it and all of my stuff is gone! This is what was left:

    VB Code:
    1. #Region "VARIABLE DECLARATIONS"
    2.  
    3. #Region "DB VARIABLES"
    4.  
    5. #End Region
    6.  
    7. #Region "CONSTANTS"
    8.  
    9. #End Region
    10.  
    11.  
    12. #End Region
    13.  
    14. #Region "PROPERTIES"
    15.  
    16.     Public ReadOnly Property Issue() As String
    17.         Get
    18.             'Parse date into YYYY-MM-DD format for folder issues
    19.             Dim TempDate As Date = DateTimePickerIssue.Value
    20.             Dim Month As Single = DateTimePickerIssue.Value.Month
    21.             Dim Day As Single = DateTimePickerIssue.Value.Day
    22.             Dim MonthString As String = Month.ToString
    23.             Dim DayString As String = Day.ToString
    24.             If Month < 10 Then
    25.                 MonthString = "0" + Month.ToString
    26.             End If
    27.             If Day < 10 Then
    28.                 DayString = "0" + Day.ToString
    29.             End If
    30.             Return DateTimePickerIssue.Value.Year.ToString + "-" + MonthString + "-" + DayString
    31.         End Get
    32.     End Property
    33.  
    34.     Public ReadOnly Property IssuePath() As String
    35.         Get
    36.             Return BaseFolder + "\" + Issue
    37.         End Get
    38.     End Property
    39.  
    40.     Public ReadOnly Property FormattedIssue() As String
    41.         Get
    42.             Dim TempDate As Date = DateTimePickerIssue.Value
    43.             Return TempDate.ToLongDateString
    44.         End Get
    45.     End Property
    46.  
    47.     Private ReadOnly Property CurrentFolder() As String
    48.         Get
    49.             Return TabControlFolders.SelectedTab.Tag.ToString
    50.         End Get
    51.     End Property
    52.  
    53.     Private ReadOnly Property CurrentStoryFolderPath() As String
    54.         Get
    55.             Return BaseFolder + "\" + Issue + "\" + CurrentFolder
    56.         End Get
    57.     End Property
    58.  
    59.     Private ReadOnly Property CurrentImagesFolderPath() As String
    60.         Get
    61.             Return BaseFolder + "\" + Issue + "\" + CurrentFolder + "\Images"
    62.         End Get
    63.     End Property
    64.  
    65.     Private ReadOnly Property SelectedFolderTab() As TabPage
    66.         Get
    67.             Return CType(TabControlFolders.SelectedTab.Controls(0), TabControl).SelectedTab
    68.         End Get
    69.     End Property
    70.  
    71.     Private ReadOnly Property FileSelected() As Boolean
    72.         Get
    73.             If VisibleListView.SelectedItems.Count > 0 Then
    74.                 Return True
    75.             Else
    76.                 Return False
    77.             End If
    78.         End Get
    79.     End Property
    80.  
    81.     Private ReadOnly Property VisibleListView() As ListView
    82.         Get
    83.             Return CType(SelectedFolderTab.Controls(0), ListView)
    84.         End Get
    85.     End Property
    86.  
    87.     Private ReadOnly Property Writers() As Collection
    88.         Get
    89.             Return _Writers
    90.         End Get
    91.     End Property
    92.     Private ReadOnly Property SelectedFile() As ListViewItem
    93.         Get
    94.             If Not IsNothing(VisibleListView) Then
    95.                 If VisibleListView.SelectedItems.Count > 0 Then
    96.                     Return VisibleListView.SelectedItems(0)
    97.                 Else
    98.                     Return Nothing
    99.                 End If
    100.             Else
    101.                 Return Nothing
    102.             End If
    103.         End Get
    104.     End Property
    105.  
    106.     Private ReadOnly Property SelectedFileName() As String
    107.         Get
    108.             If Not IsNothing(VisibleListView) Then
    109.                 If VisibleListView.SelectedItems.Count > 0 Then
    110.                     If Not IsNothing(VisibleListView.SelectedItems(0).Tag) Then
    111.                         Return CType(VisibleListView.SelectedItems(0).Tag, DJCFileInfo).FileName
    112.                     End If
    113.                 End If
    114.             End If
    115.             Return String.Empty
    116.         End Get
    117.     End Property
    118.  
    119. #End Region
    120.  
    121. #Region "INIT"
    122.  
    123.  
    124.  
    125.  
    126.  
    127. #End Region
    128.  
    129. #Region "UPDATE CONTROLS"
    130.  
    131.  
    132.  
    133. #End Region
    134.  
    135. #Region "CONTROLS"
    136.  
    137.  
    138.  
    139.  
    140.  
    141.  
    142.  
    143. #End Region
    144.  
    145. #Region "DATABASE"
    146.  
    147.  
    148.  
    149.  
    150.  
    151.     'Runs database query.
    152.     'Don't forget to call DBReader.Close() after using the reader returned
    153.  
    154.  
    155. #End Region
    156.  
    157. #Region "MAIN MENU"
    158.  
    159. #Region "FILE MENU"
    160.  
    161.  
    162.  
    163. #End Region
    164.  
    165. #Region "EDIT MENU"
    166.  
    167.  
    168.  
    169.  
    170.  
    171.  
    172.  
    173. #End Region
    174.  
    175. #Region "RESOURCES MENU"
    176.  
    177. #End Region
    178.  
    179. #End Region
    180.  
    181. #Region "ISSUE PICKER"
    182.  
    183.  
    184.  
    185. #End Region
    186.  
    187. #Region "EVENT HANDLERS"
    188.  
    189.  
    190.  
    191.  
    192.  
    193.     'Drag Drop Event Handers
    194.  
    195.  
    196.  
    197.  
    198.  
    199.  
    200.  
    201.  
    202.  
    203. #End Region
    In life you can be sure of only two things... death and taxes. I'll take death.

  5. #5
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Visual Studio 2005

    did you look in the raw .vb files to see if anything is in them??

  6. #6

    Thread Starter
    Fanatic Member cpatzer's Avatar
    Join Date
    Sep 2004
    Posts
    537

    Re: Visual Studio 2005

    Contents of FormMain.vb same as in VS.
    In life you can be sure of only two things... death and taxes. I'll take death.

  7. #7
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Visual Studio 2005

    That looks bad. You lost everything in your regions but the properties region.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  8. #8
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Visual Studio 2005

    you didnt happen to do something like put all this code in the section of the code designer that rewrites itself all the time did you? you know the "auto generated" code section

  9. #9

    Thread Starter
    Fanatic Member cpatzer's Avatar
    Join Date
    Sep 2004
    Posts
    537

    Re: Visual Studio 2005

    Nope, all code was separate from the designer code. Somehow it thought that it was part of it or something.

    Friday the 13th blows A$$!!!!
    In life you can be sure of only two things... death and taxes. I'll take death.

  10. #10
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Visual Studio 2005

    maybe that is what VS 2005 calls a partial class

    sorry.. im sure you aren't laughing about this over there but i guess at this point you just need to shrug it off and write it over

    I find when I have lost some code writing it again generally takes less time because the logic is still fresh in your mind


    Maybe your next app should be a little file copying app that you can set directories in, and it will back them up for you at the push of a button

  11. #11
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Visual Studio 2005

    I lost my controls on a form in 2003 once. I got them back by debugging my app with another instance of VS and found an error in code that caused it to make the designer unable to display. I fixed the error and then reopend it to see it restored. Then I saved it.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  12. #12
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Visual Studio 2005

    yea but if his raw .vb files dont have the code in them.. then I think he is out of luck

  13. #13
    Frenzied Member Mike Hildner's Avatar
    Join Date
    Jul 2002
    Location
    Des Moines, NM
    Posts
    1,690

    Re: Visual Studio 2005

    Although that hasn't happened to me (yet), I have a friend who had a similar thing happen - code just dissapears. Scary, but just one more reason to use source control. I use source control for every project, even if it's just something on my local machine.

  14. #14
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Visual Studio 2005

    hey mike, my source control in the file menu in VS 2003 is grayed out. I was thinking about that the other day... was it an option when first installing VS.NET that maybe I did not check off or something?

  15. #15
    Frenzied Member Mike Hildner's Avatar
    Join Date
    Jul 2002
    Location
    Des Moines, NM
    Posts
    1,690

    Re: Visual Studio 2005

    I think it's gets enabled when you install a source control app that plugs into the VS IDE - I don't think you get source control for free, unless of course you're MSDN, then you have a copy of Visual Source Safe.

    I used to use Source Gear Vault, but I really like the new VSS (running 2005).

  16. #16
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Visual Studio 2005

    I'm getting MSDN with my MVP award, so once it arrives I will install VSS

  17. #17

    Thread Starter
    Fanatic Member cpatzer's Avatar
    Join Date
    Sep 2004
    Posts
    537

    Re: Visual Studio 2005

    What does the source control do?
    In life you can be sure of only two things... death and taxes. I'll take death.

  18. #18
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Visual Studio 2005

    Its like a library. You add your project files to a folder and you can check out the files for modifications/updates. Then check them back in. While its checked out no one else can make mods to their copies, for when used in a multi-developer scenerio, until you check them it. Also, it keeps track of each change made in each check-in/version so if you need to rollback to a previous date you can. Its like going back in time. If your project gets corrupted or such you can always get another copy from the source safe database.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  19. #19

    Thread Starter
    Fanatic Member cpatzer's Avatar
    Join Date
    Sep 2004
    Posts
    537

    Re: Visual Studio 2005

    I would say that it is much safer to start a new project than trying to convert your existing project. Why? Because when you convert, VS inserts the designer code in your object at the top. Not good having VS write to your files. Better to start a new project with a separate Designer.vb.
    In life you can be sure of only two things... death and taxes. I'll take death.

  20. #20

    Thread Starter
    Fanatic Member cpatzer's Avatar
    Join Date
    Sep 2004
    Posts
    537

    Re: Visual Studio 2005

    Where do I get source safe for VS 2005 and VS 2003?

    Thanks,

    Christian
    In life you can be sure of only two things... death and taxes. I'll take death.

  21. #21
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Visual Studio 2005

    Quote Originally Posted by cpatzer
    Where do I get source safe for VS 2005 and VS 2003?

    Thanks,

    Christian
    it is sold seperatly from VS now...

  22. #22
    Frenzied Member Mike Hildner's Avatar
    Join Date
    Jul 2002
    Location
    Des Moines, NM
    Posts
    1,690

    Re: Visual Studio 2005

    In addition to what RobDog said, source control is invaluable if you're working on a project with multiple developers. You can tell who checked out what, and you can view the differences, so you can exactly what was done to the code. Really nice when you need to know who did what and when. If you use comments when checking in and out, it's really handy to see "Fixed bug #123" rather than have to interpret what was done.

    And of course you can roll back to some point in time, either to undo something, or because you need version 1.1 instead of the current version you're working on.

    But that's just the beginning. You can also label files or groups of files so you can find them easy. You can share files so you can use in multiple projects but there's only one copy in source control. Branching is handy when you need to diverge - like start working on version 1.2 but you may still need to fix bugs in 1.1. Later on you can merge one branch back into the other.

    Most of that fancy stuff you might not use too often. I like the safety net of knowing I can do whatever I want to do in the code, then roll back if things are disasterous.

    Just make sure to back up your source control DB!

  23. #23
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Visual Studio 2005

    A low cost alternative would be to make a little folder copy program to copy your project folder to a backup directory every morning when you log on and have each folder timestanped in its foldername. Cost = $0. Saving a corrupted project = $Priceless.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  24. #24

    Thread Starter
    Fanatic Member cpatzer's Avatar
    Join Date
    Sep 2004
    Posts
    537

    Re: Visual Studio 2005

    Too funny. Thanks for the help. I am currently doing what RobDog stated but not so frequently. If programming was my only job I might have more time for organization.
    In life you can be sure of only two things... death and taxes. I'll take death.

  25. #25
    Hyperactive Member temp_12000's Avatar
    Join Date
    Jan 2004
    Location
    LA, USA
    Posts
    411

    Re: Visual Studio 2005

    Quote Originally Posted by cpatzer
    What a piece of garbage! I just lost two days work for apparently no reason at all. All of my subs, functions and variables were just deleted by VS.NET! Only my properties remained.

    Has anyone else experienced this?

    Do you know how to get my work back?
    looks like you convert 2003 project to 2005?

    I'm using VB Express, and got this problem too. all code related with the form disappeared. do not know why.

    But the form is still at there, all controls are at there. compile, no problem. running ok on my laptop.

    jus feel weird.


    temp



  26. #26
    New Member Will B's Avatar
    Join Date
    Jan 2006
    Posts
    14

    Re: Visual Studio 2005

    Quote Originally Posted by cpatzer
    What a piece of garbage! I just lost two days work for apparently no reason at all. All of my subs, functions and variables were just deleted by VS.NET!
    Just curious, do you have SharpDevelop on your machine or has anyone opened your project with SharpDevelop? I made the mistake of trying to open a VB 2005 project with SharpDevelop and something similar happened. Needless to say, I was a bit peeved too...

  27. #27

    Thread Starter
    Fanatic Member cpatzer's Avatar
    Join Date
    Sep 2004
    Posts
    537

    Re: Visual Studio 2005

    No such thing. I think it had to do with the fact that I converted a VS 2003 project. When it converts it sticks the designer code in the main form class instead of the new way of having it put in a separate designer file. I think it just mistaked my code for it's code and wrote over it.
    In life you can be sure of only two things... death and taxes. I'll take death.

  28. #28
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Visual Studio 2005

    Well I think thats something I wont be doing or at least make a backup of the solution before converting it.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  29. #29

    Thread Starter
    Fanatic Member cpatzer's Avatar
    Join Date
    Sep 2004
    Posts
    537

    Re: Visual Studio 2005

    I find it easier just to convert the project, then create a new project and copy the files and references from the converted project into the new project. This way I get a new designer file.
    In life you can be sure of only two things... death and taxes. I'll take death.

  30. #30
    Hyperactive Member
    Join Date
    May 2005
    Posts
    258

    Re: Visual Studio 2005

    Well, the designer code still shows in a region when you convert and places that region on the main form instead of the designer file. Why not convert the project like normal, cut/paste that region into a new vb file and call it "partial class Form1"? Make sure to use the naming scheme for that file like VB.NET'05 uses on new projects and put it into the correct folder in the project folders.

    This may just save butt when doing conversions.

    I have not tried this, I actually jumped from VB6 to VB'05 with about a month in '03, but this seems like it SHOULD work.

    Let us know what happens if you try it!
    Currently Using: VS 2005 Professional

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width