Skip to content

Runtime Dependencies (VC and .NET) Config Examples

daemon.devin edited this page Aug 30, 2025 · 2 revisions

Runtime Dependencies Configuration Examples

The RuntimeDependencies segment ensures your portable applications have all necessary runtime dependencies while providing flexible installation and user experience options. Below are several examples you can use as reference. Be sure to write the INI configurations in the Launcher.ini file.

USAGE

Add sections [VCRuntime1], [NETRuntime1] etc. to Launcher.ini

VCRuntime Keys:

Version		 -	VC++ version (2005, 2008, 2010, 2012, 2013, 2015, 2017, 2019, 2022)
Architecture -	x86, x64, or both
Mode		 -	detect, install, or bundle
Action		 -	skip, warn, install, or bundle
Source		 -	Path to redistributable installer (for bundle mode)
MinVersion	 -	Minimum acceptable version (optional)
Required	 -	true/false - whether app requires this runtime

NETRuntime Keys:

Framework	 -	net20, net35, net40, net45, net46, net47, net48, net50, net60, net70, net80
Architecture -	x86, x64, anycpu, or both
Mode		 -	detect, install, or bundle  
Action		 -	skip, warn, install, or bundle
Source		 -	Path to .NET installer (for bundle mode)
MinVersion	 -	Minimum acceptable version (optional)
Required	 -	true/false - whether app requires this runtime

Example 1: Modern C++ Application (Visual Studio 2019/2022)

[VCRuntime1]
Version=2022
Architecture=x64
Mode=detect
Action=bundle
Required=true
MinVersion=14.30.30704
Source=%PAL:AppDir%\Prerequisites\VC_redist.x64.exe

[VCRuntime2]
Version=2022
Architecture=x86
Mode=detect
Action=warn
Required=false
MinVersion=14.30.30704

Features:

  • Requires x64 runtime, warns about x86
  • Will download and install if missing
  • Checks for minimum version
  • Bundles installer with the app

Example 2: Legacy Application (Multiple VC++ Versions)

[VCRuntime1]
Version=2008
Architecture=x86
Mode=detect
Action=install
Required=true
Source=%PAL:AppDir%\Prerequisites\vcredist_2008_x86.exe

[VCRuntime2]
Version=2010
Architecture=x86
Mode=detect
Action=install
Required=true
Source=%PAL:AppDir%\Prerequisites\vcredist_2010_x86.exe

[VCRuntime3]
Version=2015
Architecture=x86
Mode=detect
Action=warn
Required=false

Features:

  • Multiple VC++ versions for legacy compatibility
  • Local installer sources bundled with app
  • Mix of required and optional runtimes

Example 3: .NET Framework Application

[NETRuntime1]
Framework=net48
Architecture=anycpu
Mode=detect
Action=bundle
Required=true
MinVersion=4.8.04084
Source=%PAL:AppDir%\Prerequisites\NDP48-x86-x64-AllOS-ENU.exe

[VCRuntime1]
Version=2019
Architecture=both
Mode=detect
Action=warn
Required=false

Features:

  • .NET Framework 4.8 requirement
  • Architecture-agnostic detection
  • Bundled .NET installer
  • Optional VC++ runtime warning

Example 4: .NET Core/.NET 5+ Application

[NETRuntime1]
Framework=net60
Architecture=x64
Mode=detect
Action=bundle
Required=true
MinVersion=6.0.0
Source=%PAL:AppDir%\Prerequisites\dotnet-runtime-6.0-win-x64.exe

[NETRuntime2]
Framework=net60
Architecture=x86
Mode=detect
Action=skip
Required=false

Features:

  • .NET 6.0 x64 runtime required
  • Skips x86 version (not needed)
  • Modern .NET runtime handling

Example 5: Mixed Runtime Requirements (Enterprise App)

[VCRuntime1]
Version=2015
Architecture=both
Mode=detect
Action=install
Required=true
Source=%PAL:AppDir%\Prerequisites\vc_redist_2015_both.exe

[NETRuntime1]
Framework=net45
Architecture=anycpu
Mode=detect
Action=warn
Required=true
MinVersion=4.5.2

[NETRuntime2]
Framework=net48
Architecture=anycpu
Mode=detect
Action=bundle
Required=false
MinVersion=4.8.04084
Source=%PAL:AppDir%\Prerequisites\NDP48-x86-x64-AllOS-ENU.exe

Features:

  • Multiple runtime dependencies
  • Mix of warning and installation actions
  • Both required and optional runtimes
  • Version-specific requirements

Example 6: Game Application with Legacy Support

[VCRuntime1]
Version=2005
Architecture=x86
Mode=detect
Action=warn
Required=false

[VCRuntime2]
Version=2008
Architecture=x86
Mode=detect
Action=install
Required=true
Source=%PAL:AppDir%\Prerequisites\vcredist_2008_x86.exe

[VCRuntime3]
Version=2010
Architecture=x86
Mode=detect
Action=install
Required=true
Source=%PAL:AppDir%\Prerequisites\vcredist_2010_x86.exe

[VCRuntime4]
Version=2019
Architecture=x64
Mode=detect
Action=bundle
Required=true
MinVersion=14.28.29913
Source=%PAL:AppDir%\Prerequisites\VC_redist.x64.exe

Features:

  • Multiple VC++ versions for game compatibility
  • Mix of x86 legacy and x64 modern runtimes
  • Bundled installers for automatic deployment

Example 7: Development Tool with Comprehensive Dependencies

[VCRuntime1]
Version=2022
Architecture=x64
Mode=detect
Action=bundle
Required=true
MinVersion=14.32.31326
Source=%PAL:AppDir%\Prerequisites\VC_redist.x64.exe

[NETRuntime1]
Framework=net48
Architecture=anycpu
Mode=detect
Action=bundle
Required=true
MinVersion=4.8.04084
Source=%PAL:AppDir%\Prerequisites\NDP48-x86-x64-AllOS-ENU.exe

[NETRuntime2]
Framework=net60
Architecture=x64
Mode=detect
Action=bundle
Required=true
MinVersion=6.0.7
Source=%PAL:AppDir%\Prerequisites\dotnet-runtime-6.0-win-x64.exe

[NETRuntime3]
Framework=net70
Architecture=x64
Mode=detect
Action=warn
Required=false
MinVersion=7.0.0

Features:

  • Multiple .NET versions supported
  • Latest VC++ runtime required
  • Mix of required and optional runtimes
  • Comprehensive development environment support

Example 8: Minimal Detection Only

[VCRuntime1]
Version=2019
Architecture=x64
Mode=detect
Action=warn
Required=true

[NETRuntime1]
Framework=net48
Architecture=anycpu
Mode=detect
Action=warn
Required=true

Features:

  • Detection only (no installation)
  • Warns user about missing dependencies
  • Minimal overhead for simple apps
  • User responsibility for installation

Example 9: Automatic Download and Install

[VCRuntime1]
Version=2022
Architecture=x64
Mode=bundle
Action=bundle
Required=true

[NETRuntime1]
Framework=net60
Architecture=x64
Mode=bundle
Action=bundle
Required=true

Features:

  • No local installer files needed
  • Automatic download from Microsoft
  • Seamless user experience
  • Requires internet connection

Example 10: Advanced Enterprise Configuration

[VCRuntime1]
Version=2019
Architecture=both
Mode=detect
Action=install
Required=true
MinVersion=14.28.29913
Source=%PAL:AppDir%\Prerequisites\vc_redist_%ARCH%.exe

[NETRuntime1]
Framework=net48
Architecture=anycpu
Mode=detect
Action=bundle
Required=true
MinVersion=4.8.04084
Source=%PAL:AppDir%\Prerequisites\NDP48-x86-x64-AllOS-ENU.exe

[NETRuntime2]
Framework=net60
Architecture=anycpu
Mode=detect
Action=install
Required=false
MinVersion=6.0.7
Source=%PAL:AppDir%\Prerequisites\dotnet-runtime-6.0-win-%ARCH%.exe

Features:

  • Architecture-specific installer selection using %ARCH%
  • Multiple .NET framework support
  • Enterprise-grade dependency management
  • Flexible installation options

Configuration Guidelines:

Action Types:

  • skip: Don't check or install (for optional dependencies)
  • warn: Show warning message if missing (user installs manually)
  • install: Install from provided source file
  • bundle: Download and install automatically from Microsoft

Architecture Options:

  • x86: 32-bit only
  • x64: 64-bit only
  • both: Check and install both architectures
  • anycpu: Use system's native architecture (.NET only)

Mode Types:

  • detect: Only check if installed
  • install: Check and install if missing
  • bundle: Download and install (no local files needed)

Version Specifications:

VC++ Runtime Versions:

  • 2005: Visual Studio 2005 (v8.0)
  • 2008: Visual Studio 2008 (v9.0)
  • 2010: Visual Studio 2010 (v10.0)
  • 2012: Visual Studio 2012 (v11.0)
  • 2013: Visual Studio 2013 (v12.0)
  • 2015/2017/2019/2022: Universal C Runtime (v14.x)

.NET Framework Versions:

  • net20: .NET Framework 2.0
  • net35: .NET Framework 3.5
  • net40: .NET Framework 4.0
  • net45: .NET Framework 4.5
  • net46: .NET Framework 4.6
  • net47: .NET Framework 4.7
  • net48: .NET Framework 4.8

.NET Core/.NET Versions:

  • net50: .NET 5.0
  • net60: .NET 6.0
  • net70: .NET 7.0
  • net80: .NET 8.0

Advanced Scenarios:

Conditional Installation Based on Windows Version:

[VCRuntime1]
Version=2022
Architecture=x64
Mode=detect
Action=bundle
Required=true
; Only install on Windows 10+

[NETRuntime1]
Framework=net35
Architecture=anycpu
Mode=detect
Action=warn
Required=true
; Requires Windows Feature on Windows 10+

Development vs Production Configurations:

Development Mode:

[VCRuntime1]
Version=2022
Architecture=both
Mode=detect
Action=warn
Required=true
; Warn developers to install manually

[NETRuntime1]
Framework=net60
Architecture=anycpu
Mode=detect
Action=warn
Required=true

Production Mode:

[VCRuntime1]
Version=2022
Architecture=both
Mode=bundle
Action=bundle
Required=true
; Automatic installation for end users

[NETRuntime1]
Framework=net60
Architecture=anycpu
Mode=bundle
Action=bundle
Required=true

Fallback Runtime Strategy:

; Primary runtime preference
[NETRuntime1]
Framework=net70
Architecture=x64
Mode=detect
Action=warn
Required=false

; Fallback to older version
[NETRuntime2]
Framework=net60
Architecture=x64
Mode=detect
Action=install
Required=true
Source=%PAL:AppDir%\Prerequisites\dotnet-runtime-6.0-win-x64.exe

; Minimum fallback
[NETRuntime3]
Framework=net48
Architecture=anycpu
Mode=detect
Action=bundle
Required=true

Best Practices:

1. Minimize Dependencies:

  • Only include runtimes your application actually uses
  • Avoid "just in case" runtime installations
  • Test with minimal runtime installations

2. Architecture Strategy:

  • Use "anycpu" for .NET when possible
  • Install both x86/x64 VC++ only if needed
  • Consider your target audience's typical architecture

3. Source File Management:

  • Keep installer files in %PAL:AppDir%\Prerequisites\
  • Use meaningful filenames (e.g., vc_redist_2019_x64.exe)
  • Verify installer files are the latest versions

4. User Experience:

  • Mark truly critical runtimes as Required=true
  • Use "warn" for optional or development-time dependencies
  • Provide clear error messages and download links

5. Version Management:

  • Always specify MinVersion when possible
  • Test with the minimum supported versions
  • Update MinVersion requirements as needed

6. Testing Strategy:

  • Test on clean Windows installations
  • Test with older runtime versions installed
  • Verify behavior with missing dependencies

Error Handling Examples:

Missing Critical Runtime:

Missing Runtime Dependency

The application requires Visual C++ 2019 x64 Redistributable 
which is not installed on this system.

Please install this runtime and try again.

Outdated Runtime Version:

Outdated Runtime Version

The application requires .NET Framework 4.8 version 4.8.04084 
or newer.

Please update this runtime and try again.

Installation Failed:

Runtime Installation Failed

Failed to install Visual C++ 2019 x64 Redistributable.

Error: Installation failed with error code 1603

Please install manually and try again.

Clone this wiki locally