1
0
mirror of synced 2025-02-12 09:12:59 +01:00
2018-11-18 12:27:18 -05:00

82 lines
3.1 KiB
XML

<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectWeaverXml>$(ProjectDir)FodyWeavers.xml</ProjectWeaverXml>
<FodySignAssembly Condition="$(FodySignAssembly) == '' Or $(FodySignAssembly) == '*Undefined*'">$(SignAssembly)</FodySignAssembly>
<FodyPath Condition="$(FodyPath) == '' Or $(FodyPath) == '*Undefined*'">$(MSBuildThisFileDirectory)..\</FodyPath>
</PropertyGroup>
<Choose>
<When Condition="'$(MSBuildRuntimeType)'=='Core'">
<PropertyGroup>
<FodyAssemblyFile>$(FodyPath)netstandardtask</FodyAssemblyFile>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<FodyAssemblyFile>$(FodyPath)netclassictask</FodyAssemblyFile>
</PropertyGroup>
</Otherwise>
</Choose>
<PropertyGroup>
<FodyAssembly>$(FodyAssemblyFile)\Fody.dll</FodyAssembly>
</PropertyGroup>
<UsingTask
TaskName="Fody.WeavingTask"
AssemblyFile="$(FodyAssembly)" />
<Target
AfterTargets="AfterCompile"
Condition="Exists('@(IntermediateAssembly)') And $(DesignTimeBuild) != true And $(DisableFody) != true"
Name="FodyTarget"
DependsOnTargets="$(FodyDependsOnTargets)"
Inputs="@(IntermediateAssembly->'%(FullPath)');$(FodyKeyFilePath);$(ProjectWeaverXml)"
Outputs="$(TargetPath)">
<Fody.WeavingTask
AssemblyFile="@(IntermediateAssembly)"
IntermediateDirectory="$(ProjectDir)$(IntermediateOutputPath)"
KeyOriginatorFile="$(KeyOriginatorFile)"
AssemblyOriginatorKeyFile="$(AssemblyOriginatorKeyFile)"
NuGetPackageRoot="$(NuGetPackageRoot)"
ProjectDirectory="$(MSBuildProjectDirectory)"
SolutionDirectory="$(SolutionDir)"
References="@(ReferencePath)"
SignAssembly="$(FodySignAssembly)"
ReferenceCopyLocalFiles="@(ReferenceCopyLocalPaths)"
DefineConstants="$(DefineConstants)"
DebugType="$(DebugType)"
DocumentationFile="@(DocFileItem->'%(FullPath)')"
MsBuildThisFileDirectory="$(MSBuildThisFileDirectory)"
WeaverFiles="@(WeaverFiles)"
NCrunchOriginalSolutionDirectory="$(NCrunchOriginalSolutionDir)"
>
<Output
TaskParameter="ExecutedWeavers"
PropertyName="FodyExecutedWeavers" />
</Fody.WeavingTask>
</Target>
<UsingTask
TaskName="Fody.VerifyTask"
AssemblyFile="$(FodyAssembly)" />
<Target Condition="'$(NCrunch)' != '1' And $(FodyExecutedWeavers) != '' And $(DisableFody) != true"
AfterTargets="AfterBuild"
Name="FodyVerifyTarget"
DependsOnTargets="$(FodyVerifyDependsOnTargets)">
<Fody.VerifyTask
ProjectDirectory="$(MSBuildProjectDirectory)"
TargetPath="$(TargetPath)"
SolutionDirectory="$(SolutionDir)"
DefineConstants="$(DefineConstants)"
NCrunchOriginalSolutionDirectory="$(NCrunchOriginalSolutionDir)"
/>
</Target>
<!-- Support for NCrunch -->
<ItemGroup Condition="'$(NCrunch)' == '1'">
<None Include="$(FodyAssemblyFile)\*.*" />
<None Include="@(WeaverFiles)" />
</ItemGroup>
</Project>