Fix: VS133 - Project templates are broken for .NET Framework#165
Fix: VS133 - Project templates are broken for .NET Framework#165gasparnagy merged 4 commits intomainfrom
Conversation
…T Framework by omitting ImplicitUsings.cs and omitting nullable setting in .csproj file.
gasparnagy
left a comment
There was a problem hiding this comment.
This is great in general, but if we touch this...
As far as I have seen the thing we use here with the ImplicitUsings.cs is anyway obsolete. Nowadays the trendy way of adding implicit usings is with the <Using Include="some-namespace" /> MsBuild setting. For example the new MsTest wizard generates a project file like:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<LangVersion>latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MSTest" Version="4.0.1" />
</ItemGroup>
<ItemGroup>
<Using Include="Microsoft.VisualStudio.TestTools.UnitTesting" />
</ItemGroup>
</Project>
and no ImplicitUsings.cs. Could we just get rid of this extra file and use the MsBuild option? I think everything would be simpler then. Or shall we do it in a separate PR?
Yes. Latest commit adopts this approach. Also made a small adjustment so that the using statement for NUnit is Once we are satisfied with this PR, then we should also update all the references to the test frameworks to their latest version via separate PR before we push a new release of the Extension. |
|
I'll also work on the |
🤔 What's changed?
When the generated project targets the .NET Framework:
<Nullable>enable</Nullable> <ImplicitUsings>enable</ImplicitUsings>linesImplicitUsings.csfileusing Renroll;line to the generated sample binding class.⚡️ What's your motivation?
Fix #133
🏷️ What kind of change is this?
♻️ Anything particular you want feedback on?
📋 Checklist:
This text was originally taken from the template of the Cucumber project, then edited by hand. You can modify the template here.