I am using ASP.NET MVC 4 Dependency Injection like 

```
DependencyResolver.Current.GetService<IUserContext>();

```

which works fine in Visual studio but when I am building project with msbuild I always get this exception:

```
BaseClasses\EntityRepositoryBase.cs (68,40): errorCS0103: The name 'DependencyResolver' does not exist in the current context

```

what can I do? I installed mvc4 again but is the same.