FastReport.Compat.targets 2.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  2. <!-- Include correct version of FastReport.Compat for .NET Core 3.0 or greater with/without WindowsForms API -->
  3. <Target Name="_FR_Compat_AddReference" AfterTargets="AddTransitiveFrameworkReferences" >
  4. <Message Importance="high" Condition="$(_frDebug) == 'true'" Text="FastReport.Compat after AddTransitiveFrameworkReferences"/>
  5. <Message Importance="high" Condition="$(_frDebug) == 'true'" Text="FrameworkReference: '@(FrameworkReference)'"/>
  6. <Message Importance="high" Condition="$(_frDebug) == 'true'" Text="ResolvedFrameworkReference: '@(ResolvedFrameworkReference)'"/>
  7. <Message Importance="high" Condition="$(_frDebug) == 'true'" Text="TargetFrameworkVersion: '$(TargetFrameworkVersion)'"/>
  8. <PropertyGroup>
  9. <_UserFrameworkReferences>@(FrameworkReference)</_UserFrameworkReferences>
  10. <_UseWindowsDesktopSDK>$(_UserFrameworkReferences.Contains('Microsoft.WindowsDesktop.App.WindowsForms'))</_UseWindowsDesktopSDK>
  11. </PropertyGroup>
  12. <Message Importance="high" Condition="$(_frDebug) == 'true'" Text="_UseWindowsDesktopSDK: $(_UseWindowsDesktopSDK)"/>
  13. <ItemGroup Condition="!$(_UseWindowsDesktopSDK)">
  14. <Reference Include="$(MSBuildThisFileDirectory)lib\Any\FastReport.Compat.dll" />
  15. </ItemGroup>
  16. <!-- We don't include lib\Win\FastReport.Compat.dll for .NET 5 or greater,
  17. because for .NET 5 Windows we use library in net5.0-windows7.0 folder -->
  18. <ItemGroup Condition="$(_UseWindowsDesktopSDK) And $(TargetFrameworkVersion[1]) == '3'">
  19. <Reference Include="$(MSBuildThisFileDirectory)lib\Win\FastReport.Compat.dll" />
  20. </ItemGroup>
  21. <Message Importance="high" Condition="$(_frDebug) == 'true'" Text="References: '@(Reference)'"/>
  22. </Target>
  23. <Target Name="_FR_Compat_AfterResolveFrameworkReferences" Condition="$(_frDebug) == 'true'" AfterTargets="ResolveFrameworkReferences" >
  24. <Message Importance="high" Text="FastReport.Compat after ResolveFrameworkReferences"/>
  25. <Message Importance="high" Text="FrameworkReference: '@(FrameworkReference)'"/>
  26. <Message Importance="high" Text="ResolvedFrameworkReference: '@(ResolvedFrameworkReference)'"/>
  27. <Message Importance="high" Text="References: '@(Reference)'"/>
  28. </Target>
  29. </Project>