Link to home
Start Free TrialLog in
Avatar of niyasfairose
niyasfairose

asked on

Unable to deploy visual web part in SharePoint

I am trying to create a Visual Web Part in Visual Studio 2012 for SharePoint 2010.

It builds fine but while deploying gives error : "Error occurred in deployment step 'Add Solution': Operation is not valid due to the current state of the object".
 
(This happens also with a blank sharepoint project)

Any suggestions?
ASKER CERTIFIED SOLUTION
Avatar of Uttam (Kukdai) Dhakal
Uttam (Kukdai) Dhakal
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of niyasfairose
niyasfairose

ASKER

The first two suggestions I tried earlier but did not work.
Hi Niya,

Please try the following steps:
1. Project >> Properties >> Application >> Target Framework
set it to 'Framework 3.5'
2. Project >> Properties >> Build >> Platform Target
try 'Any CPU'

Do let us know if you need more help..
Enjoy!!.