Groups | Blog | Home
all groups > visual studio .net documentation > september 2003 >

visual studio .net documentation : MSDN Favorites not migrating to VS 2003


ken busse
9/13/2003 1:35:26 PM
My favorites links are not getting migrated from my VS.Net
2002 installation to my 2003 VS.Net install. Clicking on a
link produces "The page cannot be displayed" error.
The links should have been updated but your install didn't
do this. The good link below works fine, the bad doesn't.

The problem lies in the MS.VSCC.2003 vs. the MS.VSCC .
I have way too many links to update by hand.
How do I fix this?

Good link:
ms-
help://MS.VSCC.2003/MS.MSDNQTR.2003JUL.1033/cpguide/html/cp
concacheapis.htm
Bad link:
ms-
help://MS.VSCC/MS.MSDNQTR.2003JUL.1033/cpguide/html/cpconca
chingportionsofaspnetpage.htm


v-felwa NO[at]SPAM online.microsoft.com
9/15/2003 11:31:30 AM
Hi Ken,

I understand your situation here. It is quite difficult to manually remap
the links (e.g. map MS.VSCC to MS.VSCC.2003). So I wrote a C# console
program that may automate your work. The program will enumerate all the
".url" files (which are the bookmark files) in the current folder and
replace the string with the value you specify. Hopefully it may help you
correct these bookmarks.

1. Create a new C# Console application. Clear the existing code and paste
in the code below.
2. Compile the code and generate "ConsoleApplication1.exe".
3. Go to the "\Document and Settings\<user name>\Favorites" and backup the
folder.
4. Copy the "ConsoleApplication1.exe" to the "Favorites" folder.
5. Double click the "ConsoleApplication1.exe"
6. Input the value you want to replace (e.g. "MS.VSCC") and press enter
7. Input the new value (e.g. "MS.VSCC.2003") and press enter

As far as I know, the URL difference between MSDN 2003 and 2002 help sets
may not be as simple as "MS.VSCC.2003 vs. the MS.VSCC ". Please
double-check this.

using System;
using System.IO;

class UpdateURL
{
public static void Main(string[] args)
{
Console.WriteLine("Input the original value to be replaced and press
enter:");
string originalValue = Console.ReadLine();
Console.WriteLine("Input the new value to replace the original and press
enter:");
string newValue = Console.ReadLine();
string[] files = Directory.GetFiles(".", "*.url");
foreach (string fileName in files)
{
Console.WriteLine(fileName);
try
{
String line;
using (StreamReader sr = new StreamReader(fileName))
{
line = sr.ReadToEnd();
sr.Close();
}
line = line.Replace(originalValue, newValue);
using (StreamWriter sw = new StreamWriter(fileName))
{
sw.Write(line);
sw.Close();
}
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
}
}

Regards,

Felix Wang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
ken busse
9/29/2003 11:50:02 AM
I have well over 200 of these URLs and the fix you gave me
is semiautomated. When I had a Universal subscription,
someone at Microsoft fixed this with a program that was
full automated. I didn't keep it because I was told that
the fix would be incorporated in later releases.
Where can I get this fix?
Ken

[quoted text, click to view]
v-felwa NO[at]SPAM online.microsoft.com
9/30/2003 5:28:58 AM
Hi Ken,

Thanks for your reply.

I am sorry but I am not aware of such a tool. Do you still have the contact
information of that colleague? If you do, I can check with him and send you
the tool.

If your book marks are organized in multiple folders, we can use another
way to update them:

1. Open IE
2. Select File > Import/Export to launch the Wizard
3. Export the Favorites
4. Open the Bookmark.htm file
5. View the Source (View > Source)
6. Replace (Ctrl + H) the obsolete URL string with the new one. Save the
file.
7. Reimport the favorites by launching the wizard again in IE

I hope the information I have provided here is useful to you.

Regards,

Felix Wang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
AddThis Social Bookmark Button