This project is read-only.

BCS Model deployment

Sep 17, 2013 at 4:37 PM
We're deploying BCS models via SPSD. The only issue we're facing is the need to explicitly set the SiteUrl property in the BCS feature manifest. Is it possible to use SPSD's variable infrastructure to set this in the environment configuration rather create a specific wsp per environment?

Our current feature xml looks like this:

<?xml version="1.0" encoding="utf-8" ?>
<Feature xmlns="">
<Property Key="SiteUrl" Value=""/>
Sep 17, 2013 at 7:34 PM
Edited Sep 17, 2013 at 7:49 PM
Unfortunately that is not possible.
SPSD is not changing any WSP or the deployed content. That is entirely you responsibility :)

BUT :)
The next major release of SPSD (which is planned to come very soon) will include a new Extension feature which allows you to create your custom "Plugins".
SPSD will execute them automatically and you can register them to events during deployment.

Furthermore these extensions allow to define your custom XML which will have all the benefits of variable replacements.

So what you could do then is
  1. Deploy your BCS model via a SPSD PowerShell extension and add replacement variables into the XML or
  2. Run a custom target which add as property into a property bag (e.g. webapp) and which is then used by your feature (which can be activate also through SPSD)
2 would work already now.

Let me know how you solved it :)
Sep 17, 2013 at 7:47 PM
Thanks for the reply... so to be clear on number 2, we would:
  • Set an environment specific variable in the environment.xml file
  • Use a custom target action (after deploy probably) to set the variable in the webapp's property bag
  • Use a feature receiver to set the SiteUrl property from the property bag for the BCS model on activation
Sep 17, 2013 at 7:50 PM
Edited Sep 17, 2013 at 8:48 PM
Sorry for the capital 2 ;) autoformating of CP bit me...

Exactly that would be a possible approach. Not perfect but it would make it configurable from the deployment
Sep 18, 2013 at 2:28 PM
So the final solution is more or less what was outlined above... It works very well, although I'm not thrilled about storing the deployment data (SiteUrl) in the WebApp's property bag.

This approach allows us to treat the environmental configuration as a deployment issue rather than a packaging issue.
Sep 18, 2013 at 3:25 PM
Thanks for getting back.
I can understand that you don't like it to be stored in the property bag.
You could remove it again after feature activation, but then you will break the feature for re-activation :(

Deploying the BCS directly through PS as outlined as future alternative would solve that.
My approach is usually that (almost) everything which is done only once will be done through PS in SPSD (with separate plugable scripts)
This could be eg.:
  • creation of logging areas and categories,
  • configuration of farm, webapp,
  • activation of features on existing sites to bring them up-to-date,
  • creation of contenttype hub
  • import of termsets
So the creation of a BCS model would fit into that rule in my case.

To achieve this will be extremely easy once I have released SPSD with the extension system
Sep 18, 2013 at 4:34 PM
SPSD is a fantastic set of tools... I look forward to next major release. SPSD is far more robust than our homegrown set of scripts, to be sure.
Sep 18, 2013 at 5:35 PM
Thanks for the feedback!
Feel free to review the release ;)