naps2/NAPS2.Lib/NAPS2.Lib.csproj

77 lines
3.3 KiB
XML
Raw Normal View History

2022-08-21 03:50:38 +03:00
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6;net462</TargetFrameworks>
<Nullable>enable</Nullable>
<GenerateResourceUsePreserializedResources>true</GenerateResourceUsePreserializedResources>
<RootNamespace>NAPS2</RootNamespace>
<Title>NAPS2 (Not Another PDF Scanner 2)</Title>
<Product>NAPS2 (Not Another PDF Scanner 2)</Product>
<Copyright>Copyright 2009, 2012-2020 NAPS2 Contributors; Icons from http://www.fatcow.com/free-icons</Copyright>
</PropertyGroup>
<Import Project="..\NAPS2.Setup\CommonTargets.targets" />
<Import Project="..\NAPS2.Setup\LibUsers.targets" />
<ItemGroup>
<ProjectReference Include="..\NAPS2.Sdk\NAPS2.Sdk.csproj" />
<PackageReference Include="CommandLineParser" Version="2.9.1" />
<PackageReference Include="MimeKit" Version="1.22.0" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
<PackageReference Include="Ninject" Version="3.3.6" />
<PackageReference Include="NLog" Version="4.5.8" />
<PackageReference Include="Eto.Forms" Version="2.7.1" />
2022-08-21 03:50:38 +03:00
</ItemGroup>
<ItemGroup>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>NAPS2.Lib.Tests</_Parameter1>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>NAPS2.Lib.WinForms</_Parameter1>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>NAPS2.Lib.Mac</_Parameter1>
</AssemblyAttribute>
2022-08-21 03:50:38 +03:00
</ItemGroup>
<ItemGroup Condition="'$(Configuration)' == 'Debug'">
<EmbeddedResource Remove="Lang\Resources\SettingsResources.*.resx" Condition="'$(Configuration)' == 'Debug'" />
<EmbeddedResource Update="Lang\Resources\SettingsResources.*.resx">
<DependentUpon>SettingsResources.resx</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Remove="Lang\Resources\MiscResources.*.resx" Condition="'$(Configuration)' == 'Debug'" />
<EmbeddedResource Update="Lang\Resources\MiscResources.*.resx">
<DependentUpon>MiscResources.resx</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Update="**/*.resx">
<Generator>ResXFileCodeGenerator</Generator>
</EmbeddedResource>
<EmbeddedResource Update="Lang\ConsoleResources\ConsoleResources.resx">
<Generator>ResXFileCodeGenerator</Generator>
</EmbeddedResource>
</ItemGroup>
<!--
This is a weird pattern and there's probably a better way to do it, but in order to have optional build files:
1. Have two resource files with similar names (so they generate the same class name, "ClientCreds_")
2. Have one resource file reference the optional build files, the other a placeholder build file
3. Conditionally exclude them from the build based on whether the optional files exist
-->
<ItemGroup Condition="Exists('google.credentials.json') and Exists('microsoft.credentials.json')">
<EmbeddedResource Remove="ClientCreds-.resx" />
<Compile Remove="ClientCreds-.Designer.cs" />
</ItemGroup>
<ItemGroup Condition="!Exists('google.credentials.json') or !Exists('microsoft.credentials.json')">
<EmbeddedResource Remove="ClientCreds_.resx" />
<Compile Remove="ClientCreds_.Designer.cs" />
</ItemGroup>
</Project>