<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <Title>Microsoft ASP.NET SignalR Core Components</Title>
    <Description>Async signaling library for .NET to help build real-time, multi-user interactive web applications.</Description>
    <PackageTags>Microsoft AspNet SignalR AspNetSignalR Core</PackageTags>
    <DefineConstants>$(DefineConstants);PERFCOUNTERS;SERVER</DefineConstants>
    <RootNamespace>Microsoft.AspNet.SignalR</RootNamespace>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>

    <!-- For the loc stuff to work right now, this needs to do the outer build/inner build phases even though it's only one TFM, so leave this as the plural TargetFrameworks -->
    <TargetFrameworks>net45</TargetFrameworks>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.Owin.Security" Version="$(MicrosoftOwinSecurityPackageVersion)" />
    <PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonPackageVersion)" />
  </ItemGroup>
  <ItemGroup>
    <Reference Include="Microsoft.CSharp" />
    <Reference Include="System.Security" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="..\Microsoft.AspNet.SignalR.Client\Infrastructure\StreamExtensions.cs">
      <Link>Infrastructure\StreamExtensions.cs</Link>
    </Compile>
  </ItemGroup>

  <ItemGroup>
    <EmbeddedResource Include="$(ArtifactsDir)hubs.js" Condition="'$(OS)' == 'Windows_NT'">
      <Link>Scripts\hubs.js</Link>
    </EmbeddedResource>
    <EmbeddedResource Include="Scripts\hubs.js" Condition="'$(OS)' != 'Windows_NT'" />
  </ItemGroup>

  <Target Name="UpdateHubsJsVersion" BeforeTargets="BeforeBuild">
    <Exec Command="powershell -NoProfile -ExecutionPolicy Bypass .\updateHubsJsVersion.ps1 $(ArtifactsDir) -version $(PackageVersion)" 
          WorkingDirectory="$(ProjectDir)"
          Condition="'$(OS)' == 'Windows_NT'" />
  </Target>

</Project>
