in SharePoint 2010

SharePoint 2010: 'The default web application could not be determined' Error

 

When building SharePoint 2010 applications using Visual Studio 2010: This shouldn’t happen at any instance, but in an unlikely event, you may end up with this error (probably when building a custom BDC .NET assembly) :

 

Feature Deployment Error

 

Error occurred in deployment ‘Add Solution’: The default web application could not be determined. Set the SiteUrl property in feature BdcModelProject1_Feature1 to the URL of the desired site and retry activation.

Parameter name: properties

 

This occurs when the feature’s manifest is missing its SiteUrl property which determines where the feature will be deployed. Here is a simple workaround:

1) Open your Feature Designer

 

2) Click on the Manifest tab

 

Manifest Tab

 

3) Expand Edit Options and click on Overwrite generated XML and edit manifest in the XML editor. This will allow you, the developer, to handle the manifest file instead of VS2010 handling it.

 

4) Add the SiteUrl property:

<Property Key=”SiteUrl” Value=”http://<your-site-name>” />

 

5) The final manifest will look something like this:

 

image

 

Now your solution will deploy fine!

Write a Comment

Comment

Time limit is exhausted. Please reload the CAPTCHA.