Introduction

When compiling projects (*.k2proj) using the command line and a project is passed and compiled with the K2 Project System API an error is thrown.

Error Scenario

When the K2 Environment library is used to provide a resource that is consumed by a process, for example a mail server address, the build process would fail as the variable Environment Library resource could no longer be resolved. An “Object reference not set to an instance of an Object”, type error message would be thrown.
The expectation is that the compile process, for non explicit values functions correctly, since the environment field value references the local or available resource, i.e. no real or explicit value is required and then proceeds with the build. This was not the case and the build would normally fail.

Note: This error is known to affect the K2 Designers, when the project file *.k2proj is compiled using the command line and passed for compilation against the K2 Project System API.

Error Message

  • The image below contains 1 error that is know to occurr. A similar error may be encountered.

Known Error

  • This error is also known to be encountered when the command line compiler is used
  • Unable to validate the environment field ‘ENVIRONMENT FIELD NAME’. The environment library is not connected

Error Resolution

This Hotfix is contained within the latest K2 Update. Install the update package to resolve the error

The build process has been enhanced, so that when this situation occurs it will not fail the build process for environment field values where there is no hardcoded value. The variable field name will be accepted and the build will succeed. Although no longer an error, a warning message will occur informing the user using the following error message:
“Unable to validate the environment field ‘ENVIRONMENT FIELD NAME’. The environment library is not connected”

Command Line Compiler