SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Error occurred in deployment step 'Add Solution': The default web application could not be determined. Set the SiteUrl property in feature xxx to the URL of the desired site and retry activation.Parameter name: properties.

I know you can set this manually in feature properties to a predefined url. But we have lots of different environments with different urls? Any ideas on how to solve this?

This is only a problem/required for Visual Studio deploys on certian developer environments, but if one developer sets an url manually it will fail for other environments as well.

share|improve this question
up vote 1 down vote accepted

Ensure that you have a Web Application at port 80 or 443 with a site collection at the root.

This is needed for the BCS ImportModelReceiver feature receiver to work properly. This receiver is located in the Microsoft.Office.SharePoint.ClientExtensions.dll (Microsoft.Office.SharePoint.ClientExtensions.Deployment.ImportModelReceiver). You can see the code that checks for the Web Application in the GetDefaultWebAppUrl method.

Hope this helps.


share|improve this answer
Great work, works incredibly well. :) – HaavardMeling Apr 5 '11 at 7:57

Do you mean the SiteUrl defined for the project? You can try setting this to http://localhost/.

share|improve this answer
No this is specific for BCS projects. The project SiteUrl is set. This is in the feature elements file. – HaavardMeling Apr 1 '11 at 13:11

Your Answer


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.