Skip to content

Commit 8707912

Browse files
committed
remove anything to do with SponsorLink
1 parent 985005c commit 8707912

File tree

7 files changed

+59
-12
lines changed

7 files changed

+59
-12
lines changed

sample/Tracker/Tracker.Core/Tracker.Core.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<ItemGroup>
1010
<PackageReference Include="AutoMapper" Version="12.0.1" />
1111
<PackageReference Include="FluentValidation" Version="11.6.0" />
12-
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.9" />
12+
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.10" />
1313
</ItemGroup>
1414

1515
<ItemGroup>

sample/Tracker/Tracker.Scaffold/Tracker.Scaffold.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.9">
11+
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.10">
1212
<PrivateAssets>all</PrivateAssets>
1313
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1414
</PackageReference>
15-
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.9" />
15+
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.10" />
1616
</ItemGroup>
1717

1818
</Project>
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
using System.Reflection;
2+
3+
namespace EntityFrameworkCore.Generator;
4+
5+
public static class AssemblyMetadata
6+
{
7+
private static readonly Lazy<string> _fileVersion = new(() =>
8+
{
9+
var assembly = typeof(AssemblyMetadata).Assembly;
10+
var attribute = assembly.GetCustomAttribute<AssemblyFileVersionAttribute>();
11+
return attribute?.Version;
12+
});
13+
14+
private static readonly Lazy<string> _assemblyVersion = new(() =>
15+
{
16+
var assembly = typeof(AssemblyMetadata).Assembly;
17+
var attribute = assembly.GetCustomAttribute<AssemblyVersionAttribute>();
18+
return attribute?.Version;
19+
});
20+
21+
private static readonly Lazy<string> _informationVersion = new(() =>
22+
{
23+
var assembly = typeof(AssemblyMetadata).Assembly;
24+
var attribute = assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>();
25+
return attribute?.InformationalVersion;
26+
});
27+
28+
private static readonly Lazy<string> _assemblyDescription = new(() =>
29+
{
30+
var assembly = typeof(AssemblyMetadata).Assembly;
31+
var attribute = assembly.GetCustomAttribute<AssemblyDescriptionAttribute>();
32+
return attribute?.Description;
33+
});
34+
35+
private static readonly Lazy<string> _assemblyName = new(() =>
36+
{
37+
var assembly = typeof(AssemblyMetadata).Assembly;
38+
return assembly.GetName().Name;
39+
});
40+
41+
public static string FileVersion => _fileVersion.Value;
42+
43+
public static string AssemblyVersion => _assemblyVersion.Value;
44+
45+
public static string AssemblyDescription => _assemblyDescription.Value;
46+
47+
public static string AssemblyName => _assemblyName.Value;
48+
49+
public static string InformationalVersion => _informationVersion.Value;
50+
}

src/EntityFrameworkCore.Generator.Core/EntityFrameworkCore.Generator.Core.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77

88
<ItemGroup>
99
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="4.6.0" />
10-
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.9" />
10+
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.10" />
1111
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="7.0.0" />
1212
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="7.0.0" />
13-
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.9" />
14-
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.9" />
13+
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.10" />
14+
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.10" />
1515
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="7.0.4" />
1616
<PackageReference Include="Oracle.EntityFrameworkCore" Version="7.21.11" />
1717
<PackageReference Include="YamlDotNet" Version="13.1.1" />

src/EntityFrameworkCore.Generator/EntityFrameworkCore.Generator.csproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@
1111
<PackageReference Include="McMaster.Extensions.CommandLineUtils" Version="4.0.2" />
1212
<PackageReference Include="Serilog.Extensions.Hosting" Version="7.0.0" />
1313
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
14-
<PackageReference Include="ThisAssembly" Version="1.3.1">
15-
<PrivateAssets>all</PrivateAssets>
16-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
17-
</PackageReference>
1814
</ItemGroup>
1915

2016
<ItemGroup>

src/EntityFrameworkCore.Generator/Program.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
using McMaster.Extensions.CommandLineUtils;
44

5+
using Microsoft.CodeAnalysis;
56
using Microsoft.Extensions.DependencyInjection;
67
using Microsoft.Extensions.Logging;
78

@@ -67,5 +68,5 @@ public static int Main(string[] args)
6768
}
6869

6970

70-
private static string GetVersion() => ThisAssembly.Info.InformationalVersion;
71+
private static string GetVersion() => AssemblyMetadata.InformationalVersion;
7172
}

test/EntityFrameworkCore.Generator.Core.Tests/EntityFrameworkCore.Generator.Core.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<PackageReference Include="FluentAssertions" Version="6.11.0" />
2727
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="7.0.0" />
2828
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
29-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
29+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.0" />
3030
<PackageReference Include="xunit" Version="2.5.0" />
3131
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.0">
3232
<PrivateAssets>all</PrivateAssets>

0 commit comments

Comments
 (0)