In short, I am currently working on a research problem for my university that focuses on Model Transformations for service oriented solutions based on an Analysis and Design Methodology. After a meta-model has been gathered, my job is to transform this requirements into a workable and deploy-able WCF Component Service Library. So far I have been successful with transforming all required objects into C# code using Pre-Processed Text Templates, however my questions are:
- How can I group all generated files together with a build-able project file (*.csproj). I don’t want the user to have to create a new project and add the generated files manually. Instead one should be automatically generated with all files included and assemly references added and the user should be able to open the project from a location on disk.
- What will be the best approach to go about or manage assembly references and how will i be able to include them during runtime? I.e. to mark an Interface with [
ServiceContract] attribute I would firstly need to add Systems.ServiceModel as reference to the project and secondly include it in the module. How can this be done? - Lastly how to generate the web.config configuration file to define service behaviors, endpoint addresses, bindings or any other needed settings. I don’t feel T4 templates is the right approach for this.
Any recommendations or guidance on the above stated problems will be greatly appreciated.
Aha, I was able to accomplish this by using Predefined project templates with assembly references and a default web.config already included. After my transformations have been completed, i will update the appropriate sections in the web.config with details relevant to the transformed service.