Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

Can a NuGet package built with a newer version of c# be used in a project using an older version of c#?

$
0
0

If I build and publish a NuGet package with a Language Version of 9, can I install and reference the NuGet package in a project using a lower Language version (for example c# 7)?

NuGet Package .csproj:

<Project Sdk="Microsoft.NET.Sdk"><PropertyGroup><TargetFramework>netstandard2.0</TargetFramework><LangVersion>9</LangVersion></PropertyGroup></Project>

Consuming library .csproj:

<Project Sdk="Microsoft.NET.Sdk"><PropertyGroup><TargetFramework>netstandard2.0</TargetFramework><LangVersion>7.3</LangVersion></PropertyGroup></Project>

Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>