comment: make sure your code files are where you think they are

V

vbDavidC

Hello,

I thought I would pass along a problem that happened to me that I'd
like to pass along.

This problem happened to me in VB6 but I suspect it could happen in
later versions of Visual Studio.

Make sure that all the files that go with a project are saved in the
area you are assuming.

I accidentally had a bas file that was (mistakenly) in my 'Start Menu'
folder under Documents and Settings\All Users. I normally keep all my
source code projects under one main folder with each project in its
own folder. I would back up this main folder on a regular basis but
that one errant file never got backed up. I reformatted/reinstalled
the OS on my PC and did not backup this file and it is lost forever.

Long winded version.

I keep all my code under one START folder (say C:\TESTING). My source
code folder is one of the subfolders underneath it with each project
in its own folder. I would regularly make backups of either the the
START folder or the SOURCECODE folder. Anyway, I reinstalled my OS
during the New Year holiday. I backed up all my files that were in my
standard folders (My Documents, and my TIRETESTING folder). Anyway,
yesterday I needed to test some of my code and received the error msg
'Path not found: C:\Documents and Settings\All Users\Start Menu
\Programs\Instruments\Measurement Studio\DAQ.bas -- continue loading
project?' Anyway, I don't know how my BAS module got copied there,
but it was me who made the mistake. My original DAQ.bas was in
Project1 and I loaded into this Project2. I immediately did a SAVE AS
as not to make changes to Project1 and thought I copied it to the
Project2 folder. The path when I selected SAVE AS must have been in
this funky folder which I should have noticed. I was faithful about
making backups of my code folders but since this one file was
somewhere I did not expect it to be it never got backed up.

I used to use Visual Source Safe but stopped a year or so. That one be
one thing that would have helped.

Oh well.
 
D

dunawayc

This problem happened to me in VB6 but I suspect it could happen in
later versions of Visual Studio.

It's not clear to me, from the description of your problem, how VB6 or
any version of Visual Studio contributed to the problem? Your comment
is generally sound advice, but can you list a set of steps that causes
the problem to occur?

Chris
 
V

vbDavidC

It's not clear to me, from the description of your problem, how VB6 or
any version of Visual Studio contributed to the problem?  Your comment
is generally sound advice, but can you list a set of steps that causes
the problem to occur?

Chris

Chris,

It is not really a problem with VS. I think it was a stupid thing
that happened that is hard to catch.

I am not sure exactly how the problem occurred. I had copied an
existing bas module to a new project I was working on. I did a 'Save
As' to save it in my new project's folder. I don't know how that 'All
Users' folder became the 'current' folder but it did. Maybe I
changed the 'current directory' in my code and VS got confused.I am
not blaming VS for causing the problem, I should have double checked
the path in that Save As dialog.

That is why I mentioned using Visual Source Safe (VSS) or some other
configuration management tool that requires you to 'check in' your
code to a database.
Also, in most businesses with a software team when you have a build
process you are not building the exe on the same machine you are
developing on. But if you are single person developing and building
your apps on the same computer you would not realize you have this
problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top