+1 800 256 3608 (toll-free in North America) or +49 7531 90 60 10| service@combit.com

ClickOnce-Deployment for List & Label Applications

net
(combit Team) #1
Valid from List & Label 10
Starting with .NET Framework version 2.0, the No-Touch-Deployment (NTD) is replaced by the more sophisticated ClickOnce deployment. ClickOnce enables the distribution of Windows applications to networks and web servers. Amongst other advantages over NTD it allows to create start menu links and offers offline availability.

In order to enable ClickOnce deployment for your VS project you need to add all dependencies to it. As List & Label also depends on the availability of other files, you need to add these dependencies, too. In order to do so, proceed as follows:

1. Create a folder for the dependencies. Right click the project in solution explorer, choose "Add > New Folder" and call the new folder "LLFiles"

2. Add the dependencies to the project. Right click the "LLFiles" folder and choose "Add > Existing Item...". Now select the List & Label redistributables from the "Redistributable Files" folder (since List & Label 13, "redist" in former versions). The files are also listed in the "redist.txt" file in the same folder.

3. Select the just added files and set the "Build Action" property to "Content"

4. Finally, you have to set the installation target path for the List & Label files. In order to do so, you need to manually edit the project file (*.csproj/*.vbproj) with a standard ANSI editor (ex. Notepad). Within the "ItemGroup" block, add a "PublishFile" block for each file:
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

...

<ItemGroup>

    <PublishFile Include="LLFiles\cmll??.dll">
        <Visible>False</Visible>
        <TargetPath>cmll??.dll</TargetPath>
        <PublishState>Include</PublishState>
        <FileType>File</FileType>
    </PublishFile>
    
    <PublishFile Include="LLFiles\cmct??.dll">
        <Visible>False</Visible>
        <TargetPath>cmct??.dll</TargetPath>
        <PublishState>Include</PublishState>
        <FileType>File</FileType>
    </PublishFile>

<!-- Add the additional files here -->

</ItemGroup>
</Project>


Important: Should you encounter any problems when using Visual Studio 2010 you can make the entries as follows:

<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

...

<ItemGroup>

    <PublishFile Include="LLFiles\cmbr??.dll">
        <Visible>False</Visible>
        <Group>
        </Group>
        <TargetPath>LLFiles\cmbr??.dll</TargetPath>
        <PublishState>Include</PublishState>
        <IncludeHash>True</IncludeHash>
        <FileType>File</FileType>
    </PublishFile>
    <PublishFile Include="LLFiles\cmct??.dll">
        <Visible>False</Visible>
        <Group>
        </Group>
        <TargetPath>LLFiles\cmct??.dll</TargetPath>
        <PublishState>Include</PublishState>
        <IncludeHash>True</IncludeHash>
        <FileType>File</FileType>
    </PublishFile>

<!-- Add the additional files here -->

</ItemGroup>
</Project>


After saving and reloading your project you can now ClickOnce deploy your application.

Important: Backup your project file before manually editing it!

A preselection of dependency files for a typical install of List & Label 21 is contained in the link below. Just paste the PublishFile blocks to your project file as described above. For older versions, rename the files according to your List & Label version.

IMPORTANT: Please note that Visual Studio re-enables the “ClickOnce Security Settings” with each build of the ClickOnce deployment. If you’re using Windows Vista or newer, this leads to an error message whenever trying to debug the application from the IDE or starting the application. In order to debug your application, switch off the “ClickOnce Security Settings” checkbox from the solution’s secutity properties. This has to be done every time you build the ClickOnce deployment.

Links:

http://www.combit.net/de/support/files/cmbtkb/llclickonce.txt
IDKBTE000689 KBTE000689