I personally installed wordpress severals times locally as i could only make the dynamic discover feature work maybe once or twice each time i installed, then I would get this error. After trying several different server setups i almost gave up. Today I was working with wordpress outside of dreamweaver and was looking for a way to change permalinks to have a php extension. After looking for a while I noticed people kept talking about making differnet servers like xamp able to handle permalinks. Then the light came on for me and I realized each time I installed wordpress I would eventually change the default permalink to day and name. So I turned it back to default in wordpress and bingo I could now discover the files. Tried this several times to make sure this was the issue. Yippe!!
Dreamweaver CS5- dynamically-related files could not be resolved because the site definition is not correct for this server