Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,17 @@
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
<Sha>0a396acafe9a7d46bce11f4338dbb3dd0d99b1b4</Sha>
</Dependency>
<Dependency Name="Microsoft.Build" Version="17.7.0-preview-23212-01">
<Dependency Name="Microsoft.Build" Version="17.7.0-preview-23212-02">
<Uri>https://github.com/dotnet/msbuild</Uri>
<Sha>073c84ec2bb2de1e709eb1326402a8760d5651d3</Sha>
<Sha>cb5e760644d04def33c0cafcaef2a6f496fc68cc</Sha>
</Dependency>
<Dependency Name="Microsoft.Build.Localization" Version="17.7.0-preview-23212-01">
<Dependency Name="Microsoft.Build.Localization" Version="17.7.0-preview-23212-02">
<Uri>https://github.com/dotnet/msbuild</Uri>
<Sha>073c84ec2bb2de1e709eb1326402a8760d5651d3</Sha>
<Sha>cb5e760644d04def33c0cafcaef2a6f496fc68cc</Sha>
</Dependency>
<Dependency Name="Microsoft.SourceBuild.Intermediate.msbuild" Version="17.7.0-preview-23212-01">
<Dependency Name="Microsoft.SourceBuild.Intermediate.msbuild" Version="17.7.0-preview-23212-02">
<Uri>https://github.com/dotnet/msbuild</Uri>
<Sha>073c84ec2bb2de1e709eb1326402a8760d5651d3</Sha>
<Sha>cb5e760644d04def33c0cafcaef2a6f496fc68cc</Sha>
</Dependency>
<Dependency Name="Microsoft.FSharp.Compiler" Version="12.5.0-beta.23211.2">
<Uri>https://github.com/dotnet/fsharp</Uri>
Expand Down
4 changes: 2 additions & 2 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
</PropertyGroup>
<PropertyGroup>
<!-- Dependencies from https://github.com/Microsoft/msbuild -->
<MicrosoftBuildPackageVersion>17.7.0-preview-23212-01</MicrosoftBuildPackageVersion>
<MicrosoftBuildPackageVersion>17.7.0-preview-23212-02</MicrosoftBuildPackageVersion>
<MicrosoftBuildCurrentPackageVersion>$(MicrosoftBuildPackageVersion)</MicrosoftBuildCurrentPackageVersion>
<!-- Some tasks and the resolver will need to run in an MSBuild that is older than the very latest,
so target one that matches the version in minimumMSBuildVersion.
Expand All @@ -115,7 +115,7 @@
<MicrosoftBuildPackageVersion Condition="exists('$(RepoRoot)\src\Layout\redist\minimumMSBuildVersion') and '$(DotNetBuildFromSource)' != 'true'">$([System.IO.File]::ReadAllText('$(RepoRoot)\src\Layout\redist\minimumMSBuildVersion').Trim())</MicrosoftBuildPackageVersion>
<MicrosoftBuildFrameworkPackageVersion>$(MicrosoftBuildPackageVersion)</MicrosoftBuildFrameworkPackageVersion>
<MicrosoftBuildRuntimePackageVersion>$(MicrosoftBuildPackageVersion)</MicrosoftBuildRuntimePackageVersion>
<MicrosoftBuildLocalizationPackageVersion>17.7.0-preview-23212-01</MicrosoftBuildLocalizationPackageVersion>
<MicrosoftBuildLocalizationPackageVersion>17.7.0-preview-23212-02</MicrosoftBuildLocalizationPackageVersion>
<MicrosoftBuildUtilitiesCorePackageVersion>$(MicrosoftBuildPackageVersion)</MicrosoftBuildUtilitiesCorePackageVersion>
<MicrosoftBuildTasksCorePackageVersion>$(MicrosoftBuildPackageVersion)</MicrosoftBuildTasksCorePackageVersion>
<MicrosoftBuildVersion>$(MicrosoftBuildPackageVersion)</MicrosoftBuildVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,6 @@ Copyright (c) .NET Foundation. All rights reserved.
<AppendTargetFrameworkToOutputPath Condition="'$(AppendTargetFrameworkToOutputPath)' == ''">true</AppendTargetFrameworkToOutputPath>
</PropertyGroup>

<PropertyGroup>
<ProduceReferenceAssembly Condition="'$(ProduceReferenceAssembly)' == '' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), 5.0)) and ('$(ProduceOnlyReferenceAssembly)' != 'true') and '$(MSBuildProjectExtension)' != '.fsproj'" >true</ProduceReferenceAssembly>
<ProduceReferenceAssembly Condition="'$(ProduceReferenceAssembly)' == '' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), 7.0)) and ('$(ProduceOnlyReferenceAssembly)' != 'true') and '$(MSBuildProjectExtension)' == '.fsproj'" >true</ProduceReferenceAssembly>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Who from F# do we need to vet this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vzarytovskii is the go-to.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think any action is needed from us? Now it will set it to true for all projects when using .net8?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that, combined with the MS Build change, ref assemblies will be produced for all F# projects when using VS 17.7, irrespective of the target framework.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think it should be fine, and leaves us window to make changes, if needed, before net8 release.

</PropertyGroup>

<!--
Append $(TargetFramework) directory to output and intermediate paths to prevent bin clashes between
targets.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,7 @@ public void It_errors_when_publishing_single_file_without_apphost()
.Pass();
}

[Theory]
[RequiresMSBuildVersionTheory("17.7.0")]
[InlineData(true)]
[InlineData(false)]
public void It_builds_the_project_successfully_with_only_reference_assembly_set(bool produceOnlyReferenceAssembly)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
using Xunit.Abstractions;
using Microsoft.NET.TestFramework.Assertions;
using Microsoft.NET.TestFramework.ProjectConstruction;
using System.Collections.Generic;

namespace Microsoft.NET.Build.Tests
{
Expand All @@ -18,26 +17,35 @@ public class GivenThatWeWantToProduceReferenceAssembly : SdkTest
public GivenThatWeWantToProduceReferenceAssembly(ITestOutputHelper log) : base(log)
{}

[RequiresMSBuildVersionTheory("16.8.0")]
[InlineData("netcoreapp3.1", false)]
[InlineData(ToolsetInfo.CurrentTargetFramework, true)]
public void It_produces_ref_assembly_for_appropriate_frameworks(string targetFramework, bool expectedExists)
[RequiresMSBuildVersionTheory("17.7.0")]
[InlineData("netcoreapp3.1", ".csproj")]
[InlineData("net5.0", ".csproj")]
[InlineData("net5.0", ".fsproj")]
[InlineData("net6.0", ".csproj")]
[InlineData("net6.0", ".fsproj")]
[InlineData("net7.0", ".csproj")]
[InlineData("net7.0", ".fsproj")]
#pragma warning disable xUnit1025 // InlineData duplicates
[InlineData(ToolsetInfo.CurrentTargetFramework, ".csproj")]
[InlineData(ToolsetInfo.CurrentTargetFramework, ".fsproj")]
#pragma warning restore xUnit1025 // InlineData duplicates
public void It_produces_ref_assembly_for_appropriate_frameworks(string targetFramework, string extension)
{
TestProject testProject = new TestProject()
TestProject testProject = new()
{
Name = "ProduceRefAssembly",
IsExe = true,
TargetFrameworks = targetFramework
};

var testAsset = _testAssetsManager.CreateTestProject(testProject, identifier: targetFramework);
var testAsset = _testAssetsManager.CreateTestProject(testProject, identifier: targetFramework + extension, targetExtension: extension);

var buildCommand = new BuildCommand(testAsset);
buildCommand.Execute()
.Should()
.Pass();
var filePath = Path.Combine(testAsset.Path, testProject.Name, "obj", "Debug", targetFramework, "ref", $"{testProject.Name}.dll");
File.Exists(filePath).Should().Be(expectedExists);
File.Exists(filePath).Should().BeTrue();
}
}
}