Instead of writing
<@ Import Namespace="Microsoft.SharePoint" %>
on every view I create I know I can easily just edit my web.config
file and add this:
...
<pages>
<namespaces>
<add namespace="Microsoft.SharePoint" />
</namespaces>
</pages>
But this doesn't seem to work in design time. Visual Studio 2010 is not able to see SPContext
unless I add these two lines on top of my view as well:
<%@ Assembly Name="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
So how do I add assemblies globally as well as import namespaces so VS will be able to resolve classes/objects?