mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Initial work on new netstandard symlink
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
using System.Text.Json;
|
||||
using NuGet.Versioning;
|
||||
using Velopack.Json;
|
||||
using Velopack.Packaging;
|
||||
using Velopack.Sources;
|
||||
using JsonPropertyNameAttribute = System.Text.Json.Serialization.JsonPropertyNameAttribute;
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ using Velopack.Windows;
|
||||
|
||||
namespace Velopack.Tests;
|
||||
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class ShortcutTests
|
||||
{
|
||||
private readonly ITestOutputHelper _output;
|
||||
|
||||
@@ -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));
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -48,7 +48,6 @@ public class UtilityTests
|
||||
}
|
||||
|
||||
[SkippableFact]
|
||||
[SupportedOSPlatform("windows")]
|
||||
public void SetAppIdOnShortcutTest()
|
||||
{
|
||||
Skip.IfNot(VelopackRuntimeInfo.IsWindows);
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user