Skip to content

Commit 3d85b48

Browse files
author
msftbot[bot]
authored
Merge pull request #43530 from dotnet/merges/release/dev16.6-to-release/dev16.6-vs-deps
Merge release/dev16.6 to release/dev16.6-vs-deps
2 parents 57df05e + 52a56c4 commit 3d85b48

File tree

5 files changed

+28
-16
lines changed

5 files changed

+28
-16
lines changed

eng/Versions.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<MajorVersion>3</MajorVersion>
99
<MinorVersion>6</MinorVersion>
1010
<PatchVersion>0</PatchVersion>
11-
<PreReleaseVersionLabel>3</PreReleaseVersionLabel>
11+
<PreReleaseVersionLabel>4</PreReleaseVersionLabel>
1212
<VersionPrefix>$(MajorVersion).$(MinorVersion).$(PatchVersion)</VersionPrefix>
1313
<!--
1414
By default the assembly version in official builds is "$(MajorVersion).$(MinorVersion).0.0".

src/Tools/BuildBoss/ProjectCheckerUtil.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ private bool CheckPackageReferences(TextWriter textWriter)
131131
var name = packageRef.Name.Replace(".", "").Replace("-", "");
132132
var floatingName = $"$({name}Version)";
133133
var fixedName = $"$({name}FixedVersion)";
134-
if (packageRef.Version != floatingName && packageRef.Version != fixedName)
134+
if (packageRef.Version != floatingName && packageRef.Version != fixedName &&
135+
!IsAllowedFloatingVersion(packageRef, ProjectFilePath))
135136
{
136137
textWriter.WriteLine($"PackageReference {packageRef.Name} has incorrect version {packageRef.Version}");
137138
textWriter.WriteLine($"Allowed values are {floatingName} or {fixedName}");
@@ -140,6 +141,10 @@ private bool CheckPackageReferences(TextWriter textWriter)
140141
}
141142

142143
return allGood;
144+
145+
static bool IsAllowedFloatingVersion(PackageReference packageReference, string projectFilePath)
146+
=> packageReference.Name == "Microsoft.Build.Framework" &&
147+
Path.GetFileName(projectFilePath) == "Microsoft.CodeAnalysis.Workspaces.MSBuild.csproj";
143148
}
144149

145150
private bool CheckInternalsVisibleTo(TextWriter textWriter)

src/Workspaces/Core/MSBuild/MSBuild/MSBuildWorkspace.cs

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -170,12 +170,13 @@ private string GetAbsolutePath(string path, string baseDirectoryPath)
170170
/// current working directory.</param>
171171
/// <param name="progress">An optional <see cref="IProgress{T}"/> that will receive updates as the solution is opened.</param>
172172
/// <param name="cancellationToken">An optional <see cref="CancellationToken"/> to allow cancellation of this operation.</param>
173-
// 3.6 BACKCOMPAT OVERLOAD -- DO NOT TOUCH
173+
#pragma warning disable RS0026 // Special case to avoid ILogger type getting loaded in downstream clients
174174
public Task<Solution> OpenSolutionAsync(
175+
#pragma warning restore RS0026
175176
string solutionFilePath,
176-
IProgress<ProjectLoadProgress> progress,
177-
CancellationToken cancellationToken)
178-
=> OpenSolutionAsync(solutionFilePath, progress, msbuildLogger: null, cancellationToken);
177+
IProgress<ProjectLoadProgress> progress = null,
178+
CancellationToken cancellationToken = default)
179+
=> OpenSolutionAsync(solutionFilePath, msbuildLogger: null, progress, cancellationToken);
179180

180181
/// <summary>
181182
/// Open a solution file and all referenced projects.
@@ -185,10 +186,12 @@ public Task<Solution> OpenSolutionAsync(
185186
/// <param name="progress">An optional <see cref="IProgress{T}"/> that will receive updates as the solution is opened.</param>
186187
/// <param name="msbuildLogger">An optional <see cref="ILogger"/> that will log msbuild results.</param>
187188
/// <param name="cancellationToken">An optional <see cref="CancellationToken"/> to allow cancellation of this operation.</param>
189+
#pragma warning disable RS0026 // Special case to avoid ILogger type getting loaded in downstream clients
188190
public async Task<Solution> OpenSolutionAsync(
191+
#pragma warning restore RS0026
189192
string solutionFilePath,
193+
ILogger msbuildLogger,
190194
IProgress<ProjectLoadProgress> progress = null,
191-
ILogger msbuildLogger = null,
192195
CancellationToken cancellationToken = default)
193196
{
194197
if (solutionFilePath == null)
@@ -215,12 +218,13 @@ public async Task<Solution> OpenSolutionAsync(
215218
/// current working directory.</param>
216219
/// <param name="progress">An optional <see cref="IProgress{T}"/> that will receive updates as the project is opened.</param>
217220
/// <param name="cancellationToken">An optional <see cref="CancellationToken"/> to allow cancellation of this operation.</param>
218-
// 3.6 BACKCOMPAT OVERLOAD -- DO NOT TOUCH
221+
#pragma warning disable RS0026 // Special case to avoid ILogger type getting loaded in downstream clients
219222
public Task<Project> OpenProjectAsync(
223+
#pragma warning restore RS0026
220224
string projectFilePath,
221-
IProgress<ProjectLoadProgress> progress,
222-
CancellationToken cancellationToken)
223-
=> OpenProjectAsync(projectFilePath, progress, msbuildLogger: null, cancellationToken);
225+
IProgress<ProjectLoadProgress> progress = null,
226+
CancellationToken cancellationToken = default)
227+
=> OpenProjectAsync(projectFilePath, msbuildLogger: null, progress, cancellationToken);
224228

225229
/// <summary>
226230
/// Open a project file and all referenced projects.
@@ -230,10 +234,12 @@ public Task<Project> OpenProjectAsync(
230234
/// <param name="progress">An optional <see cref="IProgress{T}"/> that will receive updates as the project is opened.</param>
231235
/// <param name="msbuildLogger">An optional <see cref="ILogger"/> that will log msbuild results..</param>
232236
/// <param name="cancellationToken">An optional <see cref="CancellationToken"/> to allow cancellation of this operation.</param>
237+
#pragma warning disable RS0026 // Special case to avoid ILogger type getting loaded in downstream clients
233238
public async Task<Project> OpenProjectAsync(
239+
#pragma warning restore RS0026
234240
string projectFilePath,
241+
ILogger msbuildLogger,
235242
IProgress<ProjectLoadProgress> progress = null,
236-
ILogger msbuildLogger = null,
237243
CancellationToken cancellationToken = default)
238244
{
239245
if (projectFilePath == null)

src/Workspaces/Core/MSBuild/Microsoft.CodeAnalysis.Workspaces.MSBuild.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
</ItemGroup>
2929
<ItemGroup>
3030
<PackageReference Include="Microsoft.Build" Version="$(MicrosoftBuildVersion)" ExcludeAssets="Runtime" PrivateAssets="All" />
31+
<PackageReference Include="Microsoft.Build.Framework" Version="[$(MicrosoftBuildVersion),)" ExcludeAssets="Runtime" />
3132
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="$(MicrosoftBuildTasksCoreVersion)" ExcludeAssets="Runtime" PrivateAssets="All" />
3233
</ItemGroup>
3334
<ItemGroup>
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Microsoft.CodeAnalysis.MSBuild.MSBuildProjectLoader.LoadProjectInfoAsync(string projectFilePath, Microsoft.CodeAnalysis.MSBuild.ProjectMap projectMap = null, System.IProgress<Microsoft.CodeAnalysis.MSBuild.ProjectLoadProgress> progress = null, Microsoft.Build.Framework.ILogger msbuildLogger = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task<System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.ProjectInfo>>
22
Microsoft.CodeAnalysis.MSBuild.MSBuildProjectLoader.LoadSolutionInfoAsync(string solutionFilePath, System.IProgress<Microsoft.CodeAnalysis.MSBuild.ProjectLoadProgress> progress = null, Microsoft.Build.Framework.ILogger msbuildLogger = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.SolutionInfo>
3-
Microsoft.CodeAnalysis.MSBuild.MSBuildWorkspace.OpenProjectAsync(string projectFilePath, System.IProgress<Microsoft.CodeAnalysis.MSBuild.ProjectLoadProgress> progress = null, Microsoft.Build.Framework.ILogger msbuildLogger = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Project>
4-
Microsoft.CodeAnalysis.MSBuild.MSBuildWorkspace.OpenProjectAsync(string projectFilePath, System.IProgress<Microsoft.CodeAnalysis.MSBuild.ProjectLoadProgress> progress, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Project>
5-
Microsoft.CodeAnalysis.MSBuild.MSBuildWorkspace.OpenSolutionAsync(string solutionFilePath, System.IProgress<Microsoft.CodeAnalysis.MSBuild.ProjectLoadProgress> progress, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Solution>
6-
Microsoft.CodeAnalysis.MSBuild.MSBuildWorkspace.OpenSolutionAsync(string solutionFilePath, System.IProgress<Microsoft.CodeAnalysis.MSBuild.ProjectLoadProgress> progress = null, Microsoft.Build.Framework.ILogger msbuildLogger = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Solution>
3+
Microsoft.CodeAnalysis.MSBuild.MSBuildWorkspace.OpenProjectAsync(string projectFilePath, Microsoft.Build.Framework.ILogger msbuildLogger, System.IProgress<Microsoft.CodeAnalysis.MSBuild.ProjectLoadProgress> progress = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Project>
4+
Microsoft.CodeAnalysis.MSBuild.MSBuildWorkspace.OpenProjectAsync(string projectFilePath, System.IProgress<Microsoft.CodeAnalysis.MSBuild.ProjectLoadProgress> progress = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Project>
5+
Microsoft.CodeAnalysis.MSBuild.MSBuildWorkspace.OpenSolutionAsync(string solutionFilePath, Microsoft.Build.Framework.ILogger msbuildLogger, System.IProgress<Microsoft.CodeAnalysis.MSBuild.ProjectLoadProgress> progress = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Solution>
6+
Microsoft.CodeAnalysis.MSBuild.MSBuildWorkspace.OpenSolutionAsync(string solutionFilePath, System.IProgress<Microsoft.CodeAnalysis.MSBuild.ProjectLoadProgress> progress = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Solution>

0 commit comments

Comments
 (0)