Well, It’s Wed night, not Tues, but better late than never …
Q: Spawn new project/solution from old …
A: Not a directly supported concept. What I would do is simply create a brand new solution/project for my new effort. Then use Windows disk Explorer to copy the source files I wanted from one project to another. Do NOT try to copy the entire solution/project folder tree in hopes of cloning it; that will leave a mystifying mess as there are some internal linkages in the control files that will be messed up in the new/clone project.
A helpful thing to do is click the “show all files” icon in the little toolbar at the top of the Solution Explorer pane in VS. That way you see everything in the project physical folder & it also clearly shows the hidden dependent files that reside behind some content files, e.g. the .resx file connected to a WinForm.
(A single VS instance can open exactly one Solution at a time. It can open all projects & files within that Solution without limitation. If you need to see two Solutions simultaneously, open two instances of VS. I’ve had a dozen open at once; it still works fine, if a little slowly.)
With “show all files” on, you can see which files you need to copy from the source project folder to the target project folder. i.e once you indentify a file in Solution Explorer, also copy any child files. Once copied, VS Solution Explorer will show the new files within the target project. They’ll appear with a sorta-disabled looking icon. Right click & choose “Include in Project” to add them into the project. At that point the icon changes to normal & they become designable & buildable.
Aside: Files in the project can be excluded at any time by a similar right-click process. This can be handy for alternate versions, work in process, etc., that you want to temporarily exclude from building but don’t want to delete or misplace the disk file.
Related GOTCHA: “Save As” does NOT work like it does in other apps. Typically “Save As” means “Leave the current disk file version alone & save the in-RAM as-edited version under a new name.” That is NOT what it means in VS.
In VS it means “Destroy the file with the old name, save the in-RAM version under the new name, fix-up any references in any hidden component files connected to the saved-as file (.e.g. resx), and finally fix up about 98% of the other intra-project references to the old file to point to the new file”. In other words, it’s effectively Rename on steroids. And yes, it’s confusing as Hell the first time you encounter that unexpected behavior. But it makes operational sense.
Bottom line: If you want to duplicate a file to fork it into two versions or into a new project, use copy/paste in VS or WinExplorer, not VS “Save As”.
Q: C++ …
A: I am NOT a good source for C++ advice. In early .NET, C++ was all but verboten. I understand now that there is a managed flavor of it, but AFAIK, the emphasis is still on using C++ for non-managed apps with dips into managed world where needed.
My personal take (not having ever been a C++ guru) is that there’s no reason to use C++ for mainline .NET-centric dev. C# offers a similar sytax & style familiarity without the “++” nastiness. But I freely admit this is based on reading & hearsay, not practical experience. Your quote would seem to indicate C++ has migrated even closer to .NET than I realized.
Q: Runtime infrastructure & dependency …
A: If you create a C# or VB exe, or one in C++ that uses any managed features or calls, then that exe is 100% dependent on the .NET Framework. The exe will not run at all unless the Framework of the appropriate version is installed on the user’s machine.
The good news is that XP Pro Service pack 2 included the Framework v2.0, which will also run v1.1 (ie VS2003) apps. Vista includes the latest Framework version, 3.0. So many of your potential users will have the Framework installed even if they don’t realize it.
If a user w/o the Framework tries to execute your exe the loader stub will automatically invite them to the relevant MS website to download & install the needed version. For v1.1 the download is ~23MB and has zero user decisions. In other words, not a big deal for a even a clueless user with a broadband connection. Like any install, they do need administrator access to the box.
Framework versions are strictly upwards compatible, so anyone with 2.0 or 3.0 will be able to use your 1.1 stuff just fine.
Q: Meta-goals …
A: You have a sound plan & I think what you want is readily do-able.
For building straightforward Windows GUI apps, you can’t beat VB.NET / C#.NET for results/effort ratio. It isn’t hard to build good UI & the algorithmic stuff is straightforward as well. .NET incorporates very easy classes for every core data structure you might need as well as easy IO, etc. For your background, C# makes more sense than VB, so I’ll drop the refs to VB hereafter.
C# can leverage almost any existing COM library, so if you need to use somebody’s special purpose library for Finite Element Analysis or whatever, that ought to be readily doable. C++ isn’t really necessary. If you have a COM interface need, best to get comfortable with .NET in general first as COM interfacing is automatic for the simple cases, but you need to know enough to recognize the non-simple cases.
Aside: the current version of Visual Studio is 2005, which builds code for Framework v2.0. There have been many, many advances over VS2003/Framework v1.1, particularly in the built-in data structures. Since VS05 Express is free, I suggest you move to that immediately unless you have a reason to stick w/ VS03. The IDE is very similar & the code ports trivially with a built-in wizard, so your efforts to date are not wasted. The replacement for VS05 (VS07/“Orcas”) will release in about 4-6 months, so jumping to VS05 is hardly bleeding edge.
I wish you well in your explorations. This forum has several .NET pros on it and is a good resource for the high-level questions you’ve asked. For nitty gritty coding there are better places to ask Q’s.