ClickOnce Deployment for Different Configurations

I am currently considering deploying ClickOnce for our WPF application and was wondering: is it possible to set ProductName and PublishUrl separately for each build configuration in the project file?

At the moment, I need to install them manually in the publication settings, but it may be easy for someone to forget to do this and eventually publish a test version of our application in our educational environment or vice versa.

I know that I also need to change the application identifier using MageUI in order to run several versions of the ClickOnce application on one PC, but it would be nice to at least not worry about the properties of ProductName and PublishUrl being fixed every time we you need to perform the deployment (although it would be ideal if we could access the application identifier from within the IDE too!).

+3
source share
1 answer

, PublishUrl ProductName .csproj , , , , , .

csproj ...

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Test|AnyCPU' ">
    <PlatformTarget>AnyCPU</PlatformTarget>
    <ErrorReport>prompt</ErrorReport>
    <AppConfig>app.Test.config</AppConfig>
    <PublishUrl>http://MyServer/Synergi/Test/</PublishUrl>
    <ProductName>Synergi Test</ProductName>
</PropertyGroup>
+5

Source: https://habr.com/ru/post/1724956/


All Articles