mirror of
https://github.com/raylib-cs/raylib-cs
synced 2025-09-09 03:01:41 -04:00
Bump .NET Version from 5 to 8
This commit is contained in:
@@ -1,23 +1,20 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<StartupObject>Examples.Program</StartupObject>
|
||||
<RunWorkingDirectory>$(MSBuildThisFileDirectory)</RunWorkingDirectory>
|
||||
<LangVersion>10</LangVersion>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="Core/LoadingThread.cs" />
|
||||
<Compile Remove="Text/Unicode.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Using Include="Raylib_cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="../Raylib-cs/Raylib-cs.csproj" />
|
||||
<ProjectReference Include="../Raylib-cs.Native/Raylib-cs.Native.csproj" />
|
||||
|
@@ -1,16 +1,14 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
|
||||
<PackageReference Include="xunit" Version="2.4.1" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />
|
||||
<PackageReference Include="coverlet.collector" Version="1.3.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Raylib-cs\Raylib-cs.csproj" />
|
||||
</ItemGroup>
|
||||
|
@@ -1,13 +1,13 @@
|
||||
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.0.31903.59
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Raylib-cs", "Raylib-cs\Raylib-cs.csproj", "{236DB383-2FDC-4A77-8B33-22122D9B8950}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Raylib-cs", "Raylib-cs\Raylib-cs.csproj", "{236DB383-2FDC-4A77-8B33-22122D9B8950}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Raylib-cs.Tests", "Raylib-cs.Tests\Raylib-cs.Tests.csproj", "{1341D222-7E10-42C6-BC6E-4A46C934A843}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Raylib-cs.Tests", "Raylib-cs.Tests\Raylib-cs.Tests.csproj", "{1341D222-7E10-42C6-BC6E-4A46C934A843}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Examples", "Examples\Examples.csproj", "{1E2A5986-3F11-457F-AF97-D0C08D0060BA}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Examples", "Examples\Examples.csproj", "{1E2A5986-3F11-457F-AF97-D0C08D0060BA}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net5.0;net6.0</TargetFrameworks>
|
||||
<TargetFrameworks>net8.0</TargetFrameworks>
|
||||
<EnableDefaultItems>false</EnableDefaultItems>
|
||||
<AssemblyName>Raylib-cs</AssemblyName>
|
||||
<RootNamespace>Raylib_cs</RootNamespace>
|
||||
@@ -9,7 +9,6 @@
|
||||
<NoWarn>$(NoWarn);1591</NoWarn>
|
||||
<LangVersion>10.0</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<Authors>Chris Dill, Raysan5</Authors>
|
||||
<PackProject>true</PackProject>
|
||||
@@ -27,19 +26,14 @@
|
||||
<PackageProjectUrl>https://www.raylib.com/</PackageProjectUrl>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="logo/raylib-cs_64x64.png" Pack="true" PackagePath="" />
|
||||
<None Include="../README.md" Pack="true" PackagePath="" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />
|
||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="./Build.props" />
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="runtimes/**" Link="runtimes/%(RecursiveDir)/%(Filename)%(Extension)">
|
||||
<PackagePath>runtimes/</PackagePath>
|
||||
@@ -47,7 +41,6 @@
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="interop\*.cs" />
|
||||
<Compile Include="types\*.cs" />
|
||||
|
@@ -20,6 +20,7 @@ public readonly struct CBool
|
||||
*
|
||||
* 'value' is visible and constructable (if necessary), but impossible to modify or access.
|
||||
*/
|
||||
|
||||
public sbyte Value
|
||||
{
|
||||
init; private get;
|
||||
@@ -30,13 +31,14 @@ public readonly struct CBool
|
||||
{
|
||||
this.Value = (sbyte)(value ? 1 : 0);
|
||||
}
|
||||
|
||||
public CBool(Int64 value)
|
||||
{
|
||||
this.Value = (sbyte)(value != 0 ? 1 : 0);
|
||||
}
|
||||
|
||||
// CBool -> Native
|
||||
// Allows for arithmetic between CBools and for assignment to greater integer variables.
|
||||
// CBool -> Native Allows for arithmetic between CBools and for assignment to greater integer
|
||||
// variables.
|
||||
public static implicit operator sbyte(CBool x)
|
||||
{
|
||||
return x.Value;
|
||||
@@ -45,11 +47,11 @@ public readonly struct CBool
|
||||
// Allows for CBools to be implicitely assigned to a native boolean variable.
|
||||
public static implicit operator bool(CBool x)
|
||||
{
|
||||
return x.Value != 0 ? true : false;
|
||||
return x.Value != 0;
|
||||
}
|
||||
|
||||
// Native -> CBool
|
||||
// Allows native booleans to be implicitely constructed into CBools while passing parameters.
|
||||
// Native -> CBool Allows native booleans to be implicitely constructed into CBools while
|
||||
// passing parameters.
|
||||
public static implicit operator CBool(bool x)
|
||||
{
|
||||
return new CBool { Value = (sbyte)(x ? 1 : 0) };
|
||||
|
Reference in New Issue
Block a user