Files

29 lines
1.1 KiB
XML

<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<OutputType>library</OutputType>
<IsPackable>true</IsPackable>
<RootNamespace>TelegramBot</RootNamespace>
<AssemblyName>TelegramBot</AssemblyName>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>disable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Telegram.Bot" Version="22.4.4" />
<ProjectReference Include="..\..\Shared\Shared.csproj" />
</ItemGroup>
<!-- Кладёт Telegram.Bot.dll в references/ для рантайм-компиляции Roslyn на сервере -->
<Target Name="CopyTelegramBotToModReferences" AfterTargets="ResolveReferences">
<ItemGroup>
<_TelegramBotRef Include="@(ReferencePath)" Condition="'%(Filename)' == 'Telegram.Bot'" />
</ItemGroup>
<MakeDir Directories="$(MSBuildProjectDirectory)\references" />
<Copy SourceFiles="@(_TelegramBotRef)" DestinationFolder="$(MSBuildProjectDirectory)\references"
SkipUnchangedFiles="true" Condition="@(_TelegramBotRef->Count()) != 0" />
</Target>
</Project>