I'm currently publishing 2 ClickOnce Application. One in VB and one in C#. I use Azure DevOps to do my builds and deployment. I have 2 * 2 = 4 builds:
- VB staging
- VB production
- C# staging
- C# production
I deploy on IIS where I have 4 web sites.
Here is the picture when I go on one of these website to install a version of one of my applications:
Help me identify where these value really come from before and after build or publication.
On the web page first: 4, 5 and 6. The name (4), the version (5) and the publisher (6) are hardcoded in html file deployed with click-once. Let'f forget about these one and focus on 1, 2, 3.
But, for me the most important is the values on the installer screen: 1, 2 and 3. The name (1), the domain (2) and the publisher (3) where are them coming from?
I ask this question because on my VB build everything seems correct but on my C# build I cannot get the correct value for my name, publisher and domain (1, 2, 3).
I use DevOps and Visual Studio Build task with MSBuild Arguments:
/target:publish
/p:ApplicationVersion=$(Build.BuildNumber)
/p:InstallURL=http://VBApp-staging.example.com/
/p:PublishURL=http://VBApp-staging.example.com/
/p:UpdateEnabled=true
/p:UpdateMode=Foreground
/p:ProductName="VB App Staging"
/p:OutputPath="$(build.ArtifactStagingDirectory)\Publish\\"
I also have my sln and proj file PropertyGroup setup for Staging and Release.
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Staging|AnyCPU' ">
<PublishUrl>http://CSApp-staging.example.com/</PublishUrl>
<InstallUrl>http://CSApp-staging.example.com/</InstallUrl>
<ProductName>CS Application Staging</ProductName>
<PublisherName>Example Group</PublisherName>
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
Both VB and C# have defined similar PropertyGroup and similar Devops pipeline. Now when I run my pipeline for my VB software it seems that all values I can read on (1, 2, 3) are the one from MSBuild overridden arguments. But for my CS software I don't know. It seems the the arguments of MSbuild are doing nothing and all is comong from my project definition.
How is this possible? How can I make sure my MSbuild arguments works. Where these value from (1, 2, 3) come from?