forked from RedCursorSecurityConsulting/CVE-2020-0668
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Fody.targets
115 lines (96 loc) · 4.88 KB
/
Fody.targets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectWeaverXml Condition="$(ProjectWeaverXml) == ''">$(ProjectDir)FodyWeavers.xml</ProjectWeaverXml>
<FodyPath Condition="$(FodyPath) == ''">$(MSBuildThisFileDirectory)..\</FodyPath>
<FodyAssemblyDirectory Condition="$(MSBuildRuntimeType) == 'Core'">$(FodyPath)netstandardtask</FodyAssemblyDirectory>
<FodyAssemblyDirectory Condition="$(MSBuildRuntimeType) != 'Core'">$(FodyPath)netclassictask</FodyAssemblyDirectory>
<FodyAssembly Condition="$(FodyAssembly) == ''">$(FodyAssemblyDirectory)\Fody.dll</FodyAssembly>
<DefaultItemExcludes>$(DefaultItemExcludes);FodyWeavers.xsd</DefaultItemExcludes>
<FodyGenerateXsd Condition="$(FodyGenerateXsd) == ''">true</FodyGenerateXsd>
<MsBuildMajorVersion>15</MsBuildMajorVersion>
<MsBuildMajorVersion Condition="'$(MSBuildVersion)' != ''">$([System.Version]::Parse($(MSBuildVersion)).Major)</MsBuildMajorVersion>
</PropertyGroup>
<ItemGroup Condition="Exists($(ProjectWeaverXml))">
<UpToDateCheckInput Include="$(ProjectWeaverXml)" />
<CustomAdditionalCompileInputs Include="$(ProjectWeaverXml)" />
</ItemGroup>
<!-- Support for NCrunch -->
<ItemGroup Condition="'$(NCrunch)' == '1' and '$(TargetFramework)' == '' and '$(TargetFrameworks)' == ''">
<None Include="$(FodyAssemblyDirectory)\*.*" />
<None Include="@(WeaverFiles)" />
</ItemGroup>
<UsingTask TaskName="Fody.WeavingTask" AssemblyFile="$(FodyAssembly)" />
<UsingTask TaskName="Fody.UpdateReferenceCopyLocalTask" AssemblyFile="$(FodyAssembly)" />
<UsingTask TaskName="Fody.VerifyTask" AssemblyFile="$(FodyAssembly)" />
<Target
Name="FodyTarget"
AfterTargets="AfterCompile"
Condition="Exists(@(IntermediateAssembly)) And $(DesignTimeBuild) != true And $(DisableFody) != true"
DependsOnTargets="$(FodyDependsOnTargets)"
Inputs="@(IntermediateAssembly);$(ProjectWeaverXml)"
Outputs="$(IntermediateOutputPath)$(MSBuildProjectFile).Fody.CopyLocal.cache">
<Error Condition="($(MsBuildMajorVersion) < 16)"
Text="Fody is only supported on MSBuild 16 and above. Current version: $(MsBuildMajorVersion)." />
<Fody.WeavingTask
AssemblyFile="@(IntermediateAssembly)"
IntermediateDirectory="$(ProjectDir)$(IntermediateOutputPath)"
KeyOriginatorFile="$(KeyOriginatorFile)"
AssemblyOriginatorKeyFile="$(AssemblyOriginatorKeyFile)"
ProjectDirectory="$(MSBuildProjectDirectory)"
ProjectFile="$(MSBuildProjectFullPath)"
SolutionDirectory="$(SolutionDir)"
References="@(ReferencePath)"
SignAssembly="$(SignAssembly)"
DelaySign="$(DelaySign)"
ReferenceCopyLocalFiles="@(ReferenceCopyLocalPaths)"
DefineConstants="$(DefineConstants)"
DocumentationFile="@(DocFileItem->'%(FullPath)')"
WeaverFiles="@(WeaverFiles)"
WeaverConfiguration="$(WeaverConfiguration)"
PackageReferences="@(PackageReference)"
NCrunchOriginalSolutionDirectory="$(NCrunchOriginalSolutionDir)"
IntermediateCopyLocalFilesCache="$(IntermediateOutputPath)$(MSBuildProjectFile).Fody.CopyLocal.cache"
GenerateXsd="$(FodyGenerateXsd)"
>
<Output
TaskParameter="ExecutedWeavers"
PropertyName="FodyExecutedWeavers" />
</Fody.WeavingTask>
<ItemGroup>
<FileWrites Include="$(IntermediateOutputPath)$(MSBuildProjectFile).Fody.CopyLocal.cache" />
</ItemGroup>
</Target>
<Target
Name="FodyUpdateCopyLocalFilesTarget"
AfterTargets="FodyTarget"
>
<Fody.UpdateReferenceCopyLocalTask
ReferenceCopyLocalFiles="@(ReferenceCopyLocalPaths)"
IntermediateCopyLocalFilesCache="$(IntermediateOutputPath)$(MSBuildProjectFile).Fody.CopyLocal.cache"
>
<Output
TaskParameter="UpdatedReferenceCopyLocalFiles"
ItemName="FodyUpdatedReferenceCopyLocalPaths" />
</Fody.UpdateReferenceCopyLocalTask>
<ItemGroup>
<FodyRemovedReferenceCopyLocalPaths Include="@(ReferenceCopyLocalPaths)" />
<FodyRemovedReferenceCopyLocalPaths Remove="@(FodyUpdatedReferenceCopyLocalPaths)" />
<ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalPaths)" />
<ReferenceCopyLocalPaths Include="@(FodyUpdatedReferenceCopyLocalPaths)" />
</ItemGroup>
</Target>
<Target
Name="FodyVerifyTarget"
AfterTargets="AfterBuild"
Condition="'$(NCrunch)' != '1' And $(FodyExecutedWeavers) != '' And $(DisableFody) != true"
DependsOnTargets="$(FodyVerifyDependsOnTargets)">
<Fody.VerifyTask
ProjectDirectory="$(MSBuildProjectDirectory)"
TargetPath="$(TargetPath)"
SolutionDirectory="$(SolutionDir)"
WeaverConfiguration="$(WeaverConfiguration)"
DefineConstants="$(DefineConstants)"
NCrunchOriginalSolutionDirectory="$(NCrunchOriginalSolutionDir)"
/>
</Target>
</Project>