CodeFactory.WinVs 2.26151.0.1-PreRelease

This is a prerelease version of CodeFactory.WinVs.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package CodeFactory.WinVs --version 2.26151.0.1-PreRelease
                    
NuGet\Install-Package CodeFactory.WinVs -Version 2.26151.0.1-PreRelease
                    
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="CodeFactory.WinVs" Version="2.26151.0.1-PreRelease" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CodeFactory.WinVs" Version="2.26151.0.1-PreRelease" />
                    
Directory.Packages.props
<PackageReference Include="CodeFactory.WinVs" />
                    
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 CodeFactory.WinVs --version 2.26151.0.1-PreRelease
                    
#r "nuget: CodeFactory.WinVs, 2.26151.0.1-PreRelease"
                    
#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 CodeFactory.WinVs@2.26151.0.1-PreRelease
                    
#: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=CodeFactory.WinVs&version=2.26151.0.1-PreRelease&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=CodeFactory.WinVs&version=2.26151.0.1-PreRelease&prerelease
                    
Install as a Cake Tool

CodeFactory.WinVs

NuGet License: MIT

The CodeFactory API for Visual Studio - Windows is the core SDK library for building CodeFactory automation that runs inside Visual Studio for Windows. It provides the full set of APIs, models, commands, and utilities needed to author automation that interacts with the Visual Studio IDE, solution, and project system.


Requirements

Requirement Value
Target Framework .NET Standard 2.0
Visual Studio Visual Studio 2022 / Visual Studio 2026 (Windows)
CodeFactory Runtime CodeFactory for Windows ≥ 2.26151.0.1
Command Library Project .NET Framework 4.8

⚠️ Important: When updating to a new version of this SDK you must recompile your automation (command library) projects and ensure the CodeFactory runtime installed in Visual Studio is at the same version or higher.


Installation

Install via the NuGet Package Manager, Package Manager Console, or the .NET CLI:

dotnet add package CodeFactory.WinVs

Or in your .csproj:

<PackageReference Include="CodeFactory.WinVs" Version="2.26151.0.1-PreRelease" />

Overview

CodeFactory.WinVs is part of the CodeFactory SDK for Visual Studio for Windows (version 2.0). It is the primary library for automation authors and provides:

  • Automation Commands — Solution Explorer and IDE command hooks surfaced in Visual Studio.
  • Project System Models — Strongly-typed models representing solutions, projects, folders, and source files.
  • C# Code Models — A rich object model for inspecting and generating C# source code.
  • External Configuration — A flexible configuration system (ExternalConfig) for parameterizing commands without code changes.
  • Transaction History — Tracking of all file write operations performed by automation, including file name, project, path, character count, and line count statistics.
  • Source Formatting — A SourceFormatter API for generating well-formatted source code (replaces T4 templates).
  • Logging — Built-in structured logging via Serilog and Microsoft.Extensions.Logging abstractions.

Key Concepts

Automation Commands

Commands are the building blocks of CodeFactory automation. Two types are available:

  • Solution Explorer Commands — Appear on context menus in Solution Explorer (e.g., on a project, folder, or file node).
  • IDE Commands — Appear as top-level Visual Studio menu or toolbar actions.

Commands are authored in a .NET Framework 4.8 Command Library project using the CodeFactory for Windows - Command Library project template.

External Configuration (ExternalConfig)

The ExternalConfig class replaces the deprecated CommandManager for all command configuration. Configuration parameters (ConfigParameter) support the following value types:

  • string
  • bool
  • DateTime
  • List

Configuration is managed through the External Configuration Editor, accessible by right-clicking the Solution node in Solution Explorer and selecting [cF] Automation Configuration.

Transaction History

CodeFactory tracks statistics for every file written by automation:

Statistic Description
File Name Name of the file updated
Project Name Project the file belongs to (null if solution-level)
Solution Name Solution the file resides in
Relative Path Path from the project or solution root
Characters Written Non-whitespace, non-line-return characters written
Lines Written Lines with content written

Transaction results are returned from any insert or replace operation.


Getting Started

  1. Install the CodeFactory for Windows Visual Studio extension.
  2. Create a new CodeFactory for Windows - Command Library project (.NET Framework 4.8).
  3. Add this NuGet package to your command library project.
  4. Add a new command using the CodeFactoryWindows item templates (Add > New Item > CodeFactoryWindows).
  5. Implement your automation logic inside the generated command class.
  6. Build and package your automation using the CodeFactory.Packager.WinVs utility (called automatically on build).

Package Description
CodeFactory Core contracts shared across all CodeFactory IDE targets (.NET Standard 2.0)
CodeFactory.WinVs.Wpf WPF UI controls for Visual Studio for Windows (.NET Framework 4.8)

📄 Release Notes

2.26151.0.1-PreRelease

Released: May 2026 — Branch: 2026-March

🆕 New
  • Visual Studio 2026 support — This release targets the Visual Studio 2026 (v18.6) runtime. The CodeFactory runtime must be at version 2.26151.0.1 or higher to load automation built against this SDK.
  • C# 13 language support — The CodeFactory base library now compiles with LangVersion 13. C# 13 language features are available in automation projects via the PolySharp polyfill package, which backfills required compiler attributes onto .NET Standard 2.0.
🔧 Changes
  • Updated SDK version range — The supported SDK version window has been updated:
    • Minimum supported SDK version: 2.24224.0.1
    • Maximum supported SDK version: 2.26151.0.1
  • Copyright year updated — All library copyright notices updated to reflect 2026.
⚠️ Breaking Changes / Recompile Required

Action Required: You must recompile your automation projects against this version of the SDK before deploying to a Visual Studio 2026 environment.

Ensure the CodeFactory runtime installed in Visual Studio is at least version 2.26151.0.1.


2.23160.0.1

🐛 Fixes
  • Source Manager – Add Source ordering — Fixed the roll-up order so that constructor and field positions are correctly evaluated before the top of the container when determining insertion points for Add Before and Add After operations.
🆕 New
  • GenerateCSharpTypeName extension — Added a new C# generation extension on CsSource models that generates the fully qualified C# type name for a target container (Class, Structure, Interface, Record).

2.23157.0.1

Initial general availability release of the CodeFactory runtime and SDK (v2.0) for Visual Studio for Windows.

  • Migration of libraries from .NET Framework to .NET Standard where applicable.
  • Upgraded all automation libraries to target .NET Framework 4.8.
  • Integrated ADK functionality into the core runtime.
  • Streamlined API call naming for improved developer experience.
  • First generation of Code Blocks and Builders incorporated into the SDK and runtime.

License

This project is licensed under the MIT License.
Copyright © 2026 CodeFactory, LLC.


Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on CodeFactory.WinVs:

Package Downloads
CodeFactory.WinVs.SDK

Software development kit for building CodeFactory automation in Visual Studio - Windows.

CodeFactory.WinVs.Wpf

Library that provides custom dialog screens hosted in Visual Studio for Windows, hosted for CodeFactory automation.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.26166.0.1-PreRelease 120 6/23/2026
2.26151.0.1-PreRelease 99 6/1/2026
2.25220.0.1-PreRelease 229 8/8/2025
2.25165.0.1-PreRelease 199 6/16/2025
2.24224.0.1-PreRelease 190 8/11/2024
2.23160.1-PreRelease 274 6/10/2023
2.23158.1-PreRelease 226 6/7/2023
2.23157.1-PreRelease 225 6/6/2023
2.23149.1-PreRelease 219 5/30/2023

Release Updates for 2.26151.0.1

         New

 - **Visual Studio 2026 support** — This release targets the Visual Studio 2026 (v18.6) runtime. The CodeFactory runtime must be at version `2.26151.0.1` or higher to load automation built against this SDK.
 - **C# 13 language support** — The `CodeFactory` base library now compiles with `LangVersion 13`. C# 13 language features are available in automation projects via the [PolySharp](https://github.com/Sergio0694/PolySharp) polyfill package, which backfills required compiler attributes onto .NET Standard 2.0.

 Changes

 - **Updated SDK version range** — The supported SDK version window has been updated:
 - Minimum supported SDK version: `2.24224.0.1`
 - Maximum supported SDK version: `2.26151.0.1`
 - **Copyright year updated** — All library copyright notices updated to reflect 2026.

Breaking Changes / Recompile Required

 > **Action Required:** You must recompile your automation projects against this version of the SDK before deploying to a Visual Studio 2026 environment.
 >
 > Ensure the CodeFactory runtime installed in Visual Studio is at least version `2.26151.0.1`.