CodeFactory.WinVs.Wpf
2.26166.0.1-PreRelease
dotnet add package CodeFactory.WinVs.Wpf --version 2.26166.0.1-PreRelease
NuGet\Install-Package CodeFactory.WinVs.Wpf -Version 2.26166.0.1-PreRelease
<PackageReference Include="CodeFactory.WinVs.Wpf" Version="2.26166.0.1-PreRelease" />
<PackageVersion Include="CodeFactory.WinVs.Wpf" Version="2.26166.0.1-PreRelease" />
<PackageReference Include="CodeFactory.WinVs.Wpf" />
paket add CodeFactory.WinVs.Wpf --version 2.26166.0.1-PreRelease
#r "nuget: CodeFactory.WinVs.Wpf, 2.26166.0.1-PreRelease"
#:package CodeFactory.WinVs.Wpf@2.26166.0.1-PreRelease
#addin nuget:?package=CodeFactory.WinVs.Wpf&version=2.26166.0.1-PreRelease&prerelease
#tool nuget:?package=CodeFactory.WinVs.Wpf&version=2.26166.0.1-PreRelease&prerelease
CodeFactory.WinVs.Wpf
The CodeFactory User Interface WPF for Visual Studio - Windows library provides custom WPF dialog screens and user controls hosted inside Visual Studio for Windows. It is used alongside CodeFactory automation commands to present interactive UI to the developer at automation runtime.
Requirements
| Requirement | Value |
|---|---|
| Target Framework | .NET Framework 4.8 |
| Visual Studio | Visual Studio 2022 / Visual Studio 2026 (Windows) |
| CodeFactory Runtime | CodeFactory for Windows ≥ 2.26166.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.Wpf
Or in your .csproj:
<PackageReference Include="CodeFactory.WinVs.Wpf" Version="2.26166.0.1-PreRelease" />
Overview
CodeFactory.WinVs.Wpf is part of the CodeFactory SDK for Visual Studio for Windows (version 2.0). It provides the WPF UI layer for CodeFactory automation and includes:
ViewUserControl— A base WPFUserControlclass extended with direct access to Visual Studio actions (IVsActions) and a structured logger (ILogger). Inherit from this class to build custom dialog content for your automation.- Dialog Window Hosting — Views are hosted in a thread-safe dialog window managed by CodeFactory via
IVsUIActions.ShowDialogWindowAsync. - Document Panel Hosting — Views can also be embedded in a Visual Studio document panel via
IVsUIActions.ShowDocumentPanelAsync. - Host Window Integration — The
ViewUserControlbase class automatically subscribes to and responds to hosting window lifecycle events (Activated,Closing).
Key Concepts
ViewUserControl
ViewUserControl is the single public class in the CodeFactory.WinVs.Wpf namespace. Inherit from it to create a custom WPF user control that participates in the CodeFactory UI hosting pipeline.
Key members:
| Member | Description |
|---|---|
Title |
A dependency property for the title shown in the hosting dialog window. |
_visualStudioActions |
Provides access to all Visual Studio automation actions at runtime. |
_logger |
Structured logger scoped to this user control. |
Close() |
Raises the CloseHost event to signal the hosting window to close. |
CloseHost |
Event raised when the user control requests its hosting window to close. |
WindowActivated |
Virtual — override to react when the hosting window is activated. |
WindowClosing |
Virtual — override to react when the hosting window is closing. |
Launching a Dialog from a Command
Use IVsUIActions (available on every CodeFactory command via _visualStudioActions) to create and display your view:
- Launch the dialog from within a CodeFactory command using
CreateViewAsync<T>andShowDialogWindowAsync.
Related Packages
| Package | Description |
|---|---|
CodeFactory |
Core contracts shared across all CodeFactory IDE targets (.NET Standard 2.0) |
CodeFactory.WinVs |
Core SDK for building CodeFactory automation for Visual Studio for Windows |
Release Notes
2.26166.0.1-PreRelease
- Recompile Required: Automation projects must be recompiled against this version of the SDK.
- Aligned with
CodeFactoryandCodeFactory.WinVspackage version2.26166.0.1-PreRelease.
License
This project is licensed under the MIT License.
Copyright © 2026 CodeFactory, LLC.
Links
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET Framework | net48 is compatible. net481 was computed. |
-
.NETFramework 4.8
- CodeFactory (>= 2.26166.0.1-PreRelease)
- CodeFactory.WinVs (>= 2.26166.0.1-PreRelease)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on CodeFactory.WinVs.Wpf:
| Package | Downloads |
|---|---|
|
CodeFactory.WinVs.SDK
Software development kit for building CodeFactory automation in Visual Studio - Windows. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.26166.0.1-PreRelease | 128 | 6/23/2026 |
| 2.26151.0.1-PreRelease | 95 | 6/1/2026 |
| 2.25220.0.1-PreRelease | 223 | 8/8/2025 |
| 2.25165.0.1-PreRelease | 191 | 6/16/2025 |
| 2.24224.0.1-PreRelease | 179 | 8/11/2024 |
| 2.23151.1-PreRelease | 278 | 6/6/2023 |
| 2.23149.1-PreRelease | 207 | 5/30/2023 |
Release Updates for 2.26166.0.1
Recompile Release:
When you update your automation to this version of the SDK.
You will need to recompile your automation projects to the new version of the SDK, and make sure you have the CodeFactory runtime at least the same version or higher.