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

  • SEARCH
  • Home
  • 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 4073242
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T16:59:28+00:00 2026-05-20T16:59:28+00:00

I have a Windows Forms application developed using C# in .NET framework 3.5, Service

  • 0

I have a Windows Forms application developed using C# in .NET framework 3.5, Service pack 1. The application can be published based on the development database as well as the production database. I am using MSBuild community tasks to publish my application. I do not face any problems while publishing the application to different location, namely a development location and a production location.

Issue:

  1. After installing the development application into my machine, I am unable to install the production application. It gives me an error saying:

    You cannot start application TEST from this location
    because it is already installed from a different location

  2. Question: How does the machine understand that I am trying to install the same application? I assume it has some kind of an Application Id. If that’s the case, I can override the concerned value based on the location. (DEV or PROD)

    The current code while publishing in the project file of my application:

    <Choose>
        <When Condition=" '$(BuildEnvironment)' == 'DEV' ">
          <PropertyGroup>
            <PublishDir>\\A\B\development\</PublishDir>
            <BaseConnection>Data Source=SQL-DEV.company.com; Database=TEST;Uid=XYZ;Pwd=ABC;</BaseConnection>
    
          </PropertyGroup>
        </When>
    
        <When Condition=" '$(BuildEnvironment)' == 'PROD' ">
          <PropertyGroup>
            <PublishDir>\\A\B\production\</PublishDir>
            <BaseConnection>Data Source=SQL-PROD.company.com;; Database=TEST;Uid=XYZ;Pwd=ABC;</BaseConnection>
    
          </PropertyGroup>
        </When>
    </Choose>
    

    The publishing of the application works like a charm and points to the concerned database. All I want to do now is be able to install the development application as well as production application on the same machine without any errors.

  3. Question: What differentiates one click once application with the other?

  • 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-20T16:59:29+00:00Added an answer on May 20, 2026 at 4:59 pm

    So I have finally figured out how to deploy different versions of the same application. The application manifest file was missing deploymentProvider attribute of the deployment element.

    After adding deployment provider attribute of the deployment element in the application manifest, I was able to install my app from various location. But the problem here was that it was overriding the previously installed application. For this problem, I followed this tutorial to distinguish my development application from the production application.

    Everything works great now. 🙂

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

Sidebar

Related Questions

I have a Windows Forms (.NET) application that can have multiple documents open simultaneously.
I have a .NET 2.0 Windows Forms application. Where is the best place the
I have a client server based windows forms application that needs an administrator only
I have single-thread windows form application written with VB.NET and targeting Framework 1.1 .
I have developed an application using .net 3.5 and have deployed it as an
I have following situation in a C# Windows Forms (.NET 4.0) application: I have
I have a VS2008 C++ application for Windows XP SP3 developed using WTL 8.1.
Background : I have a C# Windows Forms application that contains a Windows service
I have a Windows Forms application that I wrote that does some monitoring of
I have a Windows Forms application in C#/Visual Studio 2008 with an IE WebBrowser

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.