Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6192899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:01:36+00:00 2026-05-24T03:01:36+00:00

As part of automating BizTalk deployment, I’m using the following code to run process

  • 0

As part of automating BizTalk deployment, I’m using the following code to run process from C#.

        string commandArguments =
            "ImportApp /ApplicationName:\"" + ApplicationFullName +
            "\" /Package:\"" + MsiFilePath+ "\"";
        Process p = new Process();
        p.StartInfo.UseShellExecute = false;
        p.StartInfo.FileName = "BTSTask.exe";
        p.StartInfo.Arguments = commandArguments;
        p.StartInfo.RedirectStandardError = true;
        p.StartInfo.RedirectStandardOutput = true;
        p.StartInfo.CreateNoWindow = true;
        p.Start();
        StreamReader outputStream = p.StandardOutput;
        StreamReader errorStream = p.StandardError;
        // Read the standard output
        //string output = outputStream.ReadToEnd();
        string error = errorStream.ReadToEnd();
        //WriteToLogFile(output);
        if (!error.Equals(""))
        {
            WriteToLogFile(error);
            throw new Exception("Error occurred while importing application " + 
                ApplicationFullName +
                Environment.NewLine +
                error);
        }
        p.WaitForExit();
        p.Close();
        return;

The output of this process that I’m getting in the log file looks like this:

Copyright (c) 2010 Microsoft Corporation. All rights reserved.
Information: Importing package "\\tc6218\BizTalkReceiveDrop\servername\Apps\Core.Artifacts.msi" into application "Core.Artifacts" in BizTalk configuration database (server="TC6218", database="BizTalkMgmtDb")...
Information: Performing action "Create" on host "ConfigurationDb" using package "\\ Apps\Core.Artifacts.msi".
Information: Validating resources (count=6)...
* Validating resource (-Type="System.BizTalk:Assembly" -Luid="TC.BizTalk.Functoid.AdvancedDatabaseLookup, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f68c7d112162f09d")...
* Validating resource (-Type="System.BizTalk:Assembly" -Luid="TaylorCorp.Erp.ServiceBus.MasterData.Components.BusinessRules, Version=1.0.0.2, Culture=neutral, PublicKeyToken=f68c7d112162f09d")...
* Validating resource (-Type="System.BizTalk:BizTalkAssembly" -Luid="ICSM.Schemas, Version=4.0.1.0, Culture=neutral, PublicKeyToken=69c11018615fef04")...
* Validating resource (-Type="System.BizTalk:BizTalkAssembly" -Luid="ICSM.Pipelines, Version=4.0.1.0, Culture=neutral, PublicKeyToken=69c11018615fef04")...
* Validating resource (-Type="System.BizTalk:BizTalkAssembly" -Luid="ICSM.Maps, Version=2.0.0.0, Culture=neutral, PublicKeyToken=69c11018615fef04")...
* Validating resource (-Type="System.BizTalk:BizTalkBinding" -Luid="Application/Core.Artifacts")...
Information: Performing change requests...
Information: Calling BeginTypeChangeRequest for all selected resource types...
PerformingBeginChangeRequest
PerformingBeginChangeRequest
PerformingBeginChangeRequest
Adding resource (-Type="System.BizTalk:Assembly" -Luid="TC.BizTalk.Functoid.AdvancedDatabaseLookup, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f68c7d112162f09d") to store.
Information: PerformingEndChangeRequestsWithRollBack
* Performing EndTypeChangeRequest for resource type "System.BizTalk:Assembly".
* Performing EndTypeChangeRequest for resource type "System.BizTalk:BizTalkAssembly".
* Performing EndTypeChangeRequest for resource type "System.BizTalk:BizTalkBinding".
Error: Resource (-Type="System.BizTalk:Assembly" -Luid="TC.BizTalk.Functoid.AdvancedDatabaseLookup, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f68c7d112162f09d") already in store. 
1) Use BTSTask's overwrite flag or 
2) Set redeploy flag to true in BizTalk Project or 
3) Click overwrite all checkbox in Admin MMC  
to update if the resource exists in the specified target application "Core.Artifacts".
Overwrite flag will be ignored if the resource is associated with another application.


Command failed with 1 errors, 0 warnings.

Now, all I need to do is find out whether a process errored or not. And, I need to store both the output stream as well as the error stream into string variables. ( I don’t want to parse this string , you probably know this by now. And I don’t wish to encounter problems stated by Microsoft as “Deadlocks” which I don’t understand completely in this scenario.

Thanks for your help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T03:01:36+00:00Added an answer on May 24, 2026 at 3:01 am

    According to:
    http://msdn.microsoft.com/en-us/library/aa559686(v=bts.20).aspx

    The BTSTask.exe process returns 0 if success and non-zero if there was an issue. This return code will show up in your p.ExitCode

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Part of our java application needs to run javascript that is written by non-developers.
I am currently working on automating/improving the release process for packaging my shop's entire
I am using Puppet for automating configuration management across hosts. It can use erb
We're in the process of streamlining/automating build, integration and unit testing as well as
Part of my everyday work is maintaining and extending legacy VB6 applications. A common
Part of a new product I have been assigned to work on involves server-side
Part of the install for an app I am responsible for, compiles some C
Part of the series of controls I am working on obviously involves me lumping
Part of the setup routine for the product I'm working on installs a database
Part of my latest webapp needs to write to file a fair amount as

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.