|
Home > Archive > BizTalk Server General > December 2004 > Deploying an orchestration from C# code - possible?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Deploying an orchestration from C# code - possible?
|
|
| Mike Burton 2004-12-28, 7:49 am |
| I want to write a snippet of code that looks like this:
using Microsoft.BizTalk.ExplorerOM;
namespace MyDeployment
{
class Deployment
{
void DeployOrchestration()
{
BtsSomethingOrOther orchDeploy = new
BtsSomethingOrOther();
orchDeploy.AddNewOrchestration("MyDllName",
"MyOrchestrationName");
}
}
}
Is there a way to do this, or are the command line tools the only viable
option?
Thanks,
Mike Burton
DPSI
| |
| Mike Burton 2004-12-28, 7:49 am |
| I should clarify something here: I don't care whether I
deploy the whole assembly versus a single orchestration.
I just want to be able to write C# code to directly deploy
an orchestration or assembly from code. Is this possible,
or will I have to call the command line tools?
Thanks,
Mike Burton
DPSI
"Mike Burton" <liquiddark@hotmail.com> wrote in message
news:OV5UvnN7EHA.2592@TK2MSFTNGP09.phx.gbl...
> I want to write a snippet of code that looks like this:
>
> using Microsoft.BizTalk.ExplorerOM;
>
> namespace MyDeployment
> {
> class Deployment
> {
> void DeployOrchestration()
> {
> BtsSomethingOrOther orchDeploy = new
> BtsSomethingOrOther();
> orchDeploy.AddNewOrchestration("MyDllName",
> "MyOrchestrationName");
> }
> }
> }
>
> Is there a way to do this, or are the command line tools the only viable
> option?
>
> Thanks,
> Mike Burton
> DPSI
>
>
| |
| Matt Milner 2004-12-28, 5:49 pm |
| Take a look at the WMI reference for BizTalk, there is a deployment object
in there that has some pretty simple calls to deploy. You can also use some
classes from the deployment dll to do the same stuff. It is pretty much a
one or two line call to deploy or undeploy an assembly.
Matt
"Mike Burton" <liquiddark@hotmail.com> wrote in message
news:OHmoZvN7EHA.1392@tk2msftngp13.phx.gbl...
>I should clarify something here: I don't care whether I
> deploy the whole assembly versus a single orchestration.
> I just want to be able to write C# code to directly deploy
> an orchestration or assembly from code. Is this possible,
> or will I have to call the command line tools?
>
> Thanks,
> Mike Burton
> DPSI
>
>
> "Mike Burton" <liquiddark@hotmail.com> wrote in message
> news:OV5UvnN7EHA.2592@TK2MSFTNGP09.phx.gbl...
>
>
| |
| Jon Flanders 2004-12-28, 5:49 pm |
| using Microsoft.BizTalk.Deployment;//this is the assembly you need to
reference
class deploy
{
static void Main()
string asmpath ="c:\myasm.dll"
DeploymentDriver dd = new DeploymentDriver();
IEnumerator er =
dd.Deploy("local"."BizTalkMgmtDb",asmpath,"",false,"c:\\log");
//TODO:Handle errors
while(er.MoveNext())
{
Debug.WriteLine(((IBizTalkError)er.Current).get_Text());
}
}
}
There is also a WMI class you can use - MSBTS_DeploymentService
--
Jon Flanders
http://staff.develop.com/jfland/
"Mike Burton" <liquiddark@hotmail.com> wrote in message
news:OHmoZvN7EHA.1392@tk2msftngp13.phx.gbl...
> I should clarify something here: I don't care whether I
> deploy the whole assembly versus a single orchestration.
> I just want to be able to write C# code to directly deploy
> an orchestration or assembly from code. Is this possible,
> or will I have to call the command line tools?
>
> Thanks,
> Mike Burton
> DPSI
>
>
> "Mike Burton" <liquiddark@hotmail.com> wrote in message
> news:OV5UvnN7EHA.2592@TK2MSFTNGP09.phx.gbl...
>
>
| |
| Mike Burton 2004-12-29, 5:52 pm |
| Thanks a lot! Had to reference Microsoft.BizTalk.Admin as well,
which I could only find on the CD, but this appears to have done the
trick. Much appreciated.
Mike Burton
DPSI
"Jon Flanders" <jfland@develop.com> wrote in message
news:uIQB5KQ7EHA.2196@TK2MSFTNGP11.phx.gbl...
> using Microsoft.BizTalk.Deployment;//this is the assembly you need to
> reference
>
> class deploy
>
> {
>
> static void Main()
>
> string asmpath ="c:\myasm.dll"
>
>
> DeploymentDriver dd = new DeploymentDriver();
>
> IEnumerator er =
> dd.Deploy("local"."BizTalkMgmtDb",asmpath,"",false,"c:\\log");
>
> //TODO:Handle errors
>
> while(er.MoveNext())
>
> {
>
> Debug.WriteLine(((IBizTalkError)er.Current).get_Text());
>
> }
>
> }
> }
>
>
>
> There is also a WMI class you can use - MSBTS_DeploymentService
> --
> Jon Flanders
> http://staff.develop.com/jfland/
> "Mike Burton" <liquiddark@hotmail.com> wrote in message
> news:OHmoZvN7EHA.1392@tk2msftngp13.phx.gbl...
viable[vbcol=seagreen]
>
>
| |
| Mike Burton 2004-12-29, 5:52 pm |
| A followup question:
In order to get this example to work, i had to remove the cast to
IBizTalkError. Where is this type located?
Thanks,
Mike Burton
DPSI
"Jon Flanders" <jfland@develop.com> wrote :
> using Microsoft.BizTalk.Deployment;//this is the assembly you need to
> reference
>
> class deploy
>
> {
>
> static void Main()
>
> string asmpath ="c:\myasm.dll"
>
>
> DeploymentDriver dd = new DeploymentDriver();
>
> IEnumerator er =
> dd.Deploy("local"."BizTalkMgmtDb",asmpath,"",false,"c:\\log");
>
> //TODO:Handle errors
>
> while(er.MoveNext())
>
> {
>
> Debug.WriteLine(((IBizTalkError)er.Current).get_Text());
>
> }
>
> }
> }
>
>
>
> There is also a WMI class you can use - MSBTS_DeploymentService
> --
> Jon Flanders
> http://staff.develop.com/jfland/
> "Mike Burton" <liquiddark@hotmail.com> wrote in message
> news:OHmoZvN7EHA.1392@tk2msftngp13.phx.gbl...
viable[vbcol=seagreen]
>
>
| |
| Jon Flanders 2004-12-29, 5:52 pm |
| Microsoft.BizTalk.Studio.Extensibility.dll - it is in the BizTalk directory
in the Developer Components subdir.
--
Jon Flanders [DevelopMentor]
http://staff.develop.com/jfland/
http://www.develop.com/courses/biztalk
"Mike Burton" <liquiddark@hotmail.com> wrote in message
news:OzaRv0d7EHA.3756@TK2MSFTNGP14.phx.gbl...
> A followup question:
>
> In order to get this example to work, i had to remove the cast to
> IBizTalkError. Where is this type located?
>
> Thanks,
> Mike Burton
> DPSI
>
> "Jon Flanders" <jfland@develop.com> wrote :
> viable
>
>
| |
| Mike Burton 2004-12-30, 5:52 pm |
| Thanks again.
Mike Burton
DPSI
"Jon Flanders" <jfland@develop.com> wrote in message
news:%232pZtNe7EHA.824@TK2MSFTNGP11.phx.gbl...
> Microsoft.BizTalk.Studio.Extensibility.dll - it is in the BizTalk
directory
> in the Developer Components subdir.
>
> --
> Jon Flanders [DevelopMentor]
> http://staff.develop.com/jfland/
> http://www.develop.com/courses/biztalk
> "Mike Burton" <liquiddark@hotmail.com> wrote in message
> news:OzaRv0d7EHA.3756@TK2MSFTNGP14.phx.gbl...
>
>
|
|
|
|
|