|
|
|
<Project>
|
|
|
|
<!-- Common to all Lidarr Projects -->
|
|
|
|
<PropertyGroup>
|
|
|
|
<AnalysisLevel>6.0-all</AnalysisLevel>
|
|
|
|
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
|
|
|
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
|
|
|
|
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
|
|
|
|
|
|
|
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
|
|
|
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
|
|
|
|
<RuntimeIdentifiers>win-x64;win-x86;osx-x64;osx-arm64;linux-x64;linux-musl-x64;linux-arm;linux-musl-arm;linux-arm64;linux-musl-arm64</RuntimeIdentifiers>
|
|
|
|
|
|
|
|
<LidarrRootDir>$(MSBuildThisFileDirectory)..\</LidarrRootDir>
|
|
|
|
|
|
|
|
<!-- Specifies the type of output -->
|
|
|
|
<LidarrOutputType>Library</LidarrOutputType>
|
|
|
|
<LidarrOutputType Condition="$(MSBuildProjectName.Contains('.Test'))">Test</LidarrOutputType>
|
|
|
|
<LidarrOutputType Condition="'$(MSBuildProjectName)'=='ServiceInstall'">Exe</LidarrOutputType>
|
|
|
|
<LidarrOutputType Condition="'$(MSBuildProjectName)'=='ServiceUninstall'">Exe</LidarrOutputType>
|
|
|
|
<LidarrOutputType Condition="'$(MSBuildProjectName)'=='Lidarr'">Exe</LidarrOutputType>
|
|
|
|
<LidarrOutputType Condition="'$(MSBuildProjectName)'=='Lidarr.Console'">Exe</LidarrOutputType>
|
|
|
|
<LidarrOutputType Condition="'$(MSBuildProjectName)'=='Lidarr.Update'">Update</LidarrOutputType>
|
|
|
|
|
|
|
|
<!-- Specifies whether it's one of our own libraries -->
|
|
|
|
<LidarrProject>false</LidarrProject>
|
|
|
|
<LidarrProject Condition="$(MSBuildProjectName.StartsWith('Lidarr'))">true</LidarrProject>
|
|
|
|
<LidarrProject Condition="$(MSBuildProjectName.StartsWith('ServiceInstall'))">true</LidarrProject>
|
|
|
|
<LidarrProject Condition="$(MSBuildProjectName.StartsWith('ServiceUninstall'))">true</LidarrProject>
|
|
|
|
|
|
|
|
<!-- A test project gets the test sdk packages automatically added -->
|
|
|
|
<TestProject>false</TestProject>
|
|
|
|
<TestProject Condition="$(MSBuildProjectName.EndsWith('.Test'))">true</TestProject>
|
|
|
|
|
|
|
|
<!-- XML documentation comments are needed to enforce rule IDE0005 on build -->
|
|
|
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
|
|
|
<!--
|
|
|
|
CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member'
|
|
|
|
-->
|
|
|
|
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<PropertyGroup>
|
|
|
|
<Configuration Condition="'$(Configuration)'==''">Release</Configuration>
|
|
|
|
<!-- Centralize intermediate and default outputs -->
|
|
|
|
<BaseIntermediateOutputPath>$(LidarrRootDir)_temp\obj\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
|
|
|
|
<IntermediateOutputPath>$(LidarrRootDir)_temp\obj\$(MSBuildProjectName)\$(Configuration)\</IntermediateOutputPath>
|
|
|
|
<OutputPath>$(LidarrRootDir)_temp\bin\$(Configuration)\$(MSBuildProjectName)\</OutputPath>
|
|
|
|
|
|
|
|
<!-- Output to _output and _tests respectively -->
|
|
|
|
<OutputPath Condition="'$(LidarrProject)'=='true'">$(LidarrRootDir)_output\</OutputPath>
|
|
|
|
<OutputPath Condition="'$(LidarrOutputType)'=='Test'">$(LidarrRootDir)_tests\</OutputPath>
|
|
|
|
<OutputPath Condition="'$(LidarrOutputType)'=='Update'">$(LidarrRootDir)_output\Lidarr.Update\</OutputPath>
|
|
|
|
|
|
|
|
<!-- Paths relative to project file for better readability -->
|
|
|
|
<EnableBaseIntermediateOutputPathMismatchWarning>false</EnableBaseIntermediateOutputPathMismatchWarning>
|
|
|
|
<BaseIntermediateOutputPath>$([MSBuild]::MakeRelative('$(MSBuildProjectDirectory)', '$(BaseIntermediateOutputPath)'))</BaseIntermediateOutputPath>
|
|
|
|
<IntermediateOutputPath>$([MSBuild]::MakeRelative('$(MSBuildProjectDirectory)', '$(IntermediateOutputPath)'))</IntermediateOutputPath>
|
|
|
|
<OutputPath>$([MSBuild]::MakeRelative('$(MSBuildProjectDirectory)', '$(OutputPath)'))</OutputPath>
|
|
|
|
|
|
|
|
<DebugSymbols>true</DebugSymbols>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<!-- Test projects need bindingRedirects -->
|
|
|
|
<PropertyGroup Condition="'$(LidarrOutputType)'=='Test'">
|
|
|
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
|
|
|
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
|
|
|
|
<SelfContained>false</SelfContained>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<!-- Set the Product and Version info for our own projects -->
|
|
|
|
<PropertyGroup Condition="'$(LidarrProject)'=='true'">
|
|
|
|
<Product>Lidarr</Product>
|
|
|
|
<Company>lidarr.audio</Company>
|
|
|
|
<Copyright>Copyright 2017-$([System.DateTime]::Now.ToString('yyyy')) lidarr.audio (GNU General Public v3)</Copyright>
|
|
|
|
|
|
|
|
<!-- Should be replaced by CI -->
|
|
|
|
<AssemblyVersion>10.0.0.*</AssemblyVersion>
|
|
|
|
<AssemblyConfiguration>$(Configuration)-dev</AssemblyConfiguration>
|
|
|
|
<NeutralLanguage>en</NeutralLanguage>
|
|
|
|
|
|
|
|
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
|
|
|
|
<GenerateAssemblyInformationalVersionAttribute>false</GenerateAssemblyInformationalVersionAttribute>
|
|
|
|
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
|
|
|
|
|
|
|
|
<Deterministic Condition="$(AssemblyVersion.EndsWith('*'))">False</Deterministic>
|
|
|
|
|
|
|
|
<PathMap>$(MSBuildProjectDirectory)=./$(MSBuildProjectName)/</PathMap>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<!-- Set the AssemblyConfiguration attribute for projects -->
|
|
|
|
<ItemGroup Condition="'$(LidarrProject)'=='true'">
|
|
|
|
<AssemblyAttribute Include="System.Reflection.AssemblyConfigurationAttribute">
|
|
|
|
<_Parameter1>$(AssemblyConfiguration)</_Parameter1>
|
|
|
|
</AssemblyAttribute>
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
<PropertyGroup>
|
|
|
|
<!-- For now keep the NzbDrone namespace -->
|
|
|
|
<RootNamespace Condition="'$(LidarrProject)'=='true'">$(MSBuildProjectName.Replace('Lidarr','NzbDrone'))</RootNamespace>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<!-- Standard testing packages -->
|
|
|
|
<ItemGroup Condition="'$(TestProject)'=='true'">
|
|
|
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
|
|
|
|
<PackageReference Include="NUnit" Version="3.14.0" />
|
|
|
|
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
|
|
|
|
<PackageReference Include="NunitXml.TestLogger" Version="3.0.131" />
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
<ItemGroup Condition="'$(TestProject)'=='true' and '$(TargetFramework)'=='net6.0'">
|
|
|
|
<PackageReference Include="coverlet.collector" Version="3.0.4-preview.27.ge7cb7c3b40" />
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
<PropertyGroup Condition="'$(LidarrProject)'=='true' and '$(EnableAnalyzers)'=='false'">
|
|
|
|
<!-- FXCop Built into Net5 SDK now as NETAnalyzers, Enabled by default on net5 projects -->
|
|
|
|
<EnableNETAnalyzers>false</EnableNETAnalyzers>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<!-- Set up stylecop -->
|
|
|
|
<ItemGroup Condition="'$(LidarrProject)'=='true' and '$(EnableAnalyzers)'!='false'">
|
|
|
|
<!-- StyleCop analysis -->
|
|
|
|
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
|
|
|
|
<PrivateAssets>all</PrivateAssets>
|
|
|
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
|
|
|
</PackageReference>
|
|
|
|
<AdditionalFiles Include="$(SolutionDir)stylecop.json" />
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
Set runtime identifier to local system type if not specified
|
|
|
|
-->
|
|
|
|
<Choose>
|
|
|
|
<When Condition="'$(OS)' == 'Windows_NT'">
|
|
|
|
<PropertyGroup>
|
|
|
|
<IsWindows>true</IsWindows>
|
|
|
|
</PropertyGroup>
|
|
|
|
</When>
|
|
|
|
<When Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true'">
|
|
|
|
<PropertyGroup>
|
|
|
|
<IsOSX>true</IsOSX>
|
|
|
|
</PropertyGroup>
|
|
|
|
</When>
|
|
|
|
<Otherwise>
|
|
|
|
<PropertyGroup>
|
|
|
|
<IsLinux>true</IsLinux>
|
|
|
|
</PropertyGroup>
|
|
|
|
</Otherwise>
|
|
|
|
</Choose>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
Set architecture to RuntimeInformation.ProcessArchitecture if not specified -->
|
|
|
|
<Choose>
|
|
|
|
<When Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture)' == 'X64'">
|
|
|
|
<PropertyGroup>
|
|
|
|
<Architecture>x64</Architecture>
|
|
|
|
</PropertyGroup>
|
|
|
|
</When>
|
|
|
|
<When Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture)' == 'X86'">
|
|
|
|
<PropertyGroup>
|
|
|
|
<Architecture>x86</Architecture>
|
|
|
|
</PropertyGroup>
|
|
|
|
</When>
|
|
|
|
<When Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture)' == 'Arm64'">
|
|
|
|
<PropertyGroup>
|
|
|
|
<Architecture>arm64</Architecture>
|
|
|
|
</PropertyGroup>
|
|
|
|
</When>
|
|
|
|
<When Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture)' == 'Arm'">
|
|
|
|
<PropertyGroup>
|
|
|
|
<Architecture>arm</Architecture>
|
|
|
|
</PropertyGroup>
|
|
|
|
</When>
|
|
|
|
<Otherwise>
|
|
|
|
<PropertyGroup>
|
|
|
|
<Architecture></Architecture>
|
|
|
|
</PropertyGroup>
|
|
|
|
</Otherwise>
|
|
|
|
</Choose>
|
|
|
|
|
|
|
|
<PropertyGroup Condition="'$(IsWindows)' == 'true' and
|
|
|
|
'$(RuntimeIdentifier)' == ''">
|
|
|
|
<_UsingDefaultRuntimeIdentifier>true</_UsingDefaultRuntimeIdentifier>
|
|
|
|
<RuntimeIdentifier>win-$(Architecture)</RuntimeIdentifier>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<PropertyGroup Condition="'$(IsLinux)' == 'true' and
|
|
|
|
'$(RuntimeIdentifier)' == ''">
|
|
|
|
<_UsingDefaultRuntimeIdentifier>true</_UsingDefaultRuntimeIdentifier>
|
|
|
|
<RuntimeIdentifier>linux-$(Architecture)</RuntimeIdentifier>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<PropertyGroup Condition="'$(IsOSX)' == 'true' and
|
|
|
|
'$(RuntimeIdentifier)' == ''">
|
|
|
|
<_UsingDefaultRuntimeIdentifier>true</_UsingDefaultRuntimeIdentifier>
|
|
|
|
<RuntimeIdentifier>osx-x64</RuntimeIdentifier>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
</Project>
|