|
-
Jan 13th, 2006, 01:06 PM
#1
Thread Starter
Fanatic Member
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.
-
Jan 13th, 2006, 01:10 PM
#2
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 Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API 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 
-
Jan 13th, 2006, 01:11 PM
#3
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...
-
Jan 13th, 2006, 01:14 PM
#4
Thread Starter
Fanatic Member
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:
#Region "VARIABLE DECLARATIONS"
#Region "DB VARIABLES"
#End Region
#Region "CONSTANTS"
#End Region
#End Region
#Region "PROPERTIES"
Public ReadOnly Property Issue() As String
Get
'Parse date into YYYY-MM-DD format for folder issues
Dim TempDate As Date = DateTimePickerIssue.Value
Dim Month As Single = DateTimePickerIssue.Value.Month
Dim Day As Single = DateTimePickerIssue.Value.Day
Dim MonthString As String = Month.ToString
Dim DayString As String = Day.ToString
If Month < 10 Then
MonthString = "0" + Month.ToString
End If
If Day < 10 Then
DayString = "0" + Day.ToString
End If
Return DateTimePickerIssue.Value.Year.ToString + "-" + MonthString + "-" + DayString
End Get
End Property
Public ReadOnly Property IssuePath() As String
Get
Return BaseFolder + "\" + Issue
End Get
End Property
Public ReadOnly Property FormattedIssue() As String
Get
Dim TempDate As Date = DateTimePickerIssue.Value
Return TempDate.ToLongDateString
End Get
End Property
Private ReadOnly Property CurrentFolder() As String
Get
Return TabControlFolders.SelectedTab.Tag.ToString
End Get
End Property
Private ReadOnly Property CurrentStoryFolderPath() As String
Get
Return BaseFolder + "\" + Issue + "\" + CurrentFolder
End Get
End Property
Private ReadOnly Property CurrentImagesFolderPath() As String
Get
Return BaseFolder + "\" + Issue + "\" + CurrentFolder + "\Images"
End Get
End Property
Private ReadOnly Property SelectedFolderTab() As TabPage
Get
Return CType(TabControlFolders.SelectedTab.Controls(0), TabControl).SelectedTab
End Get
End Property
Private ReadOnly Property FileSelected() As Boolean
Get
If VisibleListView.SelectedItems.Count > 0 Then
Return True
Else
Return False
End If
End Get
End Property
Private ReadOnly Property VisibleListView() As ListView
Get
Return CType(SelectedFolderTab.Controls(0), ListView)
End Get
End Property
Private ReadOnly Property Writers() As Collection
Get
Return _Writers
End Get
End Property
Private ReadOnly Property SelectedFile() As ListViewItem
Get
If Not IsNothing(VisibleListView) Then
If VisibleListView.SelectedItems.Count > 0 Then
Return VisibleListView.SelectedItems(0)
Else
Return Nothing
End If
Else
Return Nothing
End If
End Get
End Property
Private ReadOnly Property SelectedFileName() As String
Get
If Not IsNothing(VisibleListView) Then
If VisibleListView.SelectedItems.Count > 0 Then
If Not IsNothing(VisibleListView.SelectedItems(0).Tag) Then
Return CType(VisibleListView.SelectedItems(0).Tag, DJCFileInfo).FileName
End If
End If
End If
Return String.Empty
End Get
End Property
#End Region
#Region "INIT"
#End Region
#Region "UPDATE CONTROLS"
#End Region
#Region "CONTROLS"
#End Region
#Region "DATABASE"
'Runs database query.
'Don't forget to call DBReader.Close() after using the reader returned
#End Region
#Region "MAIN MENU"
#Region "FILE MENU"
#End Region
#Region "EDIT MENU"
#End Region
#Region "RESOURCES MENU"
#End Region
#End Region
#Region "ISSUE PICKER"
#End Region
#Region "EVENT HANDLERS"
'Drag Drop Event Handers
#End Region
In life you can be sure of only two things... death and taxes. I'll take death.
-
Jan 13th, 2006, 01:16 PM
#5
Re: Visual Studio 2005
did you look in the raw .vb files to see if anything is in them??
-
Jan 13th, 2006, 01:17 PM
#6
Thread Starter
Fanatic Member
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.
-
Jan 13th, 2006, 01:17 PM
#7
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 Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API 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 
-
Jan 13th, 2006, 01:21 PM
#8
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
-
Jan 13th, 2006, 01:23 PM
#9
Thread Starter
Fanatic Member
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.
-
Jan 13th, 2006, 01:27 PM
#10
-
Jan 13th, 2006, 01:30 PM
#11
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 Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API 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 
-
Jan 13th, 2006, 01:31 PM
#12
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
-
Jan 13th, 2006, 01:32 PM
#13
Frenzied Member
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.
-
Jan 13th, 2006, 01:34 PM
#14
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?
-
Jan 13th, 2006, 01:42 PM
#15
Frenzied Member
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).
-
Jan 13th, 2006, 01:43 PM
#16
Re: Visual Studio 2005
I'm getting MSDN with my MVP award, so once it arrives I will install VSS
-
Jan 13th, 2006, 01:53 PM
#17
Thread Starter
Fanatic Member
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.
-
Jan 13th, 2006, 02:25 PM
#18
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 Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API 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 
-
Jan 13th, 2006, 02:37 PM
#19
Thread Starter
Fanatic Member
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.
-
Jan 13th, 2006, 02:38 PM
#20
Thread Starter
Fanatic Member
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.
-
Jan 13th, 2006, 02:48 PM
#21
Re: Visual Studio 2005
 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...
-
Jan 13th, 2006, 02:50 PM
#22
Frenzied Member
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!
-
Jan 13th, 2006, 02:52 PM
#23
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 Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API 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 
-
Jan 13th, 2006, 02:55 PM
#24
Thread Starter
Fanatic Member
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.
-
Jan 14th, 2006, 03:03 AM
#25
Hyperactive Member
Re: Visual Studio 2005
 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
-
Jan 15th, 2006, 07:22 PM
#26
New Member
Re: Visual Studio 2005
 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...
-
Jan 19th, 2006, 07:49 PM
#27
Thread Starter
Fanatic Member
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.
-
Jan 19th, 2006, 07:51 PM
#28
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 Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API 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 
-
Jan 19th, 2006, 08:33 PM
#29
Thread Starter
Fanatic Member
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.
-
Jan 20th, 2006, 08:43 AM
#30
Hyperactive Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|