Deploying an External Content Type, Error: The default web application could not be determined
I had this error today creating an External Content Type for Business Connectivity Services (BCS) in Visual Studio 2010. I had to get help resolving it so I wanted to share the resolution.
Error occurred in deployment step ‘Add Solution’: The default web application could not be determined. Set the SiteUrl property in feature BdcModelProject2_Feature1 to the URL of the desired site and retry activation.
Parameter name: properties
You can resolve this by editing the Feature1.feature file in Visual Studio 2010. Open the template and add a line to tell them what your web application is. Mine is called http://intranet.contoso.com
Add this line: <Property Key="SiteUrl" Value="http://intranet.contoso.com/" />
So the full template now looks like this:
<?xml version="1.0" encoding="utf-8" ?>
<Property Key="GloballyAvailable" Value="true" />
<Property Key="SiteUrl" Value="http://intranet.contoso.com/" />