I have recently updated to Config Services 5.0 from 2.0 and I have found that the signature for the ServiceHostInfo class constructor has changed. The documentation shows it being used roughly the same way [as in v2] but my current syntax fails. I tried to use the example directly in code and it also failed (param count not valid). So why isn't there a constructor that works like V2. And how do I use the new one - no documentation for it (current doc is close - but looks to be out of date).
The old signature was the following:
publicServiceHostInfo(stringhostName, boolisWorkflowHost, List<Type> workFlowHostContractInterfaces, object serviceBehaviors, objectinstanceOfServiceImplementationClass)
The new signature now is the following:
publicServiceHostInfo( boolisWorkflowHost, List<string> workFlowHostContractInterfaces, object serviceBehaviors, objectinstanceOfServiceImplementationClass)
It looks like the main difference is the HostName variable - which has been removed. I'll assume this is not really necessary and the object should work as before. Just want to make sure there isn't any preamble steps that had to be made to get the same results as before.
- Edited by Peter Simard Wednesday, June 20, 2012 7:22 PM
The best bet to get started with 5.0 is to use the new VS Wizard to create a blank Config Service solution, and that solution will show the new constructors, etc in the generated code. You can read the document here: https://azureconfigweb.cloudapp.net/Develop.aspx on how to use the Wizard.
Its the first document link on the page.
The VS Config Service Wizard for VS 2010 is installed with StockTrader 5.0, and should be available as the tutorial shows.
For Config Service 5.0, unfortunately, you do need to do manual migration from 2.x versions. But the Wizard makes it very straightforward to create a clean base solution from which to start, and then can migrate web.config/app.config, replace in generated solution your implementation logic, data access logic, etc. You will need to use ConfigWeb to re-create your repositories from your existing, or could write T-SQL scripts or import/export in SQL Server to move data into new repository tables.
Greg Leake, Microsoft
- Marked as answer by Peter Simard Tuesday, July 10, 2012 5:11 PM