Skip to content

Commit

Permalink
Update dependencies and fix diff path
Browse files Browse the repository at this point in the history
  • Loading branch information
meziantou committed Jan 6, 2024
1 parent 6c7a694 commit 987c5a9
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace Meziantou.Framework.HumanReadable.Converters;
internal sealed class UnixDomainSocketEndPointConverter : HumanReadableConverter<UnixDomainSocketEndPoint>
{
[SuppressMessage("Design", "MA0150:Do not call the default object.ToString explicitly")]
protected override void WriteValue(HumanReadableTextWriter writer, UnixDomainSocketEndPoint? value, HumanReadableSerializerOptions options)
{
Debug.Assert(value is not null);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>$(LatestTargetFrameworks);netstandard2.0</TargetFrameworks>
<TargetFrameworks>$(LatestTargetFrameworks);net472;net48</TargetFrameworks>
<Description>Serializer based on Argon for Meziantou.Framework.InlineSnapshotTesting</Description>
<Version>1.0.1</Version>
<Version>2.0.0</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ internal sealed class DiffEngineTool(DiffTool tool) : MergeTool

internal static MergeToolResult? Start(ResolvedTool resolvedTool, string currentFilePath, string newFilePath)
{
var arguments = resolvedTool.GetArguments(currentFilePath, newFilePath);
var arguments = resolvedTool.GetArguments(newFilePath, currentFilePath);
var startInfo = new ProcessStartInfo(resolvedTool.ExePath, arguments)
{
UseShellExecute = true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>$(LatestTargetFrameworks);netstandard2.0</TargetFrameworks>
<TargetFrameworks>$(LatestTargetFrameworks);net472;net48</TargetFrameworks>
<Description>Enables verification of objects using inline snapshots</Description>
<DefineConstants Condition="'$(IsOfficialBuild)' != 'true'">$(DefineConstants);DEBUG_TaskDialogPrompt</DefineConstants>

<Version>2.0.2</Version>
<Version>3.0.0</Version>
<NoWarn>$(NoWarn);NU5100</NoWarn>

<!-- Buggy because of netstandard2.0 -->
Expand All @@ -27,8 +27,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="DiffEngine" Version="13.0.2" />
<PackageReference Include="DiffPlex" Version="1.7.1" />
<PackageReference Include="DiffEngine" Version="15.1.0" />
<PackageReference Include="DiffPlex" Version="1.7.2" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.8.0" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ protected override void WriteValue(HumanReadableTextWriter writer, Guid value, H

private static string GetScrubbedValue(int index)
{
#if NETSTANDARD2_0
#if NETSTANDARD2_0 || NET472 || NET48
var data = new byte[16];
MemoryMarshal.Write(data.AsSpan(12), ref index);
data.AsSpan(12).Reverse();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ internal sealed partial record ProcessInfo

private static ProcessInfo? GetContextProcessImpl()
{
#if NETSTANDARD2_0
#if NETSTANDARD2_0 || NET472 || NET48
if (Environment.OSVersion.Platform == PlatformID.Win32NT)
#else
if (OperatingSystem.IsWindows())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static bool IsSupported()

static bool IsWindowsVistaOrAbove()
{
#if NETSTANDARD2_0
#if NETSTANDARD2_0 || NET472 || NET48
return Environment.OSVersion.Platform == PlatformID.Win32NT && Environment.OSVersion.Version.Major >= 6;
#else
return OperatingSystem.IsWindowsVersionAtLeast(6);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>$(LatestTargetFrameworksWindows)</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOsPlatform('Windows'))">$(TargetFrameworks);net472</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOsPlatform('Windows'))">$(TargetFrameworks);net472;net48</TargetFrameworks>
<UseWPF>true</UseWPF>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ public static void Initialize()
}
"""");

#if NET472
#if NET472 || NET48
CreateTextFile("ModuleInitializerAttribute.cs", $$""""
namespace System.Runtime.CompilerServices
{
Expand Down Expand Up @@ -467,6 +467,8 @@ static string GetTargetFramework()
{
#if NET472
return "net472";
#elif NET48
return "net48";
#elif NET6_0
return "net6.0";
#elif NET7_0
Expand All @@ -484,7 +486,7 @@ static string GetPackageReferences()
var items = doc.Root.Descendants("PackageReference");

var packages = items.Where(item => item.Parent.Attribute("Condition") is null).ToList();
#if NET472
#if NET472 || NET48
packages.AddRange(items.Where(item => item.Parent.Attribute("Condition") is not null));
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFrameworks>$(LatestTargetFrameworks)</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOsPlatform('Windows'))">$(TargetFrameworks);net472</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOsPlatform('Windows'))">$(TargetFrameworks);net472;net48</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Meziantou.Framework.InlineSnapshotTesting.Serialization;
using Xunit;

#if NET472
#if NET472 || NET48
using System.Net.Http;
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ static string GetTargetFramework()
{
#if NET472
return "net472";
#elif NET48
return "net48";
#elif NET6_0
return "net6.0";
#elif NET7_0
Expand Down

0 comments on commit 987c5a9

Please sign in to comment.