Skip to content

Commit

Permalink
remove anything to do with SponsorLink
Browse files Browse the repository at this point in the history
  • Loading branch information
pwelter34 committed Aug 9, 2023
1 parent 985005c commit 8707912
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 12 deletions.
2 changes: 1 addition & 1 deletion sample/Tracker/Tracker.Core/Tracker.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<ItemGroup>
<PackageReference Include="AutoMapper" Version="12.0.1" />
<PackageReference Include="FluentValidation" Version="11.6.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.10" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions sample/Tracker/Tracker.Scaffold/Tracker.Scaffold.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.9">
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.10">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.10" />
</ItemGroup>

</Project>
50 changes: 50 additions & 0 deletions src/EntityFrameworkCore.Generator.Core/AssemblyMetadata.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
using System.Reflection;

namespace EntityFrameworkCore.Generator;

public static class AssemblyMetadata
{
private static readonly Lazy<string> _fileVersion = new(() =>
{
var assembly = typeof(AssemblyMetadata).Assembly;
var attribute = assembly.GetCustomAttribute<AssemblyFileVersionAttribute>();
return attribute?.Version;
});

private static readonly Lazy<string> _assemblyVersion = new(() =>
{
var assembly = typeof(AssemblyMetadata).Assembly;
var attribute = assembly.GetCustomAttribute<AssemblyVersionAttribute>();
return attribute?.Version;
});

private static readonly Lazy<string> _informationVersion = new(() =>
{
var assembly = typeof(AssemblyMetadata).Assembly;
var attribute = assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>();
return attribute?.InformationalVersion;
});

private static readonly Lazy<string> _assemblyDescription = new(() =>
{
var assembly = typeof(AssemblyMetadata).Assembly;
var attribute = assembly.GetCustomAttribute<AssemblyDescriptionAttribute>();
return attribute?.Description;
});

private static readonly Lazy<string> _assemblyName = new(() =>
{
var assembly = typeof(AssemblyMetadata).Assembly;
return assembly.GetName().Name;
});

public static string FileVersion => _fileVersion.Value;

public static string AssemblyVersion => _assemblyVersion.Value;

public static string AssemblyDescription => _assemblyDescription.Value;

public static string AssemblyName => _assemblyName.Value;

public static string InformationalVersion => _informationVersion.Value;
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="4.6.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.10" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="7.0.0" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="7.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.10" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="7.0.4" />
<PackageReference Include="Oracle.EntityFrameworkCore" Version="7.21.11" />
<PackageReference Include="YamlDotNet" Version="13.1.1" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@
<PackageReference Include="McMaster.Extensions.CommandLineUtils" Version="4.0.2" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="7.0.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
<PackageReference Include="ThisAssembly" Version="1.3.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
Expand Down
3 changes: 2 additions & 1 deletion src/EntityFrameworkCore.Generator/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

using McMaster.Extensions.CommandLineUtils;

using Microsoft.CodeAnalysis;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;

Expand Down Expand Up @@ -67,5 +68,5 @@ public static int Main(string[] args)
}


private static string GetVersion() => ThisAssembly.Info.InformationalVersion;
private static string GetVersion() => AssemblyMetadata.InformationalVersion;
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<PackageReference Include="FluentAssertions" Version="6.11.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.0" />
<PackageReference Include="xunit" Version="2.5.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.0">
<PrivateAssets>all</PrivateAssets>
Expand Down

0 comments on commit 8707912

Please sign in to comment.