Have you ever been into a situation when you have written a code which initiate a SPFarm with simple line of code and when you execute, you get SPFarm as null though you are running windows application on the server itself. What went wrong?
So go to the project properties and check for the build version. When you create a project, there are chances that the project is created in the x86 environment, so go ahead and change it to x64 because SharePoint code cannot run in x86 set up.
Problem must be solved now.
No comments:
Post a Comment