Skip to content

Commit

Permalink
Moving to .NET Standard
Browse files Browse the repository at this point in the history
  • Loading branch information
pudding committed Jan 28, 2024
1 parent acd9f50 commit 7303d5c
Show file tree
Hide file tree
Showing 280 changed files with 3,117 additions and 4,060 deletions.
Binary file added .nuget/nuget.exe
Binary file not shown.
71 changes: 22 additions & 49 deletions FoxTunes.Config/FoxTunes.Config.csproj
Original file line number Diff line number Diff line change
@@ -1,50 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{9660A7C2-D1F7-4D17-8087-5B82AFEAA6D7}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>FoxTunes</RootNamespace>
<AssemblyName>FoxTunes.Config</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\distribution\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<OutputPath>..\distribution\Release\</OutputPath>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
<ItemGroup>
<Compile Include="Configuration.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FoxTunes.Core\FoxTunes.Core.csproj">
<Project>{62cd8f70-8415-4c15-b672-cb18475abd7e}</Project>
<Name>FoxTunes.Core</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net40;net461</TargetFrameworks>
<AssemblyName>FoxTunes.Config</AssemblyName>
<OutputPath>..\distribution\</OutputPath>
</PropertyGroup>

<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\FoxTunes.Core\FoxTunes.Core.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Bcl.Async" Version="1.0.168" Condition="'$(TargetFramework)' == 'net40'" />
</ItemGroup>

<Import Project="$(UserProfile)\.nuget\packages\Microsoft.Bcl.Build\1.0.14\tools\Microsoft.Bcl.Build.targets" Condition="'$(TargetFramework)' == 'net40'" />

</Project>
36 changes: 0 additions & 36 deletions FoxTunes.Config/Properties/AssemblyInfo.cs

This file was deleted.

15 changes: 15 additions & 0 deletions FoxTunes.Config/app.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.6.8.0" newVersion="2.6.8.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.6.8.0" newVersion="2.6.8.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
6 changes: 6 additions & 0 deletions FoxTunes.Config/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Bcl" version="1.1.8" targetFramework="net40" />
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net40" />
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net40" />
</packages>
21 changes: 17 additions & 4 deletions FoxTunes.Core.Tests/App.config
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<add key="ConnectionString" value="Data Source=localhost;Integrated Security=true;Initial Catalog=FoxTunes"/>
<add key="ConnectionString" value="Data Source=localhost;Integrated Security=true;Initial Catalog=FoxTunes" />
</appSettings>
<runtime>
<loadFromRemoteSources enabled="true"/>
<loadFromRemoteSources enabled="true" />
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.6.8.0" newVersion="2.6.8.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.6.8.0" newVersion="2.6.8.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
</startup>
</configuration>
8 changes: 8 additions & 0 deletions FoxTunes.Core.Tests/BackgroundTaskTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ public class BackgroundTaskTests : TestBase
[Test]
public void BackgroundTaskRespectsConcurrency()
{
#if NET40
var tasks = Enumerable.Range(0, 1024).Select(index => TaskEx.Run(async () =>
#else
var tasks = Enumerable.Range(0, 1024).Select(index => Task.Run(async () =>
#endif
{
using (var task = new Task001())
{
Expand All @@ -35,7 +39,11 @@ public Task001() : base(ID)
protected override Task OnRun()
{
Counter++;
#if NET40
return TaskEx.FromResult(false);
#else
return Task.CompletedTask;
#endif
}
}
}
Expand Down
139 changes: 44 additions & 95 deletions FoxTunes.Core.Tests/FoxTunes.Core.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,96 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{C5C3BD3A-E2B7-4258-B705-704C502AF38B}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>FoxTunes</RootNamespace>
<AssemblyName>FoxTunes.Core.Tests</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\distribution\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="FoxDb.Core">
<HintPath>..\lib\FoxDb.Core.dll</HintPath>
</Reference>
<Reference Include="FoxDb.Linq">
<HintPath>..\lib\FoxDb.Linq.dll</HintPath>
</Reference>
<Reference Include="nunit.framework, Version=3.9.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.9.0\lib\net45\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="Rhino.Mocks, Version=3.6.0.0, Culture=neutral, PublicKeyToken=0b3305902db7183f, processorArchitecture=MSIL">
<HintPath>..\packages\RhinoMocks.3.6.1\lib\net\Rhino.Mocks.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
</ItemGroup>
<ItemGroup>
<Compile Include="BackgroundTaskTests.cs" />
<Compile Include="DatabaseTests.cs" />
<Compile Include="FileAssociationTests.cs" />
<Compile Include="LibraryTests.cs" />
<Compile Include="MetaDataTests.cs" />
<Compile Include="PendingQueueTests.cs" />
<Compile Include="PlaylistTests.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ReentrantTaskTests.cs" />
<Compile Include="Tasks.cs" />
<Compile Include="TestBase.cs" />
<Compile Include="TestCore.cs" />
<Compile Include="TestInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="Audio\B.ogg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FoxTunes.Config\FoxTunes.Config.csproj">
<Project>{9660a7c2-d1f7-4d17-8087-5b82afeaa6d7}</Project>
<Name>FoxTunes.Config</Name>
</ProjectReference>
<ProjectReference Include="..\FoxTunes.Core\FoxTunes.Core.csproj">
<Project>{62cd8f70-8415-4c15-b672-cb18475abd7e}</Project>
<Name>FoxTunes.Core</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<ItemGroup>
<None Include="Audio\A.mp3">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Audio\C.mp3">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Audio\D.mp3">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net40;net461</TargetFrameworks>
<AssemblyName>FoxTunes.Core.Tests</AssemblyName>
<OutputPath>..\distribution\</OutputPath>
</PropertyGroup>

<ItemGroup>
<Reference Include="FoxDb.Core" Condition="'$(TargetFramework)' == 'net40'">
<HintPath>..\lib\net40\FoxDb.Core.dll</HintPath>
</Reference>
<Reference Include="FoxDb.Linq" Condition="'$(TargetFramework)' == 'net40'">
<HintPath>..\lib\net40\FoxDb.Linq.dll</HintPath>
</Reference>
</ItemGroup>

<ItemGroup>
<Reference Include="FoxDb.Core" Condition="'$(TargetFramework)' == 'net461'">
<HintPath>..\lib\FoxDb.Core.dll</HintPath>
</Reference>
<Reference Include="FoxDb.Linq" Condition="'$(TargetFramework)' == 'net461'">
<HintPath>..\lib\FoxDb.Linq.dll</HintPath>
</Reference>
</ItemGroup>

<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\FoxTunes.Core\FoxTunes.Core.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Bcl.Async" Version="1.0.168" Condition="'$(TargetFramework)' == 'net40'" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="NUnit" Version="3.9.0" />
</ItemGroup>

<Import Project="$(UserProfile)\.nuget\packages\Microsoft.Bcl.Build\1.0.14\tools\Microsoft.Bcl.Build.targets" Condition="'$(TargetFramework)' == 'net40'" />

</Project>
4 changes: 4 additions & 0 deletions FoxTunes.Core.Tests/PendingQueueTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ public async Task CanPendValues()
Interlocked.Increment(ref count);
};
Parallel.For(0, 100, this.ParallelOptions, index => queue.Enqueue(index));
#if NET40
await TaskEx.Delay(TimeSpan.FromSeconds(10));
#else
await Task.Delay(TimeSpan.FromSeconds(10));
#endif
Assert.AreEqual(1, count);
}
}
Expand Down
36 changes: 0 additions & 36 deletions FoxTunes.Core.Tests/Properties/AssemblyInfo.cs

This file was deleted.

Loading

0 comments on commit 7303d5c

Please sign in to comment.