-
Notifications
You must be signed in to change notification settings - Fork 447
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.NET Framework targeting pack NuGet packages are missing net35 target framework #2022
Comments
What happens when you try to build? What's the error message? |
|
BTW in case anyone was curious why I would want to target |
There's a net20 nuget package so IMHO net30 and net35 should also be supported. https://www.nuget.org/packages/Microsoft.NETFramework.ReferenceAssemblies.net20 |
Similar issue dotnet/msbuild#1333 |
Unfortunately we've decided not to do this |
@dsplaisted Is it because of the C++/CLI System.Data dll? The net35 pack is the one that matters for those targeting .NET Framework versions that are currently supported. Can a community member fill the gap? |
Because net35 is still in support and net40 and net20 are not, and the Microsoft.NETFramework targeting pack includes net20 and net40 but not net35, and because I'm familiar with the pain of not having the choice to stop supporting net35, I created a community package to go along with these: https://www.nuget.org/packages/jnm2.ReferenceAssemblies.net35 There doesn't seem to be any technical limitation distinguishing this package from the Microsoft packages, and my integration tests show this working fine: Example.csproj<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net35;net40;netstandard2.0;netcoreapp3.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" />
<PackageReference Include="jnm2.ReferenceAssemblies.net35" Version="1.0.0" />
</ItemGroup>
</Project> ClassUsingSystemLinq.csusing System.Linq;
public class ClassUsingSystemLinq
{
public ClassUsingSystemLinq()
{
Enumerable.Empty<int>();
}
} This solves the problem of having to use VSWhere to find MSBuild when compiling for net35 on Windows and the problem of having to use Mono's MSBuild when compiling for net35 on macOS and Linux. |
@jnm2 Thanks so much for sharing!! |
ℹ 1.0.0 of https://www.nuget.org/packages/jnm2.ReferenceAssemblies.net35 is up, mirroring the changes made in Microsoft.NETFramework.ReferenceAssemblies 1.0.0. |
net35
is a legit target framework for .NET projects, but projects that target that framework can't build off Windows even when referencing theMicrosoft.NETFramework.ReferenceAssemblies
package.The text was updated successfully, but these errors were encountered: