mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-03-22 10:34:30 +08:00
chore(build): 更新项目目标框架和构建配置
- 将多个项目的TargetFramework从netstandard2.0更新为net8.0;net9.0;net10.0 - 优化Directory.Build.props中的注释和配置说明 - 添加缺失的using System;引用 - 调整资源加载系统命名空间从GFramework.Godot.system到GFramework.Godot.assets - 修正ILogger.cs中的异常消息格式 - 移除BindableProperty.cs中多余的可空断言操作符
This commit is contained in:
parent
2dea63e69f
commit
6dd79b8e9a
@ -1,16 +1,12 @@
|
||||
<Project>
|
||||
<!-- import parent: https://docs.microsoft.com/en-us/visualstudio/msbuild/customize-your-build -->
|
||||
<!-- 配置项目构建属性,包括目标框架、CI构建设置、源代码嵌入和语言版本 -->
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netstandard2.0;net8.0</TargetFrameworks>
|
||||
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
|
||||
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
|
||||
<EmbedUntrackedSources>true</EmbedUntrackedSources>
|
||||
<!--
|
||||
we use a higher version than supported by the target framework to have nullable types and other nice features
|
||||
(a lot of features get polyfilled by Meziantou.Polyfill)
|
||||
however we need to be careful with the available features!
|
||||
-->
|
||||
<LangVersion>preview</LangVersion>
|
||||
</PropertyGroup>
|
||||
<!-- 引用代码分析和Polyfill功能的NuGet包,用于增强代码质量和兼容性 -->
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Meziantou.Analyzer" Version="2.0.264">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
|
||||
@ -72,7 +72,7 @@ public interface ILogger
|
||||
LogLevel.Warning => IsWarnEnabled(),
|
||||
LogLevel.Error => IsErrorEnabled(),
|
||||
LogLevel.Fatal => IsFatalEnabled(),
|
||||
_ => throw new ArgumentException("Level [" + level + "] not recognized.")
|
||||
_ => throw new ArgumentException($"Level [{level}] not recognized.", nameof(level)),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using GFramework.Core.Abstractions.events;
|
||||
|
||||
namespace GFramework.Core.Abstractions.property;
|
||||
|
||||
@ -16,7 +16,7 @@ public class BindableProperty<T>(T defaultValue = default!) : IBindableProperty<
|
||||
/// <summary>
|
||||
/// 获取或设置属性值比较器,默认使用Equals方法进行比较
|
||||
/// </summary>
|
||||
public static Func<T, T, bool> Comparer { get; set; } = (a, b) => a!.Equals(b)!;
|
||||
public static Func<T, T, bool> Comparer { get; set; } = (a, b) => a!.Equals(b);
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置属性值,当值发生变化时会触发注册的回调事件
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using GFramework.Core.system;
|
||||
using GFramework.Core.Abstractions.system;
|
||||
|
||||
namespace GFramework.Game.assets;
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using GFramework.Core.system;
|
||||
using GFramework.Core.Abstractions.system;
|
||||
|
||||
namespace GFramework.Game.assets;
|
||||
|
||||
|
||||
@ -1,18 +1,12 @@
|
||||
<Project>
|
||||
<!-- 配置项目构建属性 -->
|
||||
<!-- 配置项目构建属性,包括目标框架、CI构建设置、源代码嵌入和语言版本 -->
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
|
||||
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
|
||||
<EmbedUntrackedSources>true</EmbedUntrackedSources>
|
||||
<!--
|
||||
we use a higher version than supported by the target framework to have nullable types and other nice features
|
||||
(a lot of features get polyfilled by Meziantou.Polyfill)
|
||||
however we need to be careful with the available features!
|
||||
-->
|
||||
<LangVersion>preview</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- 引用项目所需的NuGet包 -->
|
||||
<!-- 引用代码分析和Polyfill功能的NuGet包,用于增强代码质量和兼容性 -->
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Meziantou.Analyzer" Version="2.0.264">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<PackageId>GeWuYou.GFramework.Godot.SourceGenerators</PackageId>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
|
||||
|
||||
<!-- 这是 Analyzer,不是运行时库 -->
|
||||
<IsRoslynAnalyzer>true</IsRoslynAnalyzer>
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using GFramework.Core.architecture;
|
||||
using GFramework.Core.Abstractions.architecture;
|
||||
using GFramework.Core.architecture;
|
||||
using Godot;
|
||||
|
||||
namespace GFramework.Godot.architecture;
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
using GFramework.Core.architecture;
|
||||
using GFramework.Core.Abstractions.architecture;
|
||||
using GFramework.Core.system;
|
||||
using GFramework.Game.assets;
|
||||
using GFramework.Godot.system;
|
||||
using Godot;
|
||||
|
||||
namespace GFramework.Godot.assets;
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
using GFramework.Core.system;
|
||||
using GFramework.Core.Abstractions.system;
|
||||
using GFramework.Game.assets;
|
||||
using Godot;
|
||||
|
||||
namespace GFramework.Godot.system;
|
||||
namespace GFramework.Godot.assets;
|
||||
|
||||
/// <summary>
|
||||
/// 资源加载系统接口,提供资源和场景的加载、实例化、预加载等功能
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
using GFramework.Core.system;
|
||||
using GFramework.Game.assets;
|
||||
using GFramework.Godot.assets;
|
||||
using Godot;
|
||||
|
||||
namespace GFramework.Godot.system;
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
using GFramework.Core.system;
|
||||
using GFramework.Game.assets;
|
||||
using GFramework.Godot.assets;
|
||||
using Godot;
|
||||
|
||||
namespace GFramework.Godot.system;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using GFramework.Core.system;
|
||||
using GFramework.Core.Abstractions.system;
|
||||
using Godot;
|
||||
|
||||
namespace GFramework.Godot.system;
|
||||
|
||||
@ -1,16 +1,12 @@
|
||||
<Project>
|
||||
<!-- import parent: https://docs.microsoft.com/en-us/visualstudio/msbuild/customize-your-build -->
|
||||
<!-- 配置项目构建属性,包括目标框架、CI构建设置、源代码嵌入和语言版本 -->
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
|
||||
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
|
||||
<EmbedUntrackedSources>true</EmbedUntrackedSources>
|
||||
<!--
|
||||
we use a higher version than supported by the target framework to have nullable types and other nice features
|
||||
(a lot of features get polyfilled by Meziantou.Polyfill)
|
||||
however we need to be careful with the available features!
|
||||
-->
|
||||
<LangVersion>preview</LangVersion>
|
||||
</PropertyGroup>
|
||||
<!-- 引用代码分析和Polyfill功能的NuGet包,用于增强代码质量和兼容性 -->
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Meziantou.Analyzer" Version="2.0.264">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
|
||||
@ -1,16 +1,12 @@
|
||||
<Project>
|
||||
<!-- import parent: https://docs.microsoft.com/en-us/visualstudio/msbuild/customize-your-build -->
|
||||
<!-- 配置项目构建属性,包括目标框架、CI构建设置、源代码嵌入和语言版本 -->
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
|
||||
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
|
||||
<EmbedUntrackedSources>true</EmbedUntrackedSources>
|
||||
<!--
|
||||
we use a higher version than supported by the target framework to have nullable types and other nice features
|
||||
(a lot of features get polyfilled by Meziantou.Polyfill)
|
||||
however we need to be careful with the available features!
|
||||
-->
|
||||
<LangVersion>preview</LangVersion>
|
||||
</PropertyGroup>
|
||||
<!-- 引用代码分析和Polyfill功能的NuGet包,用于增强代码质量和兼容性 -->
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Meziantou.Analyzer" Version="2.0.264">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<PackageId>GeWuYou.GFramework.SourceGenerators</PackageId>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
|
||||
|
||||
<!-- 这是 Analyzer,不是运行时库 -->
|
||||
<IsRoslynAnalyzer>true</IsRoslynAnalyzer>
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using GFramework.Core.Abstractions.rule;
|
||||
using GFramework.SourceGenerators.Abstractions.rule;
|
||||
using GFramework.SourceGenerators.Common.generator;
|
||||
using GFramework.SourceGenerators.diagnostics;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user