<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <MinimumVisualStudioVersion>17.0</MinimumVisualStudioVersion>
    <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
    <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
    <LangVersion>latest</LangVersion>
    <Nullable>enable</Nullable>
  </PropertyGroup>

  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />

  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectTypeGuids>{82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
    <ProjectGuid>{B2C3D4E5-F6A7-4B5C-9D8E-0F1A2B3C4D5E}</ProjectGuid>
    <OutputType>Library</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>RoslynBridge</RootNamespace>
    <AssemblyName>RoslynBridge</AssemblyName>
    <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
    <GeneratePkgDefFile>true</GeneratePkgDefFile>
    <UseCodebase>true</UseCodebase>
    <IncludeAssemblyInVSIXContainer>true</IncludeAssemblyInVSIXContainer>
    <IncludeDebugSymbolsInVSIXContainer>false</IncludeDebugSymbolsInVSIXContainer>
    <IncludeDebugSymbolsInLocalVSIXDeployment>false</IncludeDebugSymbolsInLocalVSIXDeployment>
    <CopyBuildOutputToOutputDirectory>true</CopyBuildOutputToOutputDirectory>
    <CopyOutputSymbolsToOutputDirectory>true</CopyOutputSymbolsToOutputDirectory>
    <StartAction>Program</StartAction>
    <StartProgram Condition="'$(DevEnvDir)' != ''">$(DevEnvDir)devenv.exe</StartProgram>
    <StartArguments>/rootsuffix Exp</StartArguments>
  </PropertyGroup>

  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>

  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>

  <ItemGroup>
    <!-- Main Package -->
    <Compile Include="RoslynBridgePackage.cs" />

    <!-- Constants -->
    <Compile Include="Constants\ServerConstants.cs" />

    <!-- Models -->
    <Compile Include="Models\CallHierarchyModels.cs" />
    <Compile Include="Models\DiagnosticModels.cs" />
    <Compile Include="Models\DocumentModels.cs" />
    <Compile Include="Models\LocationModels.cs" />
    <Compile Include="Models\ProjectModels.cs" />
    <Compile Include="Models\RefactoringModels.cs" />
    <Compile Include="Models\RequestModels.cs" />
    <Compile Include="Models\SymbolModels.cs" />

    <!-- Server -->
    <Compile Include="Server\BridgeServer.cs" />

    <!-- Services -->
    <Compile Include="Services\BaseRoslynService.cs" />
    <Compile Include="Services\ConfigurationService.cs" />
    <Compile Include="Services\DiagnosticsService.cs" />
    <Compile Include="Services\DocumentQueryService.cs" />
    <Compile Include="Services\IRoslynQueryService.cs" />
    <Compile Include="Services\IWorkspaceProvider.cs" />
    <Compile Include="Services\ProjectOperationsService.cs" />
    <Compile Include="Services\RefactoringService.cs" />
    <Compile Include="Services\RegistrationService.cs" />
    <Compile Include="Services\RoslynQueryService.cs" />
    <Compile Include="Services\SymbolQueryService.cs" />
    <Compile Include="Services\WorkspaceProvider.cs" />

    <None Include="source.extension.vsixmanifest">
      <SubType>Designer</SubType>
    </None>
    <Content Include="appsettings.json">
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
      <IncludeInVSIX>true</IncludeInVSIX>
    </Content>
    <Content Include="README.txt">
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
      <IncludeInVSIX>true</IncludeInVSIX>
    </Content>
  </ItemGroup>

  <ItemGroup>
    <Reference Include="System" />
    <Reference Include="System.Data" />
    <Reference Include="System.Net.Http" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.VisualStudio.SDK" Version="17.8.37221" />
    <PackageReference Include="Microsoft.VSSDK.BuildTools" Version="17.8.2369">
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
      <PrivateAssets>all</PrivateAssets>
    </PackageReference>

    <!-- Roslyn packages -->
    <PackageReference Include="Microsoft.CodeAnalysis" Version="4.8.0" />
    <PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.8.0" />
    <PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.8.0" />
    <PackageReference Include="Microsoft.CodeAnalysis.Workspaces.Common" Version="4.8.0" />
    <PackageReference Include="Microsoft.VisualStudio.LanguageServices" Version="4.8.0" />

    <!-- Additional VS SDK packages -->
    <PackageReference Include="Microsoft.VisualStudio.Shell.15.0" Version="17.8.37221" />
    <PackageReference Include="Microsoft.VisualStudio.Shell.Framework" Version="17.8.37221" />
    <PackageReference Include="Microsoft.VisualStudio.Threading" Version="17.8.14" />

    <!-- HTTP server -->
    <PackageReference Include="System.Text.Json" Version="8.0.5" />
  </ItemGroup>

  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  <Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != ''" />

  <Target Name="BeforeBuild">
  </Target>

  <Target Name="AfterBuild">
  </Target>

</Project>
