Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm trying to make a console application that updates a Sharepoint list as a scheduled task. For some reason when I try to build the console app, I get the following error message.

"The type or namespace name 'SharePoint' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)"

However, I have added Micorosft.Sharepoint.dll, and I can see it in my references folder. I have also copied and pasted the dll to a different directory and referenced that one incase there was an access issue.

I've written webparts using WSPBuilder before without a problem. Any idea what could be causing this?

sharepoint 2007, visual studio 2010

share|improve this question
    
Are you running this console application on the server itself? –  James Love Oct 27 '10 at 19:04
    
Yes, I'm on the server –  pinniger Oct 27 '10 at 19:08

1 Answer 1

up vote 1 down vote accepted

Some ideas:

1) Try Clean Solution from the solution context menu.

2) Make sure that your projects are targeting .NET 3.5 (not 4.0 client profile)

3) Make sure your build is configured to target "Any CPU"

share|improve this answer
    
Perfect, I forgot to change the target to .net 3.5. Thanks. –  pinniger Oct 27 '10 at 19:09

Your Answer

 
discard

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.