locked
Suggestion for DssNewService or DssProjectMigration RRS feed

  • Question

  • I find myself often copying existing services to create a new one. I can't use DssNewService with the /clone qualifier because this creates an empty shell. What I want to do is keep all of the code intact, and just change the name of the service, i.e. the Solution name, Project name, Namespace, Service name, etc.

     

    So, a suggestion for V2.0 (assuming you don't already have enough to do) -- Provide a way to truly "clone" a service that copies everything.

     

    Maybe it could be something like:

    DssProjectMigration /newservicename:xxx path-to-solution

     

    Then I could just copy the solution first and change it without having to go through all the files and do a global search and replace. Or perhaps it should rename the files too? Hmm, it's starting to get too complicated.

     

    Thanks,

    Trevor

     

    Friday, February 8, 2008 1:28 AM

Answers

  • trevor thank you for the suggestion but it is a bit too complicated to automate. I would recommend /clone and then good ol' cut-n-paste

     

    thanx

    g

     

    Friday, February 8, 2008 4:29 PM

All replies

  • trevor thank you for the suggestion but it is a bit too complicated to automate. I would recommend /clone and then good ol' cut-n-paste

     

    thanx

    g

     

    Friday, February 8, 2008 4:29 PM
  • It seems to me it should be straightforward to write a script that would change the service namespace, name, state, operations port and contract.  ... but the devil's in the details. :-)

    I have a service pattern that I use frequently and I've wondered from time to time if I should try to create a visual studio template for it.  This might be a reasonable approach if you have a certain service structure that you plan to reuse frequently.



    Friday, February 8, 2008 8:21 PM
  • Thanks for the response George. I know it's not as straight-forward as is sounds because there is no universal naming convention for things like service state.

     

    Rob --

    It's not a case of re-using the same code. For example, I want to create a webcam for a PDA based on a Flycam camera. The closest service (in terms of code) to what I want is probably the IPCamera. So I want to copy the entire thing and hack it. This is doable -- you just copy and rename all the files, then edit every file, including the .csproj, and do a global search and replace on the service name. However, it is a tedious process. I've done it several times, and every time I think "this should be automated".

     

    Trevor

     

    Saturday, February 9, 2008 7:27 AM