How to avoid Run Time Errors while deploying SharePoint 2010 Solutions

Posted By  Mostafa Elzoghbi On 27 Oct 2010 08:10:06
emailbookmarkadd commentsprint
No of Views:1881
Bookmarked:0 times
Votes:0 times

Introduction

Through my discussions with developers and attendees in SharePoint Events, I was getting a lot of questions about the target .net framework for applications and solutions that are built against Server and Client Object Model in SharePoint 2010.

I decided to list the things you need to take care and set before start compiling and deploying your solutions and getting runtime errors using SharePoint object model.

1) If you are developing a SharePoint 2010 Solutions. You solution has to target .NET Framework 3.5 Only and Not 4.0.

2) Also, if you build your solutions as layers and you have different projects ( Non SharePoint Project) all are used within your SharePoint project, ALL OF THEM HAVE TO TARGET .NET FRAMEWORK 3.5 as well.

3) Your target CPU platform can't be x86. Even if you are building a console application using the client object model. The Solution ? Next Point.

4) It's recommended that all your projects to target Any CPU platform, You can't have some projects are targeting x86 ( Such as Console Application ) that are referencing x64 CPU platform.

5) You have the option "Less Recommended" to target all your project to x64. but in this case your solution will not be able to run on x86 machines. Instead, Select Any CPU platform as recommended on Point 4.

6) If you made all your projects to target Any CPU, the only point you have to put in your consideration is the file size for your solution will be bigger than if you target x64 CPU platform.

7) If you decided to enable x64 configuration, here is the steps you need to do in VS 2010 and the resource of this post:
http://msdn.microsoft.com/en-us/library/ff407621.aspx


Hope this helps.

Sign Up to vote for this article
Other popular Tips/Tricks
Comments
There is no comments for this articles.
Leave a Reply
Title:
Display Name:
Email:
(not display in page for the security purphase)
Website:
Message:
Please refresh your screen using Ctrl+F5
If you can't read this number refresh your screen
Please input the anti-spam code that you can read in the image.
^ Scroll to Top
</