<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
  <Import Project="..\..\PowerShell.Common.props" />
  <PropertyGroup>
    <Description>PowerShell's System.Management.Automation project</Description>
    <NoWarn>$(NoWarn);CS1570;CS1734;CA1416</NoWarn>
    <AssemblyName>System.Management.Automation</AssemblyName>
  </PropertyGroup>

  <ItemGroup Condition=" '$(IsWindows)' == 'true' ">
    <ProjectReference Include="..\Microsoft.PowerShell.CoreCLR.Eventing\Microsoft.PowerShell.CoreCLR.Eventing.csproj" />
  </ItemGroup>

  <ItemGroup>
    <!-- the following package(s) are from https://github.com/JamesNK/Newtonsoft.Json -->
    <PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
    <!-- the Application Insights package -->
    <PackageReference Include="Microsoft.ApplicationInsights" Version="2.17.0" />
    <!-- the following package(s) are from https://github.com/dotnet/corefx -->
    <PackageReference Include="Microsoft.Win32.Registry.AccessControl" Version="6.0.0-preview.4.21253.7" />
    <PackageReference Include="System.Configuration.ConfigurationManager" Version="6.0.0-preview.4.21253.7" />
    <PackageReference Include="System.DirectoryServices" Version="6.0.0-preview.4.21253.7" />
    <PackageReference Include="System.IO.FileSystem.AccessControl" Version="6.0.0-preview.4.21253.7" />
    <PackageReference Include="System.Management" Version="6.0.0-preview.4.21253.7" />
    <PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0-preview.4.21253.7" />
    <PackageReference Include="System.Security.AccessControl" Version="6.0.0-preview.4.21253.7" />
    <PackageReference Include="System.Security.Cryptography.Pkcs" Version="6.0.0-preview.4.21253.7" />
    <PackageReference Include="System.Security.Permissions" Version="6.0.0-preview.4.21253.7" />
    <PackageReference Include="System.Text.Encoding.CodePages" Version="6.0.0-preview.4.21253.7" />
    <!-- the following package(s) are from the powershell org -->
    <PackageReference Include="Microsoft.Management.Infrastructure" Version="2.0.0" />
    <PackageReference Include="Microsoft.PowerShell.Native" Version="7.2.0-preview.2" />
  </ItemGroup>

  <PropertyGroup>
    <DefineConstants>$(DefineConstants);CORECLR</DefineConstants>
  </PropertyGroup>

  <ItemGroup>
    <Compile Remove="cimSupport\cmdletization\xml\cmdlets-over-objects.objectModel.autogen.cs" />
    <Compile Remove="cimSupport\cmdletization\xml\cmdlets-over-objects.xmlSerializer.autogen.cs" />
    <Compile Remove="engine\TransactedString.cs" />
    <Compile Remove="engine\TransactionManager.cs" />
    <Compile Remove="engine\hostifaces\NativeCultureResolver.cs" />
    <Compile Remove="engine\hostifaces\RunspaceInvoke.cs" />
    <Compile Remove="engine\remoting\commands\ResumeJob.cs" />
    <Compile Remove="engine\remoting\commands\SuspendJob.cs" />
    <Compile Remove="logging\eventlog\EventLogLogProvider.cs" />
    <Compile Remove="namespaces\SafeTransactionHandle.cs" />
    <Compile Remove="namespaces\SafeRegistryHandle.cs" />
    <Compile Remove="namespaces\TransactedRegistry.cs" />
    <Compile Remove="namespaces\TransactedRegistryKey.cs" />
    <Compile Remove="namespaces\TransactedRegistrySecurity.cs" />
    <Compile Remove="utils\BackgroundDispatcher.cs" />
    <Compile Remove="utils\perfCounters\CounterSetInstanceBase.cs" />
    <Compile Remove="utils\perfCounters\CounterSetRegistrarBase.cs" />
    <Compile Remove="utils\perfCounters\PSPerfCountersMgr.cs" />
    <Compile Remove="gen\CoreMshSnapinResources.cs" />
    <Compile Remove="gen\ErrorPackageRemoting.cs" />
    <Compile Remove="gen\EventResource.cs" />

    <EmbeddedResource Remove="resources\CoreMshSnapinResources.resx" />
    <EmbeddedResource Remove="resources\ErrorPackageRemoting.resx" />
  </ItemGroup>

  <ItemGroup Condition=" '$(IsWindows)' != 'true' ">
    <Compile Remove="engine\ExtraAdapter.cs" />
    <Compile Remove="engine\ManagementObjectAdapter.cs" />
    <Compile Remove="engine\ComInterop\**\*.cs" />
    <Compile Remove="engine\remoting\commands\ConnectPSSession.cs" />
    <Compile Remove="engine\remoting\commands\CustomShellCommands.cs" />
    <Compile Remove="engine\remoting\commands\DisconnectPSSession.cs" />
    <Compile Remove="engine\remoting\commands\ReceivePSSession.cs" />
    <Compile Remove="engine\remoting\commands\TestPSSessionConfigurationFile.cs" />
  </ItemGroup>

</Project>
