I have created a BDC model and deploy it through a feature. The feature has to have a SiteUrl as specified in the feature xml below. However when I move the feature from say the development to test, acceptance or production environment, then the SiteUrl will cause a conflict and the WSP package will fail to install.
Now this is not very handy since I have to either repackage every time I move environment or fiddle with URLs / Alternate Access Mappings in the environments. My question is are there any handy approaches to this problem? So far the only approach I could think of is a custom build script. Surely there must be something handier...
<Feature xmlns="http://schemas.microsoft.com/sharepoint/" Description="This feature installs the BDC Models for the Business Connectivity Service" Id="83af2a77-02f5-4391-8bf5-917addc8029d" ReceiverAssembly="Microsoft.Office.SharePoint.ClientExtensions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" ReceiverClass="Microsoft.Office.SharePoint.ClientExtensions.Deployment.ImportModelReceiver" Scope="Farm" Title="Foobar.SharePoint.BCS BDC Models">
<Properties>
<Property Key="SiteUrl" Value="http://sparked-dev:9999" />
<Property Key="IncrementalUpdate" Value="true" />
<Property Key="ModelFileName" Value="SmartAppBDCModel\SmartAppBDCModel.bdcm" />
<Property Key="SmartAppBDCModel" Value="BdcAssemblies\Foobar.SharePoint.BCS.dll" />
</Properties>
<ElementManifests>
<ElementFile Location="SmartAppBDCModel\SmartAppBDCModel.bdcm" />
<ElementFile Location="BdcAssemblies\Foobar.SharePoint.BCS.dll" />
</ElementManifests>
</Feature>