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
1 change: 1 addition & 0 deletions NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<!-- End: Package sources from dotnet-runtime -->
<!-- Begin: Package sources from dotnet-templating -->
<add key="darc-pub-dotnet-templating-aebad5e" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-templating-aebad5e6/nuget/v3/index.json" />
<add key="darc-pub-dotnet-templating-aebad5e-1" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-templating-aebad5e6-1/nuget/v3/index.json" />
<!-- End: Package sources from dotnet-templating -->
<!-- Begin: Package sources from dotnet-windowsdesktop -->
<!-- End: Package sources from dotnet-windowsdesktop -->
Expand Down
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>8042d61b17540e49e53569e3728d2faa1c596583</Sha>
</Dependency>
<Dependency Name="Microsoft.Build" Version="17.7.0-preview-23217-02">
<Dependency Name="Microsoft.Build" Version="17.7.0-preview-23221-02">
<Uri>https://github.com/dotnet/msbuild</Uri>
<Sha>2cbc8b6aef648cf21c6a68a0dab7fe09a614e475</Sha>
<Sha>ac3f5ad89f3f04d080986607d504a838ed622fb9</Sha>
</Dependency>
<Dependency Name="Microsoft.Build.Localization" Version="17.7.0-preview-23217-02">
<Dependency Name="Microsoft.Build.Localization" Version="17.7.0-preview-23221-02">
<Uri>https://github.com/dotnet/msbuild</Uri>
<Sha>2cbc8b6aef648cf21c6a68a0dab7fe09a614e475</Sha>
<Sha>ac3f5ad89f3f04d080986607d504a838ed622fb9</Sha>
</Dependency>
<Dependency Name="Microsoft.SourceBuild.Intermediate.msbuild" Version="17.7.0-preview-23217-02">
<Dependency Name="Microsoft.SourceBuild.Intermediate.msbuild" Version="17.7.0-preview-23221-02">
<Uri>https://github.com/dotnet/msbuild</Uri>
<Sha>2cbc8b6aef648cf21c6a68a0dab7fe09a614e475</Sha>
<Sha>ac3f5ad89f3f04d080986607d504a838ed622fb9</Sha>
</Dependency>
<Dependency Name="Microsoft.FSharp.Compiler" Version="12.5.0-beta.23219.3">
<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-23217-02</MicrosoftBuildPackageVersion>
<MicrosoftBuildPackageVersion>17.7.0-preview-23221-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-23217-02</MicrosoftBuildLocalizationPackageVersion>
<MicrosoftBuildLocalizationPackageVersion>17.7.0-preview-23221-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,6 +239,11 @@ 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>
</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();
}

[RequiresMSBuildVersionTheory("17.7.0")]
[Theory]
[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,6 +9,7 @@
using Xunit.Abstractions;
using Microsoft.NET.TestFramework.Assertions;
using Microsoft.NET.TestFramework.ProjectConstruction;
using System.Collections.Generic;

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

[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)
[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)
{
TestProject testProject = new()
TestProject testProject = new TestProject()
{
Name = "ProduceRefAssembly",
IsExe = true,
TargetFrameworks = targetFramework
};

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

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().BeTrue();
File.Exists(filePath).Should().Be(expectedExists);
}
}
}