Skip to content

Commit 2afd127

Browse files
Revert "Remove unused usings from example and exemplar (#2387)" (#2393)
This reverts commit 1a54dba. [no important files changed]
1 parent 1a54dba commit 2afd127

File tree

672 files changed

+1230
-914
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

672 files changed

+1230
-914
lines changed

bin/add-practice-exercise.ps1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ $project = "${exerciseDir}/${ExerciseName}.csproj"
3535
& dotnet new xunit --force -lang "C#" --target-framework-override net9.0 -o $exerciseDir -n $ExerciseName
3636
& dotnet sln exercises/Exercises.sln add $project
3737

38+
# Cleanup project file
39+
[xml]$projectXml = Get-Content "${project}"
40+
$projectXml.Project.RemoveChild($projectXml.Project.ItemGroup[1])
41+
$projectXml.Project.PropertyGroup.RemoveChild($projectXml.Project.PropertyGroup.SelectSingleNode("ImplicitUsings"))
42+
$projectXml.Save("${project}")
43+
3844
# Update project packages
3945
& dotnet remove $project package coverlet.collector
4046
& dotnet add $project package Exercism.Tests --version 0.1.0-beta1

exercises/concept/annalyns-infiltration/AnnalynsInfiltration.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
using System;
2+
13
static class QuestLogic
24
{
35
public static bool CanFastAttack(bool knightIsAwake)

exercises/concept/annalyns-infiltration/AnnalynsInfiltration.csproj

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,9 @@
33
<PropertyGroup>
44
<TargetFramework>net9.0</TargetFramework>
55
<Nullable>enable</Nullable>
6-
<ImplicitUsings>enable</ImplicitUsings>
76
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
87
</PropertyGroup>
98

10-
<ItemGroup>
11-
<Using Include="Xunit" />
12-
</ItemGroup>
13-
149
<ItemGroup>
1510
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
1611
<PackageReference Include="xunit" Version="2.8.1" />

exercises/concept/annalyns-infiltration/AnnalynsInfiltrationTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using Xunit;
12
using Exercism.Tests;
23

34
public class AnnalynsInfiltrationTests

exercises/concept/attack-of-the-trolls/.meta/Exemplar.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
using System;
2+
13
enum AccountType
24
{
35
Guest,

exercises/concept/attack-of-the-trolls/AttackOfTheTrolls.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
using System;
2+
13
// TODO: define the 'AccountType' enum
24

35
// TODO: define the 'Permission' enum

exercises/concept/attack-of-the-trolls/AttackOfTheTrolls.csproj

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,9 @@
33
<PropertyGroup>
44
<TargetFramework>net9.0</TargetFramework>
55
<Nullable>enable</Nullable>
6-
<ImplicitUsings>enable</ImplicitUsings>
76
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
87
</PropertyGroup>
98

10-
<ItemGroup>
11-
<Using Include="Xunit" />
12-
</ItemGroup>
13-
149
<ItemGroup>
1510
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
1611
<PackageReference Include="xunit" Version="2.8.1" />

exercises/concept/attack-of-the-trolls/AttackOfTheTrollsTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using Xunit;
12
using Exercism.Tests;
23

34
public class AttackOfTheTrollsTests

exercises/concept/authentication-system/.meta/Exemplar.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System.Collections.Generic;
12
using System.Collections.ObjectModel;
23

34
public class Authenticator

exercises/concept/authentication-system/AuthenticationSystem.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
using System.Collections.Generic;
2+
13
public class Authenticator
24
{
35
private class EyeColor

0 commit comments

Comments
 (0)