Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2e43924

Browse files
committed
ensure build outputs always go to$(Configuration)\$(TargetDotnetProfile)\bin
1 parent51dac00 commit2e43924

File tree

6 files changed

+35
-17
lines changed

6 files changed

+35
-17
lines changed

‎FSharp.Directory.Build.targets‎

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,38 @@
11
<Project>
22

33
<PropertyGroup>
4+
<XlfLanguages>en;$(XlfLanguages)</XlfLanguages>
45
<TargetDotnetProfileCondition="$(TargetFramework.StartsWith('netstandard')) or $(TargetFramework.StartsWith('netcoreapp'))">coreclr</TargetDotnetProfile>
56
<TargetDotnetProfileCondition="$(TargetFramework.StartsWith('net4'))">net40</TargetDotnetProfile>
6-
<OutputPath>$(RepoRoot)$(Configuration)\$(TargetDotnetProfile)\bin</OutputPath>
7-
<IntermediateOutputPath>$(RepoRoot)$(Configuration)\$(TargetDotnetProfile)\obj\$(MSBuildProjectName)\</IntermediateOutputPath>
8-
<XlfLanguages>en;$(XlfLanguages)</XlfLanguages>
7+
<ActualOutputPathCondition="'$(Language)' != 'VB'">$(MSBuildProjectDirectory)\$(OutputPath)</ActualOutputPath>
8+
<ActualOutputPathCondition="'$(Language)' == 'VB'">$(OutputPath)</ActualOutputPath>
9+
<FinalOutputPath>$(RepoRoot)$(Configuration)\$(TargetDotnetProfile)\bin</FinalOutputPath>
10+
<FinalIntermediateOutputPath>$(RepoRoot)$(Configuration)\$(TargetDotnetProfile)\obj</FinalIntermediateOutputPath>
911
</PropertyGroup>
1012

13+
<TargetName="HACK_CopyOutputsToTheProperLocation"
14+
AfterTargets="AfterBuild"
15+
Condition="'$(DisableOutputPathCopying)' != 'true'">
16+
<!--
17+
Ideally we'd set <OutputPath> to `$(Configuration)\[net40|coreclr]\bin`, but the calculation of `[net40|coreclr]`
18+
depends on the `$(TargetFramework)` variable which is set by the individual project files, but by the time we have
19+
that value (e.g., in this file) it's too late; some targets, particularly from the VsSDK have already used the
20+
values of $(OutputPath)/$(OutDir).
21+
22+
The fix is to not set `$(Outputpath)` and simply copy stuff there after the fact.
23+
-->
24+
25+
<ItemGroup>
26+
<OutputFilesToCopyInclude="$(ActualOutputPath)**" />
27+
<IntermediateFilesToCopyInclude="$(IntermediateOutputPath)\**" />
28+
</ItemGroup>
29+
30+
<MessageText="Copying build artifacts to $(FinalOutputPath)" />
31+
<MakeDirDirectories="$(FinalOutputPath);$(FinalIntermediateOutputPath)" />
32+
<CopySourceFiles="@(OutputFilesToCopy)"DestinationFolder="$(FinalOutputPath)" />
33+
<CopySourceFiles="@(IntermediateFilesToCopy)"DestinationFolder="$(FinalIntermediateOutputPath)" />
34+
</Target>
35+
1136
<ImportProject="build\targets\AssemblyVersions.props" />
1237
<ImportProject="build\targets\GenerateAssemblyAttributes.targets" />
1338
<ImportProject="build\targets\GenerateInternalsVisibleTo.targets" />

‎setup/fsharp-setup-build.proj‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
</PropertyGroup>
4343
<MSBuildProjects="%(VsixProjects.ProjectPath)"
4444
Targets="Build"
45-
Properties="Configuration=$(Configuration);IsLangPack=%(VsixProjects.IsLangPack);FSharpPackageVersion=$(FSharpPackageVersion);OutputPath=$(VsixBuildLocation);$(CustomProps)" />
45+
Properties="Configuration=$(Configuration);IsLangPack=%(VsixProjects.IsLangPack);FSharpPackageVersion=$(FSharpPackageVersion);OutputPath=$(VsixBuildLocation);DisableOutputPathCopying=true;$(CustomProps)" />
4646
<MSBuildProjects="%(SwixSetupProjects.ProjectPath)"
4747
Targets="Build"
4848
Properties="LocaleCode=%(SwixSetupProjects.LocaleCode);LocaleId=%(SwixSetupProjects.LocaleId);LocaleParentId=%(SwixSetupProjects.LocaleParentId);LocaleParentCulture=%(SwixSetupProjects.LocaleParentCulture);LocaleSpecificCulture=%(SwixSetupProjects.LocaleSpecificCulture);IsLangPack=%(SwixSetupProjects.IsLangPack);FSharpPackageVersion=$(FSharpPackageVersion);$(CustomProps)"/>

‎vsintegration/Directory.Build.targets‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@
1111
<PackageTargetFallback>net462</PackageTargetFallback>
1212
</PropertyGroup>
1313

14-
<PropertyGroupCondition="'$(CreateVsixContainer)' == 'true'">
15-
<!-- Ensure VSIX packages end up in the proper location.-->
16-
<OutDir>$(OutputPath)\</OutDir>
17-
</PropertyGroup>
18-
1914
<ImportGroupCondition="'$(ImportVsSDK)' == 'true'">
2015
<ImportProject="$(NuGetPackageRoot)Microsoft.VSSDK.BuildTools\$(MicrosoftVSSDKBuildToolsPackageVersion)\build\Microsoft.VsSDK.BuildTools.props" />
2116
<ImportProject="$(NugetPackageRoot)Microsoft.VSSDK.BuildTools\$(MicrosoftVSSDKBuildToolsPackageVersion)\build\Microsoft.VsSDK.BuildTools.targets" />

‎vsintegration/Templates.Directory.Build.targets‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22

33
<ImportProject="Directory.Build.targets" />
44

5-
<PropertyGroup>
6-
<OutputPath>$(FSharpSourcesRoot)\..\$(Configuration)\$(TargetDotnetProfile)\bin\$(TemplateCategory)\$(AssemblyName)</OutputPath>
7-
</PropertyGroup>
8-
95
<ItemGroup>
106
<!-- everything under the `Template` directory is not to be considered part of the project-->
117
<CompileRemove="**\Template\**" />
@@ -15,8 +11,4 @@
1511

1612
<TargetName="CoreCompile" />
1713

18-
<TargetName="CopyFilesToOutputDirectory"AfterTargets="CoreCompile">
19-
<CopySourceFiles="@(TemplateFiles)"DestinationFiles="@(TemplateFiles->'$(OutputPath)\%(Filename)%(Extension)')" />
20-
</Target>
21-
2214
</Project>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<Project>
2+
<!-- empty to prevent directory crawling-->
3+
</Project>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<Project>
2+
<!-- empty to prevent directory crawling-->
3+
</Project>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp