|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Moving a project from 2003 to 2005Just getting started with VB2005 and unsure how best to move active
VB2003 projects into the VB2005 environment. Nornally I've versioned my VB2003 projects at specific development points by starting a new (blank) project and using Add Existing Item to import all the files from the previous project version before saving in a new folder location belonging to the new project. But on doing this in the VB2005 environment I find I've got a couple of 'multiple definitions with identical signatures' errors in code belonging to the form designer itself. Presumably some aspects of the way the 2003 form designer worked are now deprecated or otherwise unworkable in the 2005 designer. Any suggestions as to how to fix these errors please? JGD John,
Are you sure it are "Errors". In VB2005 is now added "Warnings", I cannot say they mean nothing, however it is not more than it say, warnings and they are given on many places a VB programmer would not even think on to do it and in the idea of some of us even to often from a kind of C# thinking (See the long thread now active about passing the ""). I assume that you are talking about window forms projects. I hope this gives an idea. Cor On Mon, 13 Feb 2006 10:21:32 +0100, "Cor Ligthert [MVP]"
<notmyfirstn***@planet.nl> wrote: >John, Thanks. Yes this is a Windows Form project. And yes these are> >Are you sure it are "Errors". In VB2005 is now added "Warnings", I cannot >say they mean nothing, however it is not more than it say, warnings and they >are given on many places a VB programmer would not even think on to do it >and in the idea of some of us even to often from a kind of C# thinking (See >the long thread now active about passing the ""). > >I assume that you are talking about window forms projects. > definitely 'errors' - there are many other 'warnings' (it's a reasonably large project). But the warnings I can understand for the most part and deal with if necessary. The errors are stopping me compiling the project under 2005. I've found the Convert Project option, which seems to run - unsurprisingly - if you open the 2003 project from its original location in 2005. But AFAICS the code files (ie the .vb files) remain unchanged. I guess what I'm confused about is that the automatically-generated form code, which is what is generating my errors, isn't changed in the ..vb files, yet something external to them is clearing the errors in a converted 2005 environment. But until I understand this issue then I'm not comfortable continuing to work in 2005 because I don't know how - reliably - to make a new version of my project. JGD John,
Can you give us an example in code? Beside that anoying 'multiple definitions with identical signatures' I hope that it will be fixed in SP1. In those cases as with the dialog.result, you have to give the full path. System.Windows.Forms.DialogResult.OK Cor Show quoteHide quote "John Dann" <n***@prodata.co.uk> schreef in bericht news:ovq0v110ovnkq3k0tcb3ejnpog5dcnqk9j@4ax.com... > On Mon, 13 Feb 2006 10:21:32 +0100, "Cor Ligthert [MVP]" > <notmyfirstn***@planet.nl> wrote: > >>John, >> >>Are you sure it are "Errors". In VB2005 is now added "Warnings", I cannot >>say they mean nothing, however it is not more than it say, warnings and >>they >>are given on many places a VB programmer would not even think on to do it >>and in the idea of some of us even to often from a kind of C# thinking >>(See >>the long thread now active about passing the ""). >> >>I assume that you are talking about window forms projects. >> > > Thanks. Yes this is a Windows Form project. And yes these are > definitely 'errors' - there are many other 'warnings' (it's a > reasonably large project). But the warnings I can understand for the > most part and deal with if necessary. The errors are stopping me > compiling the project under 2005. > > I've found the Convert Project option, which seems to run - > unsurprisingly - if you open the 2003 project from its original > location in 2005. But AFAICS the code files (ie the .vb files) remain > unchanged. > > I guess what I'm confused about is that the automatically-generated > form code, which is what is generating my errors, isn't changed in the > .vb files, yet something external to them is clearing the errors in a > converted 2005 environment. But until I understand this issue then I'm > not comfortable continuing to work in 2005 because I don't know how - > reliably - to make a new version of my project. > > JGD On Mon, 13 Feb 2006 12:57:43 +0100, "Cor Ligthert [MVP]"
<notmyfirstn***@planet.nl> wrote: >Can you give us an example in code? Well if necessary I will, but it's not so much a specific error thatI'm concerned about, more that I don't understand or know how to do something that's important to me. Can I go back to my original question? In the past under VB2003 I've always found it useful to version my programs. In other words, when I've achieved a development milestone with a given code version, to freeze that code and begin a new development stage with a new copy of the code from the previous stage. To do this, I start a new empty (eg WinForms) project with an incremented name and with the files saved in a new folder location, eg MyProject8xx, and with that project open then use 'Add Existing Item' to import all the .vb files (and only the .vb files) from the previous version. This has worked fine in the past within VB2003. But in trying it under VB2005 I get these various errors apaprently associated with the Form Designer-generated code. This is true whether or not I try to import the .vb files from an 'old' VB2003 folder or one that's been opened under VB2005 and notionally converted. It seems that there is something external to the .vb files that needs importing too. (This seems a bit of a backward step or at least inelegant in that the complete code for the converted file is no longer contained within eg a form's .vb code. But be that as it may...) Is there a better way of versioning my projects under VB2005? JGD John,
You can copy complete folders to create those milestones. Is that what you ask (I assume you are not using SourceSave). I do that for 2003 and for 2005. Cor No not using SourceSave, And yes folder copying is one option for the
milestone versions. But: I did like the idea of importing individual .vb files because it meant that by importing only those specific files I could clear out at every stage any classes or forms that I had started but then thought better of and subsequently discarded but not deleted. This 'cleaning' process isn't quite as simple to apply with folder copies. What is the minimum file/folder set that I can copy? Maybe I could copy all of the files in the top level of the project folder but none of the subfolders, ie \bin and the like. Yes I may need to reference external dll's again but I don't mind that - it helps me to stop a project going stale with references that are no longer needed. And a recompile isn't a big deal. And I need to increment the project name for the new version, but maybe that's easy even after a folder copy. I'll need to check into that. JGD On Mon, 13 Feb 2006 13:45:49 +0100, "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote: Show quoteHide quote >John, > >You can copy complete folders to create those milestones. Is that what you >ask (I assume you are not using SourceSave). I do that for 2003 and for >2005. > >Cor > John,
A not converted VBNet form class has at least three files The form.vb, the form.designer.vb and the form.resx The same is with a generated dataset which has even more. However there are more file types now. I would keep it with copying it complete to a compressed folder. Just my idea. Cor |
|||||||||||||||||||||||