HOWTO: VS 2008 Fix for ASP.Net MVC and xUnit.net new project errors

Posted by

This may have been fixed by now with the release of ASP.Net MVC 1.0 RC, but using ASP.Net MVC Beta 1 to create a new project with xUnit.Net tests always generated the error “The name ‘GlobalApplication’ does not exist in the current context” when you first compile, something a bit daunting to any developer now trying to ‘get’ ASP.Net MVC.

This Codeplex discussion has the answer.

Basically rename all instances of GlobalApplication to MvcApplication in the Test project and things should compile and run fine. If you want to know exactly why this works, you can take a read of this cool article on the anatomy of an ASP.Net MVC Application.

One comment

  1. Just the help I was looking for. There’s nothing worse than running into a build error when you’re first trying to grok up on a new technology. šŸ™‚

    Thanks ver much.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.