Skip to content

Upgrade to .Net 8 #33

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions ConsoleGUI.Example/ConsoleGUI.Example.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<AssemblyVersion>2024.2.4.1031</AssemblyVersion>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\ConsoleGUI\ConsoleGUI.csproj" />
</ItemGroup>

</Project>
</Project>
63 changes: 11 additions & 52 deletions ConsoleGUI.MouseExample/ConsoleGUI.MouseExample.csproj
Original file line number Diff line number Diff line change
@@ -1,60 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{97B69CAE-3F74-4DEA-86FF-929FC45D3080}</ProjectGuid>
<TargetFramework>net8.0</TargetFramework>
<OutputType>Exe</OutputType>
<RootNamespace>ConsoleGUI.MouseExample</RootNamespace>
<AssemblyName>ConsoleGUI.MouseExample</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<AssemblyTitle>ConsoleGUI.MouseExample</AssemblyTitle>
<Product>ConsoleGUI.MouseExample</Product>
<Copyright>Copyright © 2019</Copyright>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<FileVersion>1.0.0.0</FileVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="MouseHandler.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<ProjectReference Include="..\ConsoleGUI\ConsoleGUI.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ConsoleGUI\ConsoleGUI.csproj">
<Project>{E3D8BC25-7EA1-4F81-9C31-BCF2DCBF77A9}</Project>
<Name>ConsoleGUI</Name>
</ProjectReference>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
23 changes: 0 additions & 23 deletions ConsoleGUI.MouseExample/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("ConsoleGUI.MouseExample")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ConsoleGUI.MouseExample")]
[assembly: AssemblyCopyright("Copyright © 2019")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -21,16 +11,3 @@

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("97b69cae-3f74-4dea-86ff-929fc45d3080")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
4 changes: 2 additions & 2 deletions ConsoleGUI.Test/Common/DrawingContextTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public void DummyDrawingContext_HasEmptySize()
{
var drawingContext = DrawingContext.Dummy;

Assert.AreEqual(Size.Empty, drawingContext.Size);
Assert.That(Size.Empty,Is.EqualTo( drawingContext.Size));
}

[Test]
Expand Down Expand Up @@ -77,7 +77,7 @@ public void DrawingContext_PropagatesSizeLimits()

drawingContext.SetLimits(new Size(10, 15), new Size(20, 25));

Assert.IsTrue(raised);
Assert.That(raised,Is.True);
}

[Test]
Expand Down
15 changes: 5 additions & 10 deletions ConsoleGUI.Test/ConsoleGUI.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>

<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Moq" Version="4.13.0" />
<PackageReference Include="nunit" Version="3.10.1" />
<PackageReference Include="NUnit3TestAdapter" Version="3.10.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.8.0" />
<PackageReference Include="Moq" Version="4.20.70" />
<PackageReference Include="NUnit" Version="4.0.1" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\ConsoleGUI\ConsoleGUI.csproj" />
</ItemGroup>

</Project>
8 changes: 4 additions & 4 deletions ConsoleGUI.Test/Controls/BorderTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public void Border_AdjustsItsSize_ToTheContent()
};
(border as IControl).Context = context.Object;

Assert.AreEqual(new Size(22, 32), border.Size);
Assert.That(new Size(22, 32),Is.EqualTo( border.Size));
}

[Test]
Expand All @@ -41,7 +41,7 @@ public void EmptyBorder_AdjustsItsSize_ToTheMinSizeOfItsContainer()
var border = new Border();
(border as IControl).Context = context.Object;

Assert.AreEqual(new Size(10, 20), border.Size);
Assert.That(new Size(10, 20),Is.EqualTo( border.Size));
}

[Test]
Expand All @@ -54,7 +54,7 @@ public void Border_ReturnsEmptyCharacter_ForItsInterior()
var border = new Border();
(border as IControl).Context = context.Object;

Assert.AreEqual(Character.Empty, border[new Position(1, 1)].Character);
Assert.That(Character.Empty,Is.EqualTo( border[new Position(1, 1)].Character));
}

[Test]
Expand All @@ -67,7 +67,7 @@ public void Border_ReturnsEmptyCharacter_OutsideOfItsSize()
var border = new Border();
(border as IControl).Context = context.Object;

Assert.AreEqual(Character.Empty, border[new Position(3, 1)].Character);
Assert.That(Character.Empty,Is.EqualTo( border[new Position(3, 1)].Character));
}
}
}
2 changes: 1 addition & 1 deletion ConsoleGUI.Test/Utils/ColorConverterTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void ConsoleColor_IsRestoredCorrectly(ConsoleColor initialColor)
var color = ColorConverter.GetColor(initialColor);
var convertedColor = ColorConverter.GetNearestConsoleColor(color);

Assert.AreEqual(initialColor, convertedColor);
Assert.That(initialColor,Is.EqualTo( convertedColor));
}
}
}
4 changes: 2 additions & 2 deletions ConsoleGUI.sln
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@


Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.28922.388
Expand All @@ -9,7 +9,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleGUI", "ConsoleGUI\Co
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleGUI.Test", "ConsoleGUI.Test\ConsoleGUI.Test.csproj", "{ABC28308-500E-48E9-AD7E-AA8977370D35}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleGUI.MouseExample", "ConsoleGUI.MouseExample\ConsoleGUI.MouseExample.csproj", "{97B69CAE-3F74-4DEA-86FF-929FC45D3080}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleGUI.MouseExample", "ConsoleGUI.MouseExample\ConsoleGUI.MouseExample.csproj", "{97B69CAE-3F74-4DEA-86FF-929FC45D3080}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
7 changes: 3 additions & 4 deletions ConsoleGUI/ConsoleGUI.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>Tomasz Rewak</Authors>
<Company />
Expand All @@ -24,6 +23,6 @@
1.1.0 - Adding BreakPanel and Decorator
1.0.5 - Adding basic mouse support
1.0.4 - Adding support for window resizing</PackageReleaseNotes>
<AssemblyVersion>2024.2.4.1031</AssemblyVersion>
</PropertyGroup>

</Project>
</Project>