Only 0.1.1

dotnet add package Only --version 0.1.1                
NuGet\Install-Package Only -Version 0.1.1                
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="Only" Version="0.1.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Only --version 0.1.1                
#r "nuget: Only, 0.1.1"                
#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.
// Install Only as a Cake Addin
#addin nuget:?package=Only&version=0.1.1

// Install Only as a Cake Tool
#tool nuget:?package=Only&version=0.1.1                

Only

This library enables a WPF app to run as a single instance.

Downloads NuGet MIT

Usage

Get the Only package from NuGet and update your App.xaml file as follows:

<only:InstanceAwareApp x:Class="YourApp.App"
    xmlns:only="clr-namespace:Only;assembly=Only">
...
</only:InstanceAwareApp>

Then modify App.xaml.cs to call Only.InstanceAwareApp.RunSingle() method:

public partial class App
{
    public new int Run()
    {
        return RunSingle();
    }
}

That's it!

Product Compatible and additional computed target framework versions.
.NET net8.0-windows7.0 is compatible. 
.NET Framework net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.6.2

    • No dependencies.
  • net8.0-windows7.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
0.1.1 54 11/19/2024
0.1.0 76 9/24/2024