<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
  </PropertyGroup>
        <Target Name="_Inspect_FscArgs"
          Condition=" '$(IsCrossTargetingBuild)' != 'true' "
          DependsOnTargets="ResolveReferences;CoreCompile">
    <Message Text="%(FscCommandLineArgs.Identity)" Importance="High" />
    <WriteLinesToFile
            Condition=" '$(_Inspect_FscArgs_OutFile)' != '' "
            File="$(_Inspect_FscArgs_OutFile)"
            Lines="@(FscCommandLineArgs -> '%(Identity)')"
            Overwrite="true" 
            Encoding="UTF-8"/>
    <!-- WriteLinesToFile doesnt create the file if @(FscCommandLineArgs) is empty -->
    <Touch
        Condition=" '$(_Inspect_FscArgs_OutFile)' != '' "
        Files="$(_Inspect_FscArgs_OutFile)"
        AlwaysCreate="True" />
  </Target>
<Target Name="_Inspect_GetResolvedProjectReferences"
          Condition=" '$(IsCrossTargetingBuild)' != 'true' "
          DependsOnTargets="ResolveProjectReferencesDesignTime">
    <Message Text="%(_MSBuildProjectReferenceExistent.FullPath)" Importance="High" />
    <Message Text="%(_MSBuildProjectReferenceExistent.SetTargetFramework)" Importance="High" />
    <WriteLinesToFile
            Condition=" '$(_Inspect_GetResolvedProjectReferences_OutFile)' != '' "
            File="$(_Inspect_GetResolvedProjectReferences_OutFile)"
            Lines="@(_MSBuildProjectReferenceExistent -> 'ProjectReferenceFullPath=%(FullPath);%(SetTargetFramework)')"
            Overwrite="true"
            Encoding="UTF-8"/>
    <!-- WriteLinesToFile doesnt create the file if @(_MSBuildProjectReferenceExistent) is empty -->
    <Touch
        Condition=" '$(_Inspect_GetResolvedProjectReferences_OutFile)' != '' "
        Files="$(_Inspect_GetResolvedProjectReferences_OutFile)"
        AlwaysCreate="True" />
  </Target>

  <Target Name="_Inspect_GetProperties_CrossGen"
          Condition=" '$(IsCrossTargetingBuild)' == 'true' "
           >
    <ItemGroup>
        
        <_Inspect_GetProperties_OutLines Include="P0">
            <PropertyName>TargetPath</PropertyName>
            <PropertyValue>$(TargetPath)</PropertyValue>
        </_Inspect_GetProperties_OutLines>

        <_Inspect_GetProperties_OutLines Include="P1">
            <PropertyName>IsCrossTargetingBuild</PropertyName>
            <PropertyValue>$(IsCrossTargetingBuild)</PropertyValue>
        </_Inspect_GetProperties_OutLines>

        <_Inspect_GetProperties_OutLines Include="P2">
            <PropertyName>TargetFrameworks</PropertyName>
            <PropertyValue>$(TargetFrameworks)</PropertyValue>
        </_Inspect_GetProperties_OutLines>

        <_Inspect_GetProperties_OutLines Include="P3">
            <PropertyName>OutputType</PropertyName>
            <PropertyValue>$(OutputType)</PropertyValue>
        </_Inspect_GetProperties_OutLines>

        <_Inspect_GetProperties_OutLines Include="P4">
            <PropertyName>IsTestProject</PropertyName>
            <PropertyValue>$(IsTestProject)</PropertyValue>
        </_Inspect_GetProperties_OutLines>

        <_Inspect_GetProperties_OutLines Include="P5">
            <PropertyName>Configuration</PropertyName>
            <PropertyValue>$(Configuration)</PropertyValue>
        </_Inspect_GetProperties_OutLines>

        <_Inspect_GetProperties_OutLines Include="P6">
            <PropertyName>IsPackable</PropertyName>
            <PropertyValue>$(IsPackable)</PropertyValue>
        </_Inspect_GetProperties_OutLines>

        <_Inspect_GetProperties_OutLines Include="P7">
            <PropertyName>TargetFramework</PropertyName>
            <PropertyValue>$(TargetFramework)</PropertyValue>
        </_Inspect_GetProperties_OutLines>

        <_Inspect_GetProperties_OutLines Include="P8">
            <PropertyName>TargetFrameworkIdentifier</PropertyName>
            <PropertyValue>$(TargetFrameworkIdentifier)</PropertyValue>
        </_Inspect_GetProperties_OutLines>

        <_Inspect_GetProperties_OutLines Include="P9">
            <PropertyName>TargetFrameworkVersion</PropertyName>
            <PropertyValue>$(TargetFrameworkVersion)</PropertyValue>
        </_Inspect_GetProperties_OutLines>

        <_Inspect_GetProperties_OutLines Include="P10">
            <PropertyName>MSBuildAllProjects</PropertyName>
            <PropertyValue>$(MSBuildAllProjects)</PropertyValue>
        </_Inspect_GetProperties_OutLines>

        <_Inspect_GetProperties_OutLines Include="P11">
            <PropertyName>ProjectAssetsFile</PropertyName>
            <PropertyValue>$(ProjectAssetsFile)</PropertyValue>
        </_Inspect_GetProperties_OutLines>

        <_Inspect_GetProperties_OutLines Include="P12">
            <PropertyName>RestoreSuccess</PropertyName>
            <PropertyValue>$(RestoreSuccess)</PropertyValue>
        </_Inspect_GetProperties_OutLines>

        <_Inspect_GetProperties_OutLines Include="P13">
            <PropertyName>Configurations</PropertyName>
            <PropertyValue>$(Configurations)</PropertyValue>
        </_Inspect_GetProperties_OutLines>

        <_Inspect_GetProperties_OutLines Include="P14">
            <PropertyName>TargetFrameworks</PropertyName>
            <PropertyValue>$(TargetFrameworks)</PropertyValue>
        </_Inspect_GetProperties_OutLines>

        <_Inspect_GetProperties_OutLines Include="P15">
            <PropertyName>RunArguments</PropertyName>
            <PropertyValue>$(RunArguments)</PropertyValue>
        </_Inspect_GetProperties_OutLines>

        <_Inspect_GetProperties_OutLines Include="P16">
            <PropertyName>RunCommand</PropertyName>
            <PropertyValue>$(RunCommand)</PropertyValue>
        </_Inspect_GetProperties_OutLines>

        <_Inspect_GetProperties_OutLines Include="P17">
            <PropertyName>IsPublishable</PropertyName>
            <PropertyValue>$(IsPublishable)</PropertyValue>
        </_Inspect_GetProperties_OutLines></ItemGroup>
    <Message Text="%(_Inspect_GetProperties_OutLines.PropertyName)=%(_Inspect_GetProperties_OutLines.PropertyValue)" Importance="High" />
    <WriteLinesToFile
            Condition=" '$(_Inspect_GetProperties_OutFile)' != '' "
            File="$(_Inspect_GetProperties_OutFile)"
            Lines="@(_Inspect_GetProperties_OutLines -> '%(PropertyName)=%(PropertyValue)')"
            Overwrite="true" 
            Encoding="UTF-8"/>
  </Target>

  <Target Name="_Inspect_GetProperties_NotCrossGen"
          Condition=" '$(IsCrossTargetingBuild)' != 'true' "
          DependsOnTargets="ResolveReferences" >
    <ItemGroup>
        
        <_Inspect_GetProperties_OutLines Include="P0">
            <PropertyName>TargetPath</PropertyName>
            <PropertyValue>$(TargetPath)</PropertyValue>
        </_Inspect_GetProperties_OutLines>

        <_Inspect_GetProperties_OutLines Include="P1">
            <PropertyName>IsCrossTargetingBuild</PropertyName>
            <PropertyValue>$(IsCrossTargetingBuild)</PropertyValue>
        </_Inspect_GetProperties_OutLines>

        <_Inspect_GetProperties_OutLines Include="P2">
            <PropertyName>TargetFrameworks</PropertyName>
            <PropertyValue>$(TargetFrameworks)</PropertyValue>
        </_Inspect_GetProperties_OutLines>

        <_Inspect_GetProperties_OutLines Include="P3">
            <PropertyName>OutputType</PropertyName>
            <PropertyValue>$(OutputType)</PropertyValue>
        </_Inspect_GetProperties_OutLines>

        <_Inspect_GetProperties_OutLines Include="P4">
            <PropertyName>IsTestProject</PropertyName>
            <PropertyValue>$(IsTestProject)</PropertyValue>
        </_Inspect_GetProperties_OutLines>

        <_Inspect_GetProperties_OutLines Include="P5">
            <PropertyName>Configuration</PropertyName>
            <PropertyValue>$(Configuration)</PropertyValue>
        </_Inspect_GetProperties_OutLines>

        <_Inspect_GetProperties_OutLines Include="P6">
            <PropertyName>IsPackable</PropertyName>
            <PropertyValue>$(IsPackable)</PropertyValue>
        </_Inspect_GetProperties_OutLines>

        <_Inspect_GetProperties_OutLines Include="P7">
            <PropertyName>TargetFramework</PropertyName>
            <PropertyValue>$(TargetFramework)</PropertyValue>
        </_Inspect_GetProperties_OutLines>

        <_Inspect_GetProperties_OutLines Include="P8">
            <PropertyName>TargetFrameworkIdentifier</PropertyName>
            <PropertyValue>$(TargetFrameworkIdentifier)</PropertyValue>
        </_Inspect_GetProperties_OutLines>

        <_Inspect_GetProperties_OutLines Include="P9">
            <PropertyName>TargetFrameworkVersion</PropertyName>
            <PropertyValue>$(TargetFrameworkVersion)</PropertyValue>
        </_Inspect_GetProperties_OutLines>

        <_Inspect_GetProperties_OutLines Include="P10">
            <PropertyName>MSBuildAllProjects</PropertyName>
            <PropertyValue>$(MSBuildAllProjects)</PropertyValue>
        </_Inspect_GetProperties_OutLines>

        <_Inspect_GetProperties_OutLines Include="P11">
            <PropertyName>ProjectAssetsFile</PropertyName>
            <PropertyValue>$(ProjectAssetsFile)</PropertyValue>
        </_Inspect_GetProperties_OutLines>

        <_Inspect_GetProperties_OutLines Include="P12">
            <PropertyName>RestoreSuccess</PropertyName>
            <PropertyValue>$(RestoreSuccess)</PropertyValue>
        </_Inspect_GetProperties_OutLines>

        <_Inspect_GetProperties_OutLines Include="P13">
            <PropertyName>Configurations</PropertyName>
            <PropertyValue>$(Configurations)</PropertyValue>
        </_Inspect_GetProperties_OutLines>

        <_Inspect_GetProperties_OutLines Include="P14">
            <PropertyName>TargetFrameworks</PropertyName>
            <PropertyValue>$(TargetFrameworks)</PropertyValue>
        </_Inspect_GetProperties_OutLines>

        <_Inspect_GetProperties_OutLines Include="P15">
            <PropertyName>RunArguments</PropertyName>
            <PropertyValue>$(RunArguments)</PropertyValue>
        </_Inspect_GetProperties_OutLines>

        <_Inspect_GetProperties_OutLines Include="P16">
            <PropertyName>RunCommand</PropertyName>
            <PropertyValue>$(RunCommand)</PropertyValue>
        </_Inspect_GetProperties_OutLines>

        <_Inspect_GetProperties_OutLines Include="P17">
            <PropertyName>IsPublishable</PropertyName>
            <PropertyValue>$(IsPublishable)</PropertyValue>
        </_Inspect_GetProperties_OutLines></ItemGroup>
    <Message Text="%(_Inspect_GetProperties_OutLines.PropertyName)=%(_Inspect_GetProperties_OutLines.PropertyValue)" Importance="High" />
    <WriteLinesToFile
            Condition=" '$(_Inspect_GetProperties_OutFile)' != '' "
            File="$(_Inspect_GetProperties_OutFile)"
            Lines="@(_Inspect_GetProperties_OutLines -> '%(PropertyName)=%(PropertyValue)')"
            Overwrite="true" 
            Encoding="UTF-8"/>
  </Target>

  <Target Name="_Inspect_GetProperties"
          DependsOnTargets="_Inspect_GetProperties_CrossGen;_Inspect_GetProperties_NotCrossGen" />
        
</Project>