Currently when generating a class with SPMetal from a site that has spaces in it
SPMetal.exe /web:"http://flxdev2010:19000/PWA/Test Plan" /namespace:ProjectSite /code:ProjectSite.cs
It will give
Error the web at 'http://flxdev2010:19000/PWA/Test Plan' could not be found
Oh dear, a schoolboy error.
Now you could use stsadm to dump out the site, delete and reimport, yikes. Or you can just rename the Url as ServerRelativeUrl is read/write (any outside links point to the Url will not be fixed up!)
Using a quick console app
using (SPSite site = new SPSite("http://flxdev2010:19000/PWA/Test Plan"))
using( SPWeb web = site.OpenWeb())
{
string s = web.ServerRelativeUrl;
web.ServerRelativeUrl = "/PWA/TestPlan";
web.Update();
}
or that new fangled 4 year old PowerShell thingy
Start-SPAssignment -Global
$web.Title = "/PWA/TestPlan"
$web.Update()
Stop-SPAssignment -Global
SPMetal.exe /web:"http://flxdev2010:19000/PWA/TestPlan" /namespace:ProjectSite /code:ProjectSite.cs
now works.
you can change it back once you have the definition.