Skip to content

Commit 8f6bf85

Browse files
committed
Revert "Updated Microsoft.FSharp.Targets file"
This reverts commit cee585c.
1 parent cee585c commit 8f6bf85

File tree

1 file changed

+14
-26
lines changed

1 file changed

+14
-26
lines changed

src/FSharp.Build/Microsoft.FSharp.Targets

Lines changed: 14 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ This file defines the steps in the standard build process specific for F# .NET p
1212
For example, it contains the step that actually calls the F# compiler. The remainder
1313
of the build process is defined in Microsoft.Common.targets, which is imported by
1414
this file.
15-
***********************************************************************************************-->
15+
***********************************************************************************************
16+
-->
1617

1718
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
1819

@@ -21,18 +22,6 @@ this file.
2122
<FSharpBuildAssemblyFile Condition=" '$(FSharpBuildAssemblyFile)' =='' ">$(MSBuildThisFileDirectory)FSharp.Build.dll</FSharpBuildAssemblyFile>
2223
</PropertyGroup>
2324

24-
<!-- EARLY GUARDED IMPORTS: ensure Microsoft.Common.targets is present for legacy/minimal projects.
25-
Safe because Microsoft.Common.targets sets MicrosoftCommonTargetsImported=true. -->
26-
<Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets"
27-
Condition="'$(MSBuildLoadMicrosoftCommonTargets)' != 'false'
28-
and Exists('$(MSBuildToolsPath)\Microsoft.Common.targets')
29-
and '$(MicrosoftCommonTargetsImported)' != 'true'" />
30-
31-
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Build\Microsoft.Common.targets"
32-
Condition="'$(MicrosoftCommonTargetsImported)' != 'true'
33-
and !Exists('$(MSBuildToolsPath)\Microsoft.Common.targets')
34-
and Exists('$(MSBuildExtensionsPath32)\Microsoft\Build\Microsoft.Common.targets')" />
35-
3625
<UsingTask TaskName="Fsc" AssemblyFile="$(FSharpBuildAssemblyFile)" />
3726
<UsingTask TaskName="Fsi" AssemblyFile="$(FSharpBuildAssemblyFile)" />
3827
<UsingTask TaskName="FSharpEmbedResourceText" AssemblyFile="$(FSharpBuildAssemblyFile)" />
@@ -47,7 +36,7 @@ this file.
4736
<ImportByWildcardAfterMicrosoftFSharpTargets Condition="'$(ImportByWildcardAfterMicrosoftFSharpTargets)' == ''">true</ImportByWildcardAfterMicrosoftFSharpTargets>
4837
</PropertyGroup>
4938

50-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\$(MSBuildThisFile)\ImportBefore\*" Condition="'$(ImportByWildcardBeforeMicrosoftFSharpTargets)' == 'true' and exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\$(MSBuildThisFile)\ImportBefore')" />
39+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\$(MSBuildThisFile)\ImportBefore\*" Condition="'$(ImportByWildcardBeforeMicrosoftFSharpTargets)' == 'true' and exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\$(MSBuildThisFile)\ImportBefore')"/>
5140

5241
<PropertyGroup>
5342
<DefaultLanguageSourceExtension>.fs</DefaultLanguageSourceExtension>
@@ -81,7 +70,7 @@ this file.
8170
<FSharpPreferNetFrameworkTools Condition="'$(FSharpPreferNetFrameworkTools)' == ''">true</FSharpPreferNetFrameworkTools>
8271
</PropertyGroup>
8372

84-
<PropertyGroup Condition="'$(FSharp_Shim_Present)' == 'true' and '$(FSharpPreferNetFrameworkTools)' == 'true'>
73+
<PropertyGroup Condition="'$(FSharp_Shim_Present)' == 'true' and '$(FSharpPreferNetFrameworkTools)' == 'true'">
8574

8675

8776
<!-- Nothing set so use default, Arm, default to native arm, X64 default to AnyCpu -->
@@ -120,7 +109,7 @@ this file.
120109
121110
[OUT]
122111
@(EmbeddedResource) - EmbeddedResource items with metadata
123-
112+
124113
For F# applications the transformation is like:
125114
126115
Resources1.resx => Resources1 => Build into main assembly
@@ -195,8 +184,7 @@ this file.
195184
ResourceFiles="@(EmbeddedResource)"
196185
RootNamespace="$(RootNamespace)"
197186
UseStandardResourceNames="$(UseStandardResourceNames)"
198-
Condition="'%(EmbeddedResource.ManifestResourceName)' == '' and ('%(EmbeddedResource.WithCulture)' == 'false' or '%(EmbeddedResource.Type)' == 'Resx') AND '$(UsingXBuild)' == 'false'"
199-
>
187+
Condition="'%(EmbeddedResource.ManifestResourceName)' == '' and ('%(EmbeddedResource.WithCulture)' == 'false' or '%(EmbeddedResource.Type)' == 'Resx') AND '$(UsingXBuild)' == 'false'">
200188

201189
<Output TaskParameter="ResourceFilesWithManifestResourceNames" ItemName="_Temporary" />
202190

@@ -208,8 +196,7 @@ this file.
208196
RootNamespace="$(RootNamespace)"
209197
UseStandardResourceNames="$(UseStandardResourceNames)"
210198
PrependCultureAsDirectory="false"
211-
Condition="'%(EmbeddedResource.ManifestResourceName)' == '' and '%(EmbeddedResource.WithCulture)' == 'true' and '%(EmbeddedResource.Type)' == 'Non-Resx' AND '$(UsingXBuild)' == 'false'"
212-
>
199+
Condition="'%(EmbeddedResource.ManifestResourceName)' == '' and '%(EmbeddedResource.WithCulture)' == 'true' and '%(EmbeddedResource.Type)' == 'Non-Resx' AND '$(UsingXBuild)' == 'false'">
213200

214201
<Output TaskParameter="ResourceFilesWithManifestResourceNames" ItemName="_Temporary" />
215202

@@ -328,7 +315,8 @@ this file.
328315

329316
<Warning
330317
Condition="'$(Win32ResourceFile)' != '' "
331-
Text="The property &lt;Win32ResourceFile> has been renamed to &lt;Win32Resource>. Update your project file to ensure that the correct value is passed via the --win32res option to the compiler." />
318+
Text="The property &lt;Win32ResourceFile> has been renamed to &lt;Win32Resource>. Update your project file to ensure that the correct value is passed via the --win32res option to the F# compiler."
319+
/>
332320

333321
<!-- Workaround for differences between how msbuild and xbuild handle embedded resources.
334322
If we just naively include the additional items needed for mono, that leads to issues
@@ -392,7 +380,7 @@ this file.
392380
OtherFlags="$(FscOtherFlags)"
393381
OutputAssembly="@(IntermediateAssembly)"
394382
OutputRefAssembly="@(IntermediateRefAssembly)"
395-
     ParallelCompilation="@(ParallelCompilation)"
383+
ParallelCompilation="@(ParallelCompilation)"
396384
PathMap="$(PathMap)"
397385
PdbFile="$(PdbFile)"
398386
Platform="$(PlatformTarget)"
@@ -402,7 +390,7 @@ this file.
402390
PublicSign="$(PublicSign)"
403391
RealSig="$(RealSig)"
404392
References="@(ReferencePathWithRefAssemblies)"
405-
ReferencePath="@(ReferencePathWithRefAssemblies)"
393+
ReferencePath="$(ReferencePathWithRefAssemblies)"
406394
RefOnly="$(ProduceOnlyReferenceAssembly)"
407395
Resources="@(ActualEmbeddedResources)"
408396
SkipCompilerExecution="$(SkipCompilerExecution)"
@@ -437,7 +425,7 @@ this file.
437425
<CallTarget Targets="$(TargetsTriggeredByCompilation)" Condition="'$(TargetsTriggeredByCompilation)' != ''" />
438426
</Target>
439427

440-
<!-- (Late import of Microsoft.Common.targets removed; early guarded import ensures presence) -->
428+
<Import Project="$(MSBuildBinPath)\Microsoft.Common.targets" />
441429

442430
<!--
443431
============================================================
@@ -449,7 +437,7 @@ this file.
449437
============================================================
450438
-->
451439

452-
<Target Name="GenerateTargetFrameworkMonikerAttribute" BeforeTargets="BeforeCompile" DependsOnTargets="PrepareForBuild;GetReferenceAssemblyPaths" Inputs="$(MSBuildThisFileFullPath)" Outputs="$(TargetFrameworkMonikerAssemblyAttributesPath)">
440+
<Target Name="GenerateTargetFrameworkMonikerAttribute" BeforeTargets="BeforeCompile" DependsOnTargets="PrepareForBuild;GetReferenceAssemblyPaths" Inputs="$(MSBuildThisFileFullPath)" Outputs="$(TargetFrameworkMonikerAssemblyAttributesPath)" Condition="'$(GenerateTargetFrameworkAttribute)' == 'true'">
453441

454442
<PropertyGroup>
455443
<!-- This attribute is only available in mscorlib v4 and later -->
@@ -553,5 +541,5 @@ this file.
553541
Condition=" '@(ReferenceToInboxTP->Count())' != '0' " />
554542
</Target>
555543

556-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\$(MSBuildThisFile)\ImportAfter\*" Condition="'$(ImportByWildcardAfterMicrosoftFSharpTargets)' == 'true' and exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\$(MSBuildThisFile)\ImportAfter')" />
544+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\$(MSBuildThisFile)\ImportAfter\*" Condition="'$(ImportByWildcardAfterMicrosoftFSharpTargets)' == 'true' and exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\$(MSBuildThisFile)\ImportAfter')"/>
557545
</Project>

0 commit comments

Comments
 (0)