.NET - ClickOnce Install - Company Name and Application Name
Asked Answered
K

4

9

What is the proper way to set the Company Name and Application Name in a ClickOnce application?

I have a set of projects in a solution called RecordNavigator. The GUI project is called RecordNavigator.Gui.

When I publish the application - I want the Start menu to have a folder called Tyndall Software and the application shortcut to be called Record Navigator.

Right now the folder says Organization and the shortcut says RecordNavigator.Gui. The AssemblyInfo.cs file seems to have no effect. Is that normal?

Kellerman answered 10/6, 2009 at 19:21 Comment(0)
F
14

If you open your project's properties in Visual Studio and click on the 'Publish' tab, there should be an 'Options...' button under 'Install Mode and Settings'. There you can define the Publisher name ('Tyndall Software'), Product name ('Record Navigator'), and other such options.

Foliose answered 10/6, 2009 at 19:27 Comment(1)
I wonder where that gets stored?... not in the AssemblyInfo.cs. weirdKellerman
J
4

You need to change the ClickOnce manifest, not the assemblyinfo.cs...

There is an MSBuild task for this: GenerateDeploymentManifest

    <GenerateDeploymentManifest
        AssemblyName="$(ApplicationIdentity)"
        AssemblyVersion="$(PublishVersion)"
        Description="$(ApplicationDescription)"
  EntryPoint="@(ApplicationManifest)"
        DeploymentUrl="$(PublishURL)/$(App).application"
        MapFileExtensions="true"
        OutputManifest="$(App).application"
        Product="$(ApplicationDescription)"
        Publisher="$(Publisher)"
        SupportUrl="$(SupportURL)" >
        <Output ItemName="DeploymentManifest" TaskParameter="OutputManifest" />
    </GenerateDeploymentManifest>

Set your $(Description) to the Application Name you want, $(Publisher) value to the Company Name, and the $(SupportURL) to the URL you want to publish.

Janel answered 10/6, 2009 at 19:22 Comment(0)
C
1

Just as Andy Mikula said - it's on the Publish section in the application's properties, but in my Visual Studio 2008 it's under the Options button and the Description section, the properties are called Publisher Name and Product Name.

You'll find all the ClickOnce settings in the .csproj file for the application. E.g. the fields you want to update exist as:

<ProductName>...</ProductName>
<PublisherName>...</PublisherName>

Side note, these values are not part of the application's ClickOnce identity - so you can change them for an application and the next time your customers update the name of the application will change - I'm not sure about the start menu folder though.

Cement answered 13/6, 2009 at 15:2 Comment(3)
They are NOT part of the ClickOnce identity, but they will update the name of the app? is that right? confusing.Kellerman
Is right? Yep. Confusing? Yep. I just did a test, published once with product name "A". Published again with new product name "B". Outcome: When clicking on the "A" app in the start menu, I got the question "there is an update available for A...". Click OK and the progress window showed "downloading update for B...". Directly after the install finished the start menu shortcut changed name to "B".Cement
I have an issue that two seperate applications replaces eachother when installed so only one of them can be installed at the time. I assume its because the productname is not part of the identity. Not sure how to change the identity. Both my apps end up with itentity name SInnovations.App and i assume thats why they replace eachother.Kress
K
0

Visual Studio 2008 with the Office 2007 VSTO project template does not have options in ClickOnce propeties to modify product name, etc. We had to modify the build target file manually. Luckily, a Microsoft engineer describes exactly how to do so on MSDN.

Kendry answered 8/6, 2011 at 18:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.