Farbschema: Dunkel
Sie befinden sich hier: start » en » Documentation » Microsoft Access development tools » WKL Bootstrapper » How-to guides » How to: Deliver a private .NET runtime

How to: Deliver a private .NET runtime

Users' PCs have no .NET 10 Desktop Runtime, and the IT does not install it; the application - for example an Access application with WKL Forms Object Library - should still run.

Requires WKL Bootstrapper 2.0 (project file format 2).

Solution overview

  • The delivery brings a .NET runtime per bitness in dotnet\x86 and dotnet\x64 of the source.
  • A files entry per bitness copies it to [WklRoot]\Dotnet\<release>\<bitness>, that is %LOCALAPPDATA%\WKL\Dotnet\<release>\<bitness>. <release> is the product version of its dotnet.exe without a build id.
  • start.environment hands the folder to the started program: DOTNET_ROOT(x86) for 32 bit, DOTNET_ROOT for 64 bit. The .NET host of the program, and of the WKL components loaded into Access, then finds the runtime there.
  • The template dotnet of /new-project writes both entries; see How to: Create a project from templates.

Implementation

  1. Fill the delivery. Copy a .NET 10 runtime of each bitness into the source: the content of an installed .NET folder (%ProgramFiles(x86)%\dotnet for 32 bit, %ProgramFiles%\dotnet for 64 bit) - dotnet.exe and the folders host and shared - into dotnet\x86 and dotnet\x64:

    <delivery>
      app-manifest.json, Customers.accde
      components\x86, components\x64
      dotnet\x86\dotnet.exe, host\..., shared\...
      dotnet\x64\dotnet.exe, host\..., shared\...
  2. Write the project file, or let /new-project ... /template access,components,dotnet write it. The entries for the runtime are:

    {
      "files": [
        { "id": "dotnet-x86", "source": "dotnet\\x86", "target": "[WklRoot]\\Dotnet\\[ItemVersion]\\x86", "bitness": "x86", "versionOf": "dotnet.exe" },
        { "id": "dotnet-x64", "source": "dotnet\\x64", "target": "[WklRoot]\\Dotnet\\[ItemVersion]\\x64", "bitness": "x64", "versionOf": "dotnet.exe" }
      ],
      "start": {
        "environment": [
          { "name": "DOTNET_ROOT(x86)", "value": "[Dir:dotnet-x86]", "bitness": "x86" },
          { "name": "DOTNET_ROOT", "value": "[Dir:dotnet-x64]", "bitness": "x64" }
        ]
      }
    }

    With a private runtime the project needs no condition of kind dotnet; remove one that asks for an installed Microsoft.WindowsDesktop.App 10.0.

  3. Check and try it: Wkl.Bootstrapper.exe /check bootstrapper.json, then /whatif bootstrapper.json.

Remarks

  • Only the runtime of the project's bitness is installed (bitness of the project; by default that of Microsoft Access, and of Windows when no Access is installed).
  • The runtime folder is shared and counted: every product delivering the same release uses one copy, which stays until the last product version using it is removed. A newer release goes into a folder of its own beside it.
  • Limitation: the variables reach only programs the starter starts. Access opened in any other way - from the database file, from the start menu, by automation - and Office UserForms that use the WKL components do not find the private runtime; they need a runtime installed for the computer.
  • The installed version keeps the variables, so a start without the source sets them too.
  • A private runtime is supported for 32-bit and 64-bit Access on 64-bit Windows; 32-bit Windows is not supported.
en/wiki/msaccess/bootstrapper/how-to/deliver-a-private-dotnet-runtime.txt · Zuletzt geändert: von Wolfgang van der Stille