LatestLangVersion 1.0.0

Requires NuGet 2.5 or higher.

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

// Install LatestLangVersion as a Cake Tool
#tool nuget:?package=LatestLangVersion&version=1.0.0

LatestLangVersion

Upgrade all your projects to the latest C# version, the lazy way.

PM:

Get-Project -All | Install-Package LatestLangVersion

dotnet cli (using PowerShell):

Get-ChildItem *.csproj -Recurse | ForEach-Object { dotnet add $_ package LatestLangVersion }

About

C# 7 is the first C# release where Microsoft started doing minor releases (7.1, 7.2, 7.3). However all new projects are still configured to use C# 7.0 (the latest major version).

Okay how do I get them?

Well you probably already have them installed.

Then why can't I use new C# features in my code?

Minor releases are opt-in.

How does this thing work then?

When you install this package into a project, a little chunk of MSBuild stuff is added to your project.

<PropertyGroup>
  <LangVersion>latest</LangVersion>
</PropertyGroup>

This is the opt-in part that lets you use whatever latest C# version you have installed. When you uninstall this package from a project, the project will revert to using the default version.

Why should I use this?

Because you can use the NuGet package manager UI in Visual Studio to quickly upgrade a large solution.

Why should I use this instead of Directory.build.props?

Because directory-wide build.props don't offer the same control over which projects get upgraded or not.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has 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
1.0.0 1,106 6/29/2018

Initial release