vdenv.Core 0.2.3

dotnet add package vdenv.Core --version 0.2.3
                    
NuGet\Install-Package vdenv.Core -Version 0.2.3
                    
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="vdenv.Core" Version="0.2.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="vdenv.Core" Version="0.2.3" />
                    
Directory.Packages.props
<PackageReference Include="vdenv.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add vdenv.Core --version 0.2.3
                    
#r "nuget: vdenv.Core, 0.2.3"
                    
#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.
#:package vdenv.Core@0.2.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=vdenv.Core&version=0.2.3
                    
Install as a Cake Addin
#tool nuget:?package=vdenv.Core&version=0.2.3
                    
Install as a Cake Tool

vdenv

.NET Core Package GitHub Release NuGet Version NuGet Downloads

vdenvは仮想デスクトップごとに環境変数およびプロファイルを切り替えるためのdotnetツールです。

インストール

dotnet tool install -g vdenv

使用方法

ターミナル起動時に以下のように引数を渡します:

cmd.exe /k for /f "delims=" %f in ('vdenv') do @call "%f"

Windows Terminalの場合、settings.json に以下のように設定することで、起動時にvdenvを実行できます:

{
  "profiles": {
    "list": [
      {
        "commandline": "%SystemRoot%\\System32\\cmd.exe /k for /f \"delims=\" %f in ('vdenv') do @call \"%f\""
      }
    ]
  }
}

UIで設定する場合は以下のように設定します: 設定UI

特定のコマンドにだけ現在のデスクトップの環境変数を適用したい場合は、-- に続けてコマンドを指定します:

vdenv -- echo %hoge%

-- 以降の引数が現在の仮想デスクトップの設定 (env/envPath/profilePath/startDir) を適用した状態でサブプロセスとして実行されます。終了コードはそのままvdenvの終了コードとして返されます。

その他の基本的なコマンド:

  • vdenv {desktopId}
    指定したデスクトップの環境変数を適用します。

  • vdenv init
    設定ファイルの初期化を行い、デスクトップ毎の設定を作成します。

  • vdenv config
    現在のデスクトップの設定内容を表示します。

  • vdenv config open
    設定ファイルをエディタで開きます。

設定ファイル (vdenv.yaml)

vdenvはユーザープロファイル直下の vdenv.yaml を参照します。

設定例:

desktops:
  90e9c8af-e2e9-44e5-8289-7f8d8fb55e21: # 仮想デスクトップの内部管理ID
    exists: true       # デスクトップが存在するかのフラグ (true/false)
    env: {}            # 環境変数のキーと値のペア。例: { "PATH": "C:\\path", "VAR": "value" }
    envPath: ""        # 環境変数を定義した.envファイルへのパス。空の場合は無視されます。
    profilePath: ""    # ログイン時に実行するスクリプト/バッチファイルのパス。空の場合は無視されます。
    startDir: ""       # 初期作業ディレクトリ。例: "C:\\Users\\UserName"
# ...その他のデスクトップ設定...

各項目の詳細:

  • exists:
    init コマンドによって自動的に設定されるフラグです。デスクトップが存在するかどうかを示します。

  • env:
    各デスクトップ固有の環境変数を定義します。キーが環境変数名、値がその設定値となります。

  • envPath:
    環境変数を一覧定義する外部の.envファイルのパスを指定します。指定がなければ無視されます。

  • profilePath:
    ユーザーの初期化スクリプト (例: CMD/バッチファイル) のパスを指定します。指定された場合、ログイン時等に自動実行されます。

  • startDir:
    作業開始ディレクトリを記載します。設定がある場合、起動時にそのディレクトリへ移動します。

ライセンス

このプロジェクトは MIT License の下でライセンスされています。

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

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
0.2.3 89 3/21/2026
0.2.2 77 3/21/2026
0.2.1 85 3/21/2026