Initial work on new netstandard symlink

This commit is contained in:
Caelan
2024-09-21 11:27:08 -06:00
parent 89955cad94
commit cb9447821d
12 changed files with 148 additions and 101 deletions

View File

@@ -5,7 +5,6 @@ using Velopack.Windows;
namespace Velopack.Tests;
[SupportedOSPlatform("windows")]
public class ShortcutTests
{
private readonly ITestOutputHelper _output;

View File

@@ -74,8 +74,8 @@ public class SymbolicLinkTests
SymbolicLink.Create(symFile, tmpFile, true);
Assert.True(File.Exists(symFile), "Symfile point exists now.");
Assert.True(SymbolicLink.Exists(symFile), "Junction point exists now.");
Assert.True(File.Exists(symFile), "Symlink should exist now.");
Assert.True(SymbolicLink.Exists(symFile), "Symlink should exist now.");
Assert.Equal(tmpFile, SymbolicLink.GetTarget(symFile));

View File

@@ -1,7 +1,7 @@
#pragma warning disable CS0618 // Type or member is obsolete
#pragma warning disable CS0612 // Type or member is obsolete
using System.Text;
using Velopack.Json;
using Velopack.Packaging;
using Velopack.Sources;
namespace Velopack.Tests.TestHelpers;

View File

@@ -1,7 +1,7 @@
using System.Text;
using NuGet.Versioning;
using Velopack.Compression;
using Velopack.Json;
using Velopack.Packaging;
using Velopack.Locators;
using Velopack.Sources;
using Velopack.Tests.TestHelpers;

View File

@@ -48,7 +48,6 @@ public class UtilityTests
}
[SkippableFact]
[SupportedOSPlatform("windows")]
public void SetAppIdOnShortcutTest()
{
Skip.IfNot(VelopackRuntimeInfo.IsWindows);

View File

@@ -1,15 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<NoWarn>$(NoWarn);CA1416</NoWarn>
</PropertyGroup>
<Choose>
<When Condition="$([MSBuild]::IsOSPlatform('Windows'))">
<PropertyGroup>
<TargetFrameworks>net8.0;net48</TargetFrameworks>
<TargetFrameworks>net6.0;net8.0;net48</TargetFrameworks>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
</PropertyGroup>
</Otherwise>
</Choose>
@@ -20,7 +24,6 @@
<ItemGroup>
<PackageReference Include="System.IO.Packaging" Version="8.0.0" />
<PackageReference Include="System.Text.Json" Version="8.0.4" />
</ItemGroup>
<ItemGroup Condition=" $(TargetFramework.StartsWith('net4')) ">
@@ -30,8 +33,17 @@
<Reference Include="System.IO.Compression.FileSystem" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\lib-csharp\Velopack.csproj" />
</ItemGroup>
<Choose>
<When Condition="'$(TargetFramework)' == 'net6.0'">
<ItemGroup>
<ProjectReference Include="..\..\src\lib-csharp\Velopack.csproj" SetTargetFramework="TargetFramework=netstandard2.0" />
</ItemGroup>
</When>
<Otherwise>
<ItemGroup>
<ProjectReference Include="..\..\src\lib-csharp\Velopack.csproj" />
</ItemGroup>
</Otherwise>
</Choose>
</Project>