Skip to content

Commit 0f9436d

Browse files
[main] Update dependencies from dotnet/msbuild (#18640)
1 parent fb81e9c commit 0f9436d

File tree

9 files changed

+88
-26
lines changed

9 files changed

+88
-26
lines changed

eng/Version.Details.props

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ This file should be imported by eng/Versions.props
66
<Project>
77
<PropertyGroup>
88
<!-- dotnet/msbuild dependencies -->
9-
<MicrosoftBuildPackageVersion>17.15.0-preview-25278-01</MicrosoftBuildPackageVersion>
10-
<MicrosoftBuildFrameworkPackageVersion>17.15.0-preview-25278-01</MicrosoftBuildFrameworkPackageVersion>
11-
<MicrosoftBuildTasksCorePackageVersion>17.15.0-preview-25278-01</MicrosoftBuildTasksCorePackageVersion>
12-
<MicrosoftBuildUtilitiesCorePackageVersion>17.15.0-preview-25278-01</MicrosoftBuildUtilitiesCorePackageVersion>
9+
<MicrosoftBuildPackageVersion>18.0.0-preview-25465-08</MicrosoftBuildPackageVersion>
10+
<MicrosoftBuildFrameworkPackageVersion>18.0.0-preview-25465-08</MicrosoftBuildFrameworkPackageVersion>
11+
<MicrosoftBuildTasksCorePackageVersion>18.0.0-preview-25465-08</MicrosoftBuildTasksCorePackageVersion>
12+
<MicrosoftBuildUtilitiesCorePackageVersion>18.0.0-preview-25465-08</MicrosoftBuildUtilitiesCorePackageVersion>
1313
<!-- dotnet/runtime dependencies -->
1414
<SystemCollectionsImmutablePackageVersion>9.0.0</SystemCollectionsImmutablePackageVersion>
1515
<SystemComponentModelCompositionPackageVersion>9.0.0</SystemComponentModelCompositionPackageVersion>

eng/Version.Details.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22
<Dependencies>
33
<Source Uri="https://github.com/dotnet/dotnet" Mapping="fsharp" Sha="8ea69c337be69385ff7eb44b2a54db78010110d8" BarId="282240" />
44
<ProductDependencies>
5-
<Dependency Name="Microsoft.Build" Version="17.15.0-preview-25278-01">
5+
<Dependency Name="Microsoft.Build" Version="18.0.0-preview-25465-08">
66
<Uri>https://github.com/dotnet/msbuild</Uri>
7-
<Sha>6de64741f6440bb6730d9a342934ce49d600fcc9</Sha>
7+
<Sha>36b870ef0e3bc607c96e23f1f2d20125947be598</Sha>
88
</Dependency>
9-
<Dependency Name="Microsoft.Build.Framework" Version="17.15.0-preview-25278-01">
9+
<Dependency Name="Microsoft.Build.Framework" Version="18.0.0-preview-25465-08">
1010
<Uri>https://github.com/dotnet/msbuild</Uri>
11-
<Sha>6de64741f6440bb6730d9a342934ce49d600fcc9</Sha>
11+
<Sha>36b870ef0e3bc607c96e23f1f2d20125947be598</Sha>
1212
</Dependency>
13-
<Dependency Name="Microsoft.Build.Tasks.Core" Version="17.15.0-preview-25278-01">
13+
<Dependency Name="Microsoft.Build.Tasks.Core" Version="18.0.0-preview-25465-08">
1414
<Uri>https://github.com/dotnet/msbuild</Uri>
15-
<Sha>6de64741f6440bb6730d9a342934ce49d600fcc9</Sha>
15+
<Sha>36b870ef0e3bc607c96e23f1f2d20125947be598</Sha>
1616
</Dependency>
17-
<Dependency Name="Microsoft.Build.Utilities.Core" Version="17.15.0-preview-25278-01">
17+
<Dependency Name="Microsoft.Build.Utilities.Core" Version="18.0.0-preview-25465-08">
1818
<Uri>https://github.com/dotnet/msbuild</Uri>
19-
<Sha>6de64741f6440bb6730d9a342934ce49d600fcc9</Sha>
19+
<Sha>36b870ef0e3bc607c96e23f1f2d20125947be598</Sha>
2020
</Dependency>
2121
<Dependency Name="System.Reflection.Metadata" Version="9.0.0">
2222
<Uri>https://github.com/dotnet/runtime</Uri>

src/Compiler/Facilities/SimulatedMSBuildReferenceResolver.fs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,23 @@ let private Net472 = "v4.7.2"
4343
[<Literal>]
4444
let private Net48 = "v4.8"
4545

46+
[<Literal>]
47+
let private Net481 = "v4.8.1"
48+
4649
let SupportedDesktopFrameworkVersions =
47-
[ Net48; Net472; Net471; Net47; Net462; Net461; Net46; Net452; Net451; Net45 ]
50+
[
51+
Net481
52+
Net48
53+
Net472
54+
Net471
55+
Net47
56+
Net462
57+
Net461
58+
Net46
59+
Net452
60+
Net451
61+
Net45
62+
]
4863

4964
let private SimulatedMSBuildResolver =
5065

src/LegacyMSBuildResolver/LegacyMSBuildReferenceResolver.fs

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,23 @@ let private Net472 = "v4.7.2"
6969
[<Literal>]
7070
let private Net48 = "v4.8"
7171

72+
[<Literal>]
73+
let private Net481 = "v4.8.1"
74+
7275
let SupportedDesktopFrameworkVersions =
73-
[ Net48; Net472; Net471; Net47; Net462; Net461; Net46; Net452; Net451; Net45 ]
76+
[
77+
Net481
78+
Net48
79+
Net472
80+
Net471
81+
Net47
82+
Net462
83+
Net461
84+
Net46
85+
Net452
86+
Net451
87+
Net45
88+
]
7489

7590
/// Get the path to the .NET Framework implementation assemblies by using ToolLocationHelper.GetPathToDotNetFramework
7691
/// This is only used to specify the "last resort" path for assembly resolution.
@@ -87,6 +102,7 @@ let GetPathToDotNetFrameworkImplementationAssemblies v : string list =
87102
| Net471 -> Some TargetDotNetFrameworkVersion.Version471
88103
| Net472 -> Some TargetDotNetFrameworkVersion.Version472
89104
| Net48 -> Some TargetDotNetFrameworkVersion.Version48
105+
| Net481 -> Some TargetDotNetFrameworkVersion.Version481
90106
| _ ->
91107
assert false
92108
None
@@ -114,7 +130,9 @@ let GetPathToDotNetFrameworkReferenceAssemblies version =
114130
let HighestInstalledRefAssembliesOrDotNETFramework () =
115131
let getHighestInstalledDotNETFramework () =
116132
try
117-
if not (isNull (box (ToolLocationHelper.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Version48)))) then
133+
if not (isNull (box (ToolLocationHelper.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Version481)))) then
134+
Net481
135+
elif not (isNull (box (ToolLocationHelper.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Version48)))) then
118136
Net48
119137
elif not (isNull (box (ToolLocationHelper.GetPathToDotNetFramework(TargetDotNetFrameworkVersion.Version472)))) then
120138
Net472

tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.IL+parseNamed@5311::Invoke([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1<System.Tuple`4<string,FSharp.Compiler.AbstractIL.IL+ILType,bool,FSharp.Compiler.AbstractIL.IL+ILAttribElem>>, int32, int32)][offset 0x00000087][found Char] Unexpected type on the stack.
8383
[IL]: Error [StackUnexpected]: : Internal.Utilities.Collections.Utils::shortPath(string)][offset 0x00000048][found Char] Unexpected type on the stack.
8484
[IL]: Error [StackUnexpected]: : Internal.Utilities.FSharpEnvironment+probePathForDotnetHost@317::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000028][found Char] Unexpected type on the stack.
85-
[IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.SimulatedMSBuildReferenceResolver+Pipe #6 input at line 68@68::FSharp.Compiler.CodeAnalysis.ILegacyReferenceResolver.Resolve([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyResolutionEnvironment, [S.P.CoreLib]System.Tuple`2<string,string>[], string, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1<string>, string, string, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1<string>, string, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<string,Microsoft.FSharp.Core.Unit>, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<bool,Microsoft.FSharp.Core.FSharpFunc`2<string,Microsoft.FSharp.Core.FSharpFunc`2<string,Microsoft.FSharp.Core.Unit>>>)][offset 0x0000034D][found Char] Unexpected type on the stack.
85+
[IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.SimulatedMSBuildReferenceResolver+Pipe #6 input at line 83@83::FSharp.Compiler.CodeAnalysis.ILegacyReferenceResolver.Resolve([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyResolutionEnvironment, [S.P.CoreLib]System.Tuple`2<string,string>[], string, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1<string>, string, string, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1<string>, string, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<string,Microsoft.FSharp.Core.Unit>, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<bool,Microsoft.FSharp.Core.FSharpFunc`2<string,Microsoft.FSharp.Core.FSharpFunc`2<string,Microsoft.FSharp.Core.Unit>>>)][offset 0x0000034D][found Char] Unexpected type on the stack.
8686
[IL]: Error [StackUnexpected]: : <StartupCode$FSharp-Compiler-Service>.$FSharp.Compiler.DiagnosticsLogger::.cctor()][offset 0x000000CD][found Char] Unexpected type on the stack.
8787
[IL]: Error [CallVirtOnValueType]: : FSharp.Compiler.Text.RangeModule+comparer@590::System.Collections.Generic.IEqualityComparer<FSharp.Compiler.Text.Range>.GetHashCode([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000002] Callvirt on a value type method.
8888
[IL]: Error [StackUnexpected]: : Internal.Utilities.PathMapModule::applyDir([FSharp.Compiler.Service]Internal.Utilities.PathMap, string)][offset 0x00000037][found Char] Unexpected type on the stack.

tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.IL::parseNamed@5310(uint8[], [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1<System.Tuple`4<string,FSharp.Compiler.AbstractIL.IL+ILType,bool,FSharp.Compiler.AbstractIL.IL+ILAttribElem>>, int32, int32)][offset 0x0000007E][found Char] Unexpected type on the stack.
110110
[IL]: Error [StackUnexpected]: : Internal.Utilities.Collections.Utils::shortPath(string)][offset 0x0000003A][found Char] Unexpected type on the stack.
111111
[IL]: Error [StackUnexpected]: : Internal.Utilities.FSharpEnvironment::probePathForDotnetHost@316([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x0000002A][found Char] Unexpected type on the stack.
112-
[IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.SimulatedMSBuildReferenceResolver+SimulatedMSBuildResolver@68::FSharp.Compiler.CodeAnalysis.ILegacyReferenceResolver.Resolve([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyResolutionEnvironment, [S.P.CoreLib]System.Tuple`2<string,string>[], string, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1<string>, string, string, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1<string>, string, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<string,Microsoft.FSharp.Core.Unit>, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<bool,Microsoft.FSharp.Core.FSharpFunc`2<string,Microsoft.FSharp.Core.FSharpFunc`2<string,Microsoft.FSharp.Core.Unit>>>)][offset 0x000002F5][found Char] Unexpected type on the stack.
112+
[IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.SimulatedMSBuildReferenceResolver+SimulatedMSBuildResolver@83::FSharp.Compiler.CodeAnalysis.ILegacyReferenceResolver.Resolve([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyResolutionEnvironment, [S.P.CoreLib]System.Tuple`2<string,string>[], string, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1<string>, string, string, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1<string>, string, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<string,Microsoft.FSharp.Core.Unit>, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<bool,Microsoft.FSharp.Core.FSharpFunc`2<string,Microsoft.FSharp.Core.FSharpFunc`2<string,Microsoft.FSharp.Core.Unit>>>)][offset 0x000002F5][found Char] Unexpected type on the stack.
113113
[IL]: Error [StackUnexpected]: : <StartupCode$FSharp-Compiler-Service>.$FSharp.Compiler.DiagnosticsLogger::.cctor()][offset 0x000000B6][found Char] Unexpected type on the stack.
114114
[IL]: Error [CallVirtOnValueType]: : FSharp.Compiler.Text.RangeModule+comparer@590::System.Collections.Generic.IEqualityComparer<FSharp.Compiler.Text.Range>.GetHashCode([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000002] Callvirt on a value type method.
115115
[IL]: Error [StackUnexpected]: : Internal.Utilities.PathMapModule::applyDir([FSharp.Compiler.Service]Internal.Utilities.PathMap, string)][offset 0x00000035][found Char] Unexpected type on the stack.

vsintegration/tests/Salsa/VsMocks.fs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1375,6 +1375,7 @@ module internal VsMocks =
13751375
let vsTargetFrameworkAssemblies40 = vsTargetFrameworkAssembliesN 0x40000u
13761376
let vsTargetFrameworkAssemblies45 = vsTargetFrameworkAssembliesN 0x40005u
13771377
let vsTargetFrameworkAssemblies46 = vsTargetFrameworkAssembliesN 0x40006u
1378+
let vsTargetFrameworkAssemblies472 = vsTargetFrameworkAssembliesN 0x40007u
13781379

13791380
let vsFrameworkMultiTargeting =
13801381
{ new IVsFrameworkMultiTargeting with
@@ -1601,6 +1602,11 @@ module internal VsMocks =
16011602
sp.AddService(typeof<SVsTargetFrameworkAssemblies>, box vsTargetFrameworkAssemblies46, false)
16021603
sp.AddService(typeof<SVsFrameworkMultiTargeting>, box vsFrameworkMultiTargeting, false)
16031604
sp, ccn
1605+
let MakeMockServiceProviderAndConfigChangeNotifier472() =
1606+
let sp, ccn = MakeMockServiceProviderAndConfigChangeNotifierNoTargetFrameworkAssembliesService()
1607+
sp.AddService(typeof<SVsTargetFrameworkAssemblies>, box vsTargetFrameworkAssemblies472, false)
1608+
sp.AddService(typeof<SVsFrameworkMultiTargeting>, box vsFrameworkMultiTargeting, false)
1609+
sp, ccn
16041610

16051611
// This is the mock thing that all tests, except the multitargeting tests call.
16061612
// By default, let it use the 4.0 assembly version.

vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.ProjectItems.fs

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,35 @@ open UnitTests.TestLib.Utils.Asserts
99
open UnitTests.TestLib.ProjectSystem
1010
open Microsoft.VisualStudio.FSharp.ProjectSystem
1111

12+
[<AutoOpen>]
13+
module Helpers =
14+
/// Active pattern to parse a float from an env var
15+
let (|EnvFloat|_|) (envVar: string) =
16+
match Environment.GetEnvironmentVariable(envVar) with
17+
| null | "" -> None
18+
| str ->
19+
match System.Double.TryParse(str, System.Globalization.NumberStyles.Float, System.Globalization.CultureInfo.InvariantCulture) with
20+
| true, v -> Some v
21+
| _ -> None
22+
23+
24+
/// xUnit Fact attribute that skips the test unless VISUALSTUDIOVERSION >= 18.0
25+
type Vs18OrNewerFactAttribute() =
26+
inherit FactAttribute()
27+
do
28+
match "VISUALSTUDIOVERSION" with
29+
| EnvFloat v when v >= 18.0 -> ()
30+
| EnvFloat v -> base.Skip <- $"Test requires Visual Studio 18.0 or newer (VISUALSTUDIOVERSION >= 18.0), found: {v}"
31+
| _ -> base.Skip <- "Test requires Visual Studio 18.0 or newer (VISUALSTUDIOVERSION not set)"
32+
1233

1334
type ProjectItems() =
1435
inherit TheTests()
1536

1637
//TODO: look for a way to remove the helper functions
1738
static let ANYTREE = Tree("",Nil,Nil)
1839

19-
[<Fact>]
40+
[<Vs18OrNewerFact>]
2041
member public this.``RemoveAssemblyReference.NoIVsTrackProjectDocuments2Events``() =
2142
this.MakeProjectAndDo(["file.fs"], ["System.Numerics"],"", (fun project ->
2243
let listener = project.Site.GetService(typeof<Salsa.VsMocks.IVsTrackProjectDocuments2Listener>) :?> Salsa.VsMocks.IVsTrackProjectDocuments2Listener

vsintegration/tests/UnitTests/TestLib.ProjectSystem.fs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,13 @@ type TheTests() =
120120
printfn "about to load .fsproj"
121121
project.Load(filename, null, null, 2u, &guid, &cancelled)
122122
printfn "loaded"
123+
123124
let slfpe = new SolutionListenerForProjectEvents(project.Site)
124125
project.ProjectEventsProvider <- (slfpe :> IProjectEvents)
125126
slfpe.OnAfterOpenProject((project :> IVsHierarchy), 0) |> ignore
126127
MSBuildProject.SetGlobalProperty(project.BuildProject, "UTF8Output", forceUTF8)
127128
project
128-
with
129+
with
129130
| e ->
130131
try
131132
project.Close() |> ignore
@@ -298,13 +299,14 @@ type TheTests() =
298299
File.AppendAllText(file, TheTests.FsprojTextWithProjectReferencesAndOtherFlags(compileItems, references, [], null, other, targetFramework))
299300
let sp, cnn =
300301
match targetFramework with
301-
| "v4.6" -> VsMocks.MakeMockServiceProviderAndConfigChangeNotifier46()
302-
| "v4.5" -> VsMocks.MakeMockServiceProviderAndConfigChangeNotifier45()
303-
| "v4.0" -> VsMocks.MakeMockServiceProviderAndConfigChangeNotifier40()
304-
| "v3.5" -> VsMocks.MakeMockServiceProviderAndConfigChangeNotifier35()
305-
| "v3.0" -> VsMocks.MakeMockServiceProviderAndConfigChangeNotifier30()
306-
| "v2.0" -> VsMocks.MakeMockServiceProviderAndConfigChangeNotifier20()
307-
| null -> VsMocks.MakeMockServiceProviderAndConfigChangeNotifier40()
302+
| "v4.7.2" | "4.7.2" | "4.7" | "v4.7" -> VsMocks.MakeMockServiceProviderAndConfigChangeNotifier472()
303+
| "v4.6" | "4.6" -> VsMocks.MakeMockServiceProviderAndConfigChangeNotifier46()
304+
| "v4.5" | "4.5" -> VsMocks.MakeMockServiceProviderAndConfigChangeNotifier45()
305+
| "v4.0" | "4.0" -> VsMocks.MakeMockServiceProviderAndConfigChangeNotifier40()
306+
| "v3.5" | "3.5" -> VsMocks.MakeMockServiceProviderAndConfigChangeNotifier35()
307+
| "v3.0" | "3.0" -> VsMocks.MakeMockServiceProviderAndConfigChangeNotifier30()
308+
| "v2.0" | "2.0"-> VsMocks.MakeMockServiceProviderAndConfigChangeNotifier20()
309+
| null -> VsMocks.MakeMockServiceProviderAndConfigChangeNotifier472()
308310
| _ -> failwithf "unexpected targetFramework %s" targetFramework
309311
let project = TheTests.CreateProject(file, "false", cnn, sp)
310312
try

0 commit comments

Comments
 (0)