PandaTech.StartupEnvironmentCheck 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package PandaTech.StartupEnvironmentCheck --version 1.0.0
NuGet\Install-Package PandaTech.StartupEnvironmentCheck -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PandaTech.StartupEnvironmentCheck" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add PandaTech.StartupEnvironmentCheck --version 1.0.0
#r "nuget: PandaTech.StartupEnvironmentCheck, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install PandaTech.StartupEnvironmentCheck as a Cake Addin
#addin nuget:?package=PandaTech.StartupEnvironmentCheck&version=1.0.0

// Install PandaTech.StartupEnvironmentCheck as a Cake Tool
#tool nuget:?package=PandaTech.StartupEnvironmentCheck&version=1.0.0


Pandatech.StartupEnvironmentCheck is a lightweight library designed to validate required environment variables at application startup. It helps ensure that essential configurations are in place, preventing unexpected behaviors or failures due to missing environment variables.


You can install Pandatech.StartupEnvironmentCheck via NuGet Package Manager or by using the following command in your Package Manager Console:

Install-Package Pandatech.StartupEnvironmentCheck


Validating Environment Variables

You can use the EnvironmentVariableValidator.ValidateEnvironmentVariables method to validate required environment variables. Here's an example:

using StartupEnvironmentCheck;

public class Program
    public static void Main(string[] args)
        var requiredEnvVars = new List<string> { "DB_CONNECTION_STRING", "API_KEY" };
        // Continue with the rest of the application startup

Handling Missing Variables

If any required environment variables are missing, a MissingEnvironmentVariablesException will be thrown. This exception includes a detailed message listing the missing variables.

You can catch this exception to log the error or take other appropriate actions:

catch (MissingEnvironmentVariablesException ex)
// Log the error or take other actions


For support, issues, or contributions, please refer to the project's GitHub repository or contact the maintainers.


This project is licensed under the MIT License.

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net7.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.0.0 240 11/29/2023
1.0.5 104 11/29/2023
1.0.4 183 10/14/2023
1.0.3 129 10/14/2023
1.0.2 163 8/30/2023
1.0.1 158 8/24/2023
1.0.0 145 8/23/2023