quick fix for Beta 2 VB sample problems
Posted
Sun, Jul 29 2007 23:55
by
bill
If you've installed the Beta 2 samples for VB Orcas 2008, then you will likely find the solutions don't open. Problem is they are marked as being for "Orcas" not "2008". This quick and dirty code will fix the problem:
With My.Computer.FileSystem
Dim samplesPath = .SpecialDirectories.MyDocuments & "\VB Samples Beta2"
For Each file In .GetFiles(samplesPath, FileIO.SearchOption.SearchAllSubDirectories, "*.sln")
Dim contents = .ReadAllText(file)
contents = contents.Replace("# Visual Studio Codename Orcas", "# Visual Studio 2008")
.WriteAllText(file, contents, False)
Next
End With