Deployment

What to ship (and what not to ship) when you deploy an application built with NoxGrid. Distribution terms are in section 4 of the license agreement.

1. Desktop (WinForms)

Files

File Referenced while developing Shipped with the application
Nox.Grid.dll Yes Yes
Nox.Grid.WinForms.dll Yes Yes
Nox.Grid.Design.dll Yes (Visual Studio designer) No (license section 4.2)
Nox.Grid.xml, Nox.Grid.WinForms.xml … Optional (IntelliSense) Not needed
  • The application folder needs only two DLLs (Nox.Grid.dll, Nox.Grid.WinForms.dll). There are no other package dependencies.
  • Target PCs need .NET Framework 4.7.2 or later (included in Windows 10 1803 and later).
  • Nox.Grid.Design.dll is never loaded at run time; the grid works without it.

Referenced through NuGet

The Nox.Grid package keeps the designer DLL referenced but not copied to the output folder (build\Nox.Grid.targets in the package). The build folder (bin\Release) and the dotnet publish / folder publish output contain just the two DLLs, so you can ship them as is. Projects that use packages.config work the same way (NuGet adds the targets import to the project). Prerelease versions (1.0.0-rc.N) need NuGet 4.3 or later; the NuGet in Visual Studio 2019 supports them.

If you really need the designer DLL at run time (for example, a tool that hosts the designer), add:

<PropertyGroup>
  <NoxGridCopyDesignAssembly>true</NoxGridCopyDesignAssembly>
</PropertyGroup>

Referencing the DLLs directly

Visual Studio copies referenced DLLs to the output folder by default. Turn this off for the designer DLL only:

  1. Solution Explorer → References → select Nox.Grid.Design
  2. In the Properties window set Copy Local = False

(In VB you can also change it on the References tab of the project properties. The designer keeps working.)

  • Keep the DLLs in a folder inside the solution (for example lib\NoxGrid\) and reference them with relative paths, so the project opens on other PCs and build servers.
  • For production, use the DLLs from the published NuGet package (or the download from the website); they are signed and obfuscated.

Installers (MSI, Inno Setup, ClickOnce …)

  • Add Nox.Grid.dll and Nox.Grid.WinForms.dll to the same folder as your exe.
  • No GAC registration is needed (app-local deployment is recommended).
  • With the settings above, ClickOnce leaves the designer DLL out automatically; check Publish → Application Files.
  • Add .NET Framework 4.7.2 or later as a prerequisite if target PCs may not have it.

License keys

Item Ship it?
License key Not needed. Applications run normally without a key; the notice appears only in the designer while developing.
%APPDATA%\NovNox\NoxGrid\license.key Do not ship. It is the per-PC file written by [Register License Key...] on a development PC.
NoxLicense.SetKey("NOX1...") Optional. You may put the key in code (section 3.3: only in your own applications). Mind that it becomes visible if you publish the source.
LICENSE.txt You need not give it to end users. Do not remove or change the copyright notices in the DLLs (section 4.4).

Obfuscating your application (ConfuserEx, Dotfuscator …)

  • Leave Nox.Grid.dll, Nox.Grid.WinForms.dll and Nox.Grid.Design.dll out of the obfuscation (they are strong-named and already obfuscated; changing them breaks the signature).
  • Your own forms can be obfuscated. NoxGrid does not look up your code by name, with these exceptions: DataPropertyName (bound object properties), DisplayMember/ValueMember and RowKeyMember are the exceptions, because they read your property names at run time. Exclude those classes' public properties from renaming, as you would for DataGridView binding.
  • Resource protection is fine. NoxGrid reads no resources from your assembly.
  • Test the obfuscated build by starting the exe directly, with the two NoxGrid DLLs next to it.

Embedding the DLLs in the exe

You may embed Nox.Grid.dll and Nox.Grid.WinForms.dll as resources of your exe and load them with Assembly.Load(bytes) in AppDomain.AssemblyResolve. This is distribution as part of your application (license section 4); keep the copyright notices inside the DLLs.

  • NoxGrid does not use Assembly.Location, file paths or satellite assemblies (.resx). UI text is in code, and the license key file is read only in design mode.
  • Cache each loaded assembly in the resolve handler and return the same instance. Loading the same bytes twice splits the types and causes errors.
  • The assembly names are Nox.Grid, Version=1.0.0.0, PublicKeyToken=3ca3a062de53507d and Nox.Grid.WinForms (same token).
  • To move to a newer 1.x release, replace the resource files and rebuild.

Upgrading

  1. NuGet: update the package and rebuild. Direct references: close Visual Studio, replace all three DLLs together (including Nox.Grid.Design.dll, which must be the same version and referenced by the project with Copy Local = False), delete the project's bin and obj folders, then reopen and rebuild. Visual Studio may keep using the old designer DLL while it is open, because every 1.x DLL has the same assembly version. If the designer DLL cannot be loaded, the grid shows a notice in the form designer and only the Properties window works; the application itself is not affected.
  2. With a form open in the designer, remove the NoxGrid items from the Visual Studio toolbox and add them again (the toolbox keeps its own copy of the old DLL; without an open form designer Visual Studio says the items cannot be used in the active designer). Within 1.x the assembly version stays 1.0.0.0, so applications built against an older 1.x DLL keep working with the new one.
  3. Ship both new Nox.Grid.dll and Nox.Grid.WinForms.dll together. Replacing only one of them fails at run time.

2. Server (ASP.NET Core, Nox.Grid.Server)

  • dotnet publish includes Nox.Grid.Server.dll, Nox.Grid.dll and the dependency System.Text.Encoding.CodePages. Deploy the publish output as is.
  • No license key is needed.

3. Web (@novnox/grid)

  • With a bundler (Vite, webpack …) the grid is part of your build output; nothing else to add.
  • With a plain <script> tag, upload nox-grid.iife.js with your site (it defines window.NoxGrid). nox-grid.js and nox-grid.min.js are ES modules for bundlers and <script type="module">.
  • Set the key with setLicenseKey("NOX1..."). Without a key, only a small notice appears on non-local hosts; everything keeps working.

4. Checklist before shipping

  • [ ] The folder contains Nox.Grid.dll and Nox.Grid.WinForms.dll (same version)
  • [ ] The folder does not contain Nox.Grid.Design.dll
  • [ ] *.xml and *.pdb only if you want them (not required)
  • [ ] .NET Framework 4.7.2 or later on target PCs
  • [ ] The development PC's license.key is not in the installer
  • [ ] The grid looks right at 125% and 150% display scaling