<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), build.common.props))/build.common.props" />
  <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>
    <ProjectGuid>{94580219-CC8D-4FE5-A3BE-437B0B3481E1}</ProjectGuid>
    <OutputType>Library</OutputType>
    <ProjectName>winfsp.net</ProjectName>
    <RootNamespace>Fsp</RootNamespace>
    <AssemblyName>$(MyProductFileName)-msil</AssemblyName>
    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
    <FileAlignment>512</FileAlignment>
    <TargetFrameworkProfile />
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>$(SolutionDir)build\$(Configuration)\</OutputPath>
    <BaseIntermediateOutputPath>$(SolutionDir)build\$(ProjectName).build\</BaseIntermediateOutputPath>
    <IntermediateOutputPath>$(BaseIntermediateOutputPath)$(Configuration)\</IntermediateOutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
    <DocumentationFile>$(BaseIntermediateOutputPath)$(Configuration)\$(MyProductFileName)-msil.xml</DocumentationFile>
    <NoWarn>1591</NoWarn>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>$(SolutionDir)build\$(Configuration)\</OutputPath>
    <BaseIntermediateOutputPath>$(SolutionDir)build\$(ProjectName).build\</BaseIntermediateOutputPath>
    <IntermediateOutputPath>$(BaseIntermediateOutputPath)$(Configuration)\</IntermediateOutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
    <DocumentationFile>$(BaseIntermediateOutputPath)$(Configuration)\$(MyProductFileName)-msil.xml</DocumentationFile>
    <NoWarn>1591</NoWarn>
  </PropertyGroup>
  <PropertyGroup>
    <SignAssembly>true</SignAssembly>
  </PropertyGroup>
  <PropertyGroup>
    <AssemblyOriginatorKeyFile>winfsp.net.snk</AssemblyOriginatorKeyFile>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="System" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="..\..\..\src\dotnet\FileSystemBase+Const.cs">
      <Link>FileSystemBase+Const.cs</Link>
    </Compile>
    <Compile Include="..\..\..\src\dotnet\FileSystemBase.cs">
      <Link>FileSystemBase.cs</Link>
    </Compile>
    <Compile Include="..\..\..\src\dotnet\FileSystemHost.cs">
      <Link>FileSystemHost.cs</Link>
    </Compile>
    <Compile Include="..\..\..\src\dotnet\Interop.cs">
      <Link>Interop.cs</Link>
    </Compile>
    <Compile Include="..\..\..\src\dotnet\Service.cs">
      <Link>Service.cs</Link>
    </Compile>
  </ItemGroup>
  <ItemGroup>
    <None Include="winfsp.net.snk" />
  </ItemGroup>
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="AfterBuild">
  </Target>
  -->
  <Target Name="BeforeBuild">
    <ItemGroup>
      <AssemblyInfo Include="using System.Reflection%3b" />
      <AssemblyInfo Include="[assembly: AssemblyProduct(&quot;$(MyProductName)&quot;)]" />
      <AssemblyInfo Include="[assembly: AssemblyTitle(&quot;$(MyDescription)&quot;)]" />
      <AssemblyInfo Include="[assembly: AssemblyCompany(&quot;$(MyCompanyName)&quot;)]" />
      <AssemblyInfo Include="[assembly: AssemblyCopyright(&quot;$(MyCopyright)&quot;)]" />
      <AssemblyInfo Include="[assembly: AssemblyVersion(&quot;$(MyAssemblyVersion)&quot;)]" />
      <AssemblyInfo Include="[assembly: AssemblyFileVersion(&quot;$(MyVersion)&quot;)]" />
    </ItemGroup>
    <MakeDir Directories="$(IntermediateOutputPath)" />
    <WriteLinesToFile File="$(IntermediateOutputPath)AssemblyInfo.cs" Lines="@(AssemblyInfo)" Overwrite="true" />
    <ItemGroup>
      <Compile Include="$(IntermediateOutputPath)AssemblyInfo.cs" />
      <FileWrites Include="$(IntermediateOutputPath)AssemblyInfo.cs" />
    </ItemGroup>
  </Target>
  <PropertyGroup>
    <PostBuildEvent>exit /b 0

set TargetName=$(TargetName)
set MyAssemblyPolicyVersion=$(MyAssemblyPolicyVersion)
set MyAssemblyVersion=$(MyAssemblyVersion)

setlocal EnableDelayedExpansion
if exist $(OutDir)policy.$(MyAssemblyPolicyVersion).$(TargetName).config del $(OutDir)policy.$(MyAssemblyPolicyVersion).$(TargetName).config
for /f "delims=" %25%25l in ($(ProjectDir)winfsp.net.policy.config) do (
    set line=%25%25l
    echo !line! &gt;&gt;$(OutDir)policy.$(MyAssemblyPolicyVersion).$(TargetName).config
)

"$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.0A\Bin\al.exe" /product:"$(MyProductName)" /title:"$(MyDescription)" /company:"$(MyCompanyName)" /copyright:"$(MyCopyright)" /version:"$(MyAssemblyPolicyVersion)" /fileversion:"$(MyVersion)" /link:$(OutDir)policy.$(MyAssemblyPolicyVersion).$(TargetName).config /out:$(OutDir)policy.$(MyAssemblyPolicyVersion).$(TargetName).dll /keyfile:$(ProjectDir)$(ProjectName).snk
</PostBuildEvent>
  </PropertyGroup>
</Project>