Nukepayload2.SourceGenerators.MyWpfExtension 2.0.0

dotnet add package Nukepayload2.SourceGenerators.MyWpfExtension --version 2.0.0
                    
NuGet\Install-Package Nukepayload2.SourceGenerators.MyWpfExtension -Version 2.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="Nukepayload2.SourceGenerators.MyWpfExtension" Version="2.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Nukepayload2.SourceGenerators.MyWpfExtension" Version="2.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Nukepayload2.SourceGenerators.MyWpfExtension" />
                    
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 Nukepayload2.SourceGenerators.MyWpfExtension --version 2.0.0
                    
#r "nuget: Nukepayload2.SourceGenerators.MyWpfExtension, 2.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.
#addin nuget:?package=Nukepayload2.SourceGenerators.MyWpfExtension&version=2.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Nukepayload2.SourceGenerators.MyWpfExtension&version=2.0.0
                    
Install as a Cake Tool

MyWpfExtensionGenerator

VB "WPF My extension" generator. Generates Visual Basic's My Namespace extension for Windows Presentation Foundation. The generator writes the WPF specific part of My extension by default. For generating all members, please enable Windows Forms (Edit project file, add <UseWindowsForms>true</UseWindowsForms> to <PropertyGroup>), then reload the project.

https://www.nuget.org/packages/Nukepayload2.SourceGenerators.MyWpfExtension/

Requirements

Current version

Visual Studio 17.8 or later

Version 1.x

Visual Studio 16.9 or later

Features

  • Generate My.Application
  • Generate My.Windows
  • Generate My.Computer (Windows Forms required)
  • Generate My.User (Windows Forms required)
  • Generate My.Log (Windows Forms required)
  • Generate My.Application.Info (Windows Forms required)

Project structure

https://github.com/Nukepayload2/MyWpfExtensionGenerator

Nukepayload2.SourceGenerators.MyWpfExtension

The source generator project. Build this project before using the sample project.

SampleNetWpfAndWinforms

Sample project of WPF and Windows Forms. Requires to reopen Visual Studio after building the source generator project.

SampleNetWpfOnly

Sample project of WPF. Requires to reopen Visual Studio after building the source generator project.

Usage

Package reference

  • Install Nukepayload2.SourceGenerators.MyWpfExtension
  • Version 1.x only: If you are using .NET 5 or earlier, edit your project file. In the <ProjectReference> element, add OutputItemType="Analyzer" ReferenceOutputAssembly="False" . Add <IncludePackageReferencesDuringMarkupCompilation>true</IncludePackageReferencesDuringMarkupCompilation> to <PropertyGroup> element.

Project reference

  • Add the source generator project to your solution.
  • Build the source generator project.
  • Select your WPF project, and add project reference to the source generator.
  • Version 1.x only: Edit your project file. In the <ProjectReference> element, add OutputItemType="Analyzer" ReferenceOutputAssembly="False" . Add <IncludePackageReferencesDuringMarkupCompilation>true</IncludePackageReferencesDuringMarkupCompilation> to <PropertyGroup> element.
  • Reload the solution.

Known issues

  • Version 1.x only: WPF windows with the same name and different namespace is unsupported.
There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

  • .NETStandard 2.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 160 4/1/2025
1.0.2 643 3/20/2021
1.0.1 517 3/16/2021
1.0.0 517 3/15/2021

Migrate to incremental generator