22 aprile
- I was trying to access an old Visual FoxPro "Free Table" database (DBF) via the "Visual FoxPro VFP Driver" and I kept getting this error:
"You must first install the current version of the Visual FoxPro ODBC Driver. Go to http://msdn.microsoft.com/vfoxpro/downloads. Select Product Updates, then Visual FoxPro ODBC Driver."
I did what it said and the error still remained. It turns out you have be mindful of the version of the ODBC driver you install. In this case it wanted the older v6.0 driver and not the current v9.0 driver. I have noticed that others on the net have run into this problem so I figured I would post this little tip. To get the correct "older" driver go here:
http://msdn.microsoft.com/vfoxpro/downloads/updates/odbc/default.aspx
18 aprile
I learned a new trick today and it is worthy of the "Most Undiscoverable Feature" Award. The award goes to the Microsoft Visual Studio team for burying the "Link to Existing File" feature for Visual Studio Projects.
What is this feature you ask?
Well, it allows you to include files in your Visual Studio Projects without having to have a local copy of the file! When you do this, a "Link" is formed from your Project to the file in question.
How do I use this feature?
Normally, when you want to add a file to a project you would go: File | Add New Item... or File | Add Existing Item... - Both of these bring up a nice dialog that let you add new files to your project. Now what happens if you want to share a file across projects? The answer is to use the "Link" feature.
To get to it simply go:
- File | Add Existing Item...
- Browse to the file in question
- Click on the little "Down Arrow" that is on the "Open" button
- Select "Link" (See below)

Why would I use this feature?
Probably for the same reason I went looking for this feature in the first place! Common AssemblyInfo.cs files. The problem I had was that I had a Solution with 7 different Projects in it. They all had their own AssemblyInfo.cs files and that meant they all had there own version numbers! What I wanted to do was hook up our automated build system to increment the version number(s) for this project nightly. While doing this, it seemed silly to have to write an automation script to update 7 different files.
The odd thing about this feature is that I had never heard of it. I have been using Visual Studio for as long as I can remember, I worked at Microsoft for over three years and have interacted with MANY developers working on MANY projects and never once have I seen someone use this feature!
How does this feature work?
When you link a file in Visual Studio, the "Files" node in your Project file is simply updated with a new "File" node that looks like this:
<File
RelPath = "Candidates.cs"
Link = "..\Test\Candidates.cs"
SubType = "Code"
BuildAction = "Compile"
/>
You can read more about this feature here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/html/vxtskcreatingreferencestofilesinsolutionexplorer.asp
|
 |