Globally, add "<@Assembly>" and "<namespace @Import>" in Asp.net MVC views
Instead of recording
<@ Import Namespace="Microsoft.SharePoint" %>
in every view that I create, I know that I can just edit my file web.configand add this:
...
<pages>
<namespaces>
<add namespace="Microsoft.SharePoint" />
</namespaces>
</pages>
But this does not work during development. Visual Studio 2010 cannot see SPContextunless I add these two lines on top of my view:
<%@ Assembly Name="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
So, how do I add assemblies around the world and also import namespaces so that VS can resolve classes / objects?