SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So why when I add the line <%@ Import Namespace="Microsoft.Sharepoint" %> does the page error with:

An error occurred during the compilation of the requested file, or one of its dependencies. The type or namespace name 'Sharepoint' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)

Here is the code:

<%@ Page Language="C#" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Text" %>
<%@ Import Namespace="System.Threading" %>
<%@ Import Namespace="Microsoft.Sharepoint" %>
<script language="C#" runat="server">
void Page_Load(){
  DateTime modified = File.GetLastWriteTime(@"_vti_bin/listdata.svc/Conversations");
  /*while (modified == File.GetLastWriteTime(@"_vti_bin/listdata.svc/Conversations")){
  Response.Write("Change in HallPasses");

So what exactly am I doing wrong, I know I solved this problem at a previous job, I just forgot how. Help is much appreciated, thank you!

share|improve this question
up vote 2 down vote accepted

Looks like you're just spelling it wrong :))

<%@ Import Namespace="Microsoft.SharePoint" %>

"P" is capital :)

share|improve this answer
I'm an imbecile. Perhaps that's why I shouldn't work on projects this late :P – Vap0r Nov 1 '11 at 6:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.