Skip to content

Commit 9fae71f

Browse files
authored
Set plain dotnet build in devcontainer (#14991)
* Set plain dotnet build in devcontainer * Set output explicitly * Update launch and tasks specs
1 parent 56123ad commit 9fae71f

File tree

9 files changed

+44
-37
lines changed

9 files changed

+44
-37
lines changed

.devcontainer/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,6 @@ RUN apt-get update \
2121

2222
# Switch back to dialog for any ad-hoc use of apt-get
2323
ENV DEBIAN_FRONTEND=dialog
24+
25+
# Make sure we can build using plain dotnet
26+
ENV BUILDING_USING_DOTNET=true

.vscode/launch.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"stopAtEntry": false,
3535
"justMyCode": true,
3636
"enableStepFiltering": true,
37+
"requireExactSource": false,
3738
"symbolOptions": {
3839
"searchMicrosoftSymbolServer": true,
3940
"searchNuGetOrgSymbolServer": true
@@ -62,6 +63,7 @@
6263
"stopAtEntry": false,
6364
"justMyCode": true,
6465
"enableStepFiltering": true,
66+
"requireExactSource": false,
6567
"symbolOptions": {
6668
"searchMicrosoftSymbolServer": true,
6769
"searchNuGetOrgSymbolServer": true
@@ -84,6 +86,7 @@
8486
},
8587
"justMyCode": true,
8688
"enableStepFiltering": false,
89+
"requireExactSource": false
8790
}
8891
]
8992
}

.vscode/tasks.json

Lines changed: 16 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -15,52 +15,45 @@
1515
},
1616
"tasks": [
1717
{
18-
"label": "Full Build (Debug)",
19-
"command": "./build.sh",
18+
"label": "Build (Debug)",
19+
"command": "dotnet",
2020
"type": "shell",
2121
"args": [
22-
"-c Debug"
22+
"build",
23+
"-c Debug",
24+
"FSharp.Compiler.Service.sln"
2325
],
2426
"windows": {
25-
"command": "${workspaceFolder}/Build.cmd",
27+
"command": "dotnet",
2628
"args": [
29+
"build",
2730
"-c Debug",
28-
"-noVisualStudio"
31+
"FSharp.Compiler.Service.sln"
2932
],
3033
},
3134
"problemMatcher": "$msCompile",
3235
"group": "build",
3336
},
3437
{
35-
"label": "Full Build (Release)",
36-
"command": "./build.sh",
38+
"label": "Build (Release)",
39+
"command": "dotnet",
3740
"type": "shell",
3841
"args": [
39-
"-c Release"
42+
"build",
43+
"-c Release",
44+
"FSharp.Compiler.Service.sln"
4045
],
4146
"windows": {
42-
"command": "${workspaceFolder}/Build.cmd",
47+
"command": "dotnet",
4348
"args": [
49+
"build",
4450
"-c Release",
45-
"-noVisualStudio"
51+
"FSharp.Compiler.Service.sln"
4652
],
4753
},
4854
"problemMatcher": "$msCompile",
4955
"group": "build",
5056
},
51-
{
52-
"label": "Rebuild (Debug)",
53-
"command": "dotnet",
54-
"type": "shell",
55-
"args": [
56-
"build",
57-
"-c",
58-
"Debug",
59-
"${workspaceFolder}/FSharp.sln"
60-
],
61-
"problemMatcher": "$msCompile",
62-
"group": "build",
63-
},
6457
{
6558
"label": "Update xlf files",
6659
"command": "./build.sh",
@@ -75,20 +68,6 @@
7568
},
7669
"problemMatcher": "$msCompile",
7770
"group": "build"
78-
},
79-
{
80-
"label": "Run tests (all but integration)",
81-
"command": "./build.sh",
82-
"type": "shell",
83-
"args": [
84-
"-testAllButIntegration"
85-
],
86-
"windows": {
87-
"command": "${workspaceFolder}/Build.cmd",
88-
},
89-
"problemMatcher": "$msCompile",
90-
"group": "test"
9171
}
92-
// TODO: Add more test tasks if necessary.
9372
]
9473
}

eng/Build.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ function BuildSolution([string] $solutionName) {
261261
/p:TestTargetFrameworks=$testTargetFrameworks `
262262
/p:DotNetBuildFromSource=$sourceBuild `
263263
/p:CompressAllMetadata=$CompressAllMetadata `
264+
/p:BUILDING_USING_DOTNET=false `
264265
/v:$verbosity `
265266
$suppressExtensionDeployment `
266267
@properties

eng/build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,7 @@ function BuildSolution {
295295
/p:QuietRestore=$quiet_restore \
296296
/p:QuietRestoreBinaryLog="$binary_log" \
297297
/p:ArcadeBuildFromSource=$source_build \
298+
/p:BUILDING_USING_DOTNET=false \
298299
$properties
299300
fi
300301
}

src/Compiler/FSharp.Compiler.Service.fsproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,11 @@
488488
</None>
489489
</ItemGroup>
490490

491+
<PropertyGroup Condition="'$(BUILDING_USING_DOTNET)' == 'true'">
492+
<OutputPath>$(ArtifactsDir)/bin/$(MSBuildProjectName)/$(Configuration)/</OutputPath>
493+
<IntermediateOutputPath>$(ArtifactsDir)obj/$(MSBuildProjectName)/$(Configuration)/</IntermediateOutputPath>
494+
</PropertyGroup>
495+
491496
<ItemGroup Condition="'$(BUILDING_USING_DOTNET)' == 'true'">
492497
<!-- We are setting TFM explicitly here, since we are only using fslexyacc's dlls in msbuild -->
493498
<ProjectReference Include="$(RepoRoot)\buildtools\fslex\fslex.fsproj" ReferenceOutputAssembly="False">

src/FSharp.DependencyManager.Nuget/FSharp.DependencyManager.Nuget.fsproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818
<CompressMetadata Condition="'$(CompressAllMetadata)' != 'true'">false</CompressMetadata>
1919
</PropertyGroup>
2020

21+
<PropertyGroup Condition="'$(BUILDING_USING_DOTNET)' == 'true'">
22+
<OutputPath>$(ArtifactsDir)/bin/$(MSBuildProjectName)/$(Configuration)/</OutputPath>
23+
<IntermediateOutputPath>$(ArtifactsDir)obj/$(MSBuildProjectName)/$(Configuration)/</IntermediateOutputPath>
24+
</PropertyGroup>
25+
2126
<Target Name="CopyToBuiltBin" BeforeTargets="BuiltProjectOutputGroup" AfterTargets="CoreCompile">
2227
<PropertyGroup>
2328
<BuildOutputGroupLocation>$(BaseOutputPath)\$(Configuration)\$(TargetFramework)</BuildOutputGroupLocation>

src/fsc/fscProject/fsc.fsproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
<PlatformTarget Condition="'$(TargetFramework)' == 'net472'">x86</PlatformTarget>
1616
</PropertyGroup>
1717

18+
<PropertyGroup Condition="'$(BUILDING_USING_DOTNET)' == 'true'">
19+
<OutputPath>$(ArtifactsDir)/bin/$(MSBuildProjectName)/$(Configuration)/</OutputPath>
20+
<IntermediateOutputPath>$(ArtifactsDir)obj/$(MSBuildProjectName)/$(Configuration)/</IntermediateOutputPath>
21+
</PropertyGroup>
22+
1823
<Import Project="$([MSBuild]::GetPathOfFileAbove('fsc.targets', '$(MSBuildThisFileDirectory)../'))" />
1924

2025
</Project>

src/fsi/fsiProject/fsi.fsproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
<PlatformTarget Condition="'$(TargetFramework)' == 'net472'">x86</PlatformTarget>
1616
</PropertyGroup>
1717

18+
<PropertyGroup Condition="'$(BUILDING_USING_DOTNET)' == 'true'">
19+
<OutputPath>$(ArtifactsDir)/bin/$(MSBuildProjectName)/$(Configuration)/</OutputPath>
20+
<IntermediateOutputPath>$(ArtifactsDir)obj/$(MSBuildProjectName)/$(Configuration)/</IntermediateOutputPath>
21+
</PropertyGroup>
22+
1823
<Import Project="$([MSBuild]::GetPathOfFileAbove('fsi.targets', '$(MSBuildThisFileDirectory)../'))" />
1924

2025
</Project>

0 commit comments

Comments
 (0)