Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
135 commits
Select commit Hold shift + click to select a range
daab954
Merge in 'release/6.0.4xx' changes
dotnet-bot Aug 26, 2022
e4044b6
Merge in 'release/6.0.4xx' changes
dotnet-bot Aug 29, 2022
fdde463
Merge in 'release/6.0.4xx' changes
dotnet-bot Sep 1, 2022
f0fc98e
Merge in 'release/6.0.4xx' changes
dotnet-bot Sep 2, 2022
3e692e4
Merge in 'release/6.0.4xx' changes
dotnet-bot Sep 6, 2022
27b6fb7
Merge in 'release/6.0.4xx' changes
dotnet-bot Sep 6, 2022
4bf3f18
Merge in 'release/6.0.4xx' changes
dotnet-bot Sep 6, 2022
59d934b
Merge in 'release/6.0.4xx' changes
dotnet-bot Sep 7, 2022
b2456d9
Merge in 'release/6.0.4xx' changes
dotnet-bot Sep 7, 2022
fa923a6
Merge in 'release/6.0.4xx' changes
dotnet-bot Sep 7, 2022
2dedad8
Update dependencies from https://dev.azure.com/dnceng/internal/_git/d…
dotnet-bot Sep 7, 2022
104ae92
[Backport] Fix Temp Paths for MSRC
nagilson Sep 7, 2022
8bbea4f
Remove localizablestrings from patch
nagilson Sep 7, 2022
0eee0f6
Additional security patch for 6.0.4xx specifically
nagilson Sep 7, 2022
1eb7b6a
Additional fixes for 6.0.4xx specifically
nagilson Sep 7, 2022
7a0e029
Dont take usings merge
nagilson Sep 7, 2022
50e767a
Merge in 'release/6.0.4xx' changes
dotnet-bot Sep 9, 2022
10149c6
Merged PR 25600: [Backport] 6.0.4xx Temp Path Changes
nagilson Sep 12, 2022
be49c1b
Merge in 'release/6.0.4xx' changes
dotnet-bot Sep 13, 2022
34931ed
Merged PR 25671: Insert nuget.client 6.3.1-rc.1 to dotnet sdk 6.0.4xx
kartheekp-ms Sep 13, 2022
417b4a5
Merged PR 25578: [internal/release/6.0.4xx] Update dependencies from …
dotnet-bot Sep 13, 2022
3d41986
Merge in 'release/6.0.4xx' changes
dotnet-bot Sep 13, 2022
e402e6e
Update dependencies from https://dev.azure.com/dnceng/internal/_git/d…
dotnet-bot Sep 14, 2022
f388773
Merge in 'release/6.0.4xx' changes
dotnet-bot Sep 14, 2022
1c174ec
update msbuild version
Forgind Sep 14, 2022
e901145
nuget.config update?
Forgind Sep 14, 2022
3433ba2
Merged PR 25752: [internal/release/6.0.4xx] Update dependencies from …
dotnet-bot Sep 14, 2022
255b6c4
Update dependencies from https://dev.azure.com/dnceng/internal/_git/d…
dotnet-bot Sep 14, 2022
e0d60e3
Update dependencies from https://dev.azure.com/dnceng/internal/_git/d…
dotnet-bot Sep 14, 2022
4f4aae6
Merged PR 25799: [internal/release/6.0.4xx] Update dependencies from …
dotnet-bot Sep 14, 2022
a3eb3d7
pull in release/6.0.4xx
Forgind Sep 15, 2022
954a276
nuget.config update
Forgind Sep 15, 2022
e87a77f
Merge from public
mmitche Sep 19, 2022
c3e567c
Merged PR 25783: Flow MSRC bits
Sep 19, 2022
2d0d15c
Merged PR 25941: Merge from public
mmitche Sep 19, 2022
cf925f7
Merge in 'release/6.0.4xx' changes
dotnet-bot Sep 20, 2022
104cf6c
Merged PR 25872: [internal/release/6.0.4xx] Update dependencies from …
dotnet-bot Sep 20, 2022
c252faf
Merged PR 26020: [internal/release/6.0.4xx] Update dependencies from …
dotnet-bot Sep 20, 2022
da945c9
Merged PR 26196: [internal/release/6.0.4xx] Update dependencies from …
dotnet-bot Sep 26, 2022
063bbf6
Merged PR 26219: [internal/release/6.0.4xx] Update dependencies from …
dotnet-bot Sep 27, 2022
5c32506
Merged PR 26225: [internal/release/6.0.4xx] Update dependencies from …
dotnet-bot Sep 27, 2022
6a37511
Merged PR 26233: [internal/release/6.0.4xx] Update dependencies from …
dotnet-bot Sep 27, 2022
bd3d691
Merge commit '6a3751154ef2a5ab57d4bc3b62c5c8fa2d278ce6' into internal…
vseanreesermsft Oct 11, 2022
5ebdc55
Merge pull request #28470 from vseanreesermsft/internal-merge-6.0.4xx…
mmitche Oct 14, 2022
5548480
Return workload manifests in defined, controllable order
dsplaisted Oct 17, 2022
bcaed25
Don't infer rid on non exe project type
nagilson Oct 17, 2022
a80d6b5
Add opt out feature and tests
nagilson Oct 18, 2022
10c3bc5
Update src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Runt…
nagilson Oct 18, 2022
47c024b
Make it a win only fact
nagilson Oct 18, 2022
0f654d6
Merge branch 'nagilson-exe-rids' of https://github.com/nagilson/sdk i…
nagilson Oct 18, 2022
fb14de3
make the test fail in the old scenario
nagilson Oct 18, 2022
d3ed325
Consider that TestProjects May be Exe Projects without Being Tagged a…
nagilson Oct 18, 2022
d97c27e
Update dependencies from https://github.com/dotnet/fsharp build 20221…
dotnet-maestro[bot] Oct 19, 2022
be79b43
Update dependencies from https://github.com/dotnet/fsharp build 20221…
dotnet-maestro[bot] Oct 19, 2022
9299986
Update dependencies from https://github.com/microsoft/vstest build 20…
dotnet-maestro[bot] Oct 19, 2022
b256814
Remove opt out feature and put it into UCR
nagilson Oct 19, 2022
2fa8837
Merge pull request #28656 from dotnet/darc-release/6.0.4xx-6fc0c66a-b…
mmitche Oct 19, 2022
d1c8744
Fix tests. Only thing remaining is to improve test quality
nagilson Oct 19, 2022
141ab83
Merge pull request #28655 from dotnet/darc-release/7.0.1xx-a8bfada8-e…
marcpopMSFT Oct 19, 2022
63b3654
Merge pull request #28627 from dsplaisted/workload-manifest-targets-i…
dsplaisted Oct 19, 2022
a00b2cf
Fix whitespace
nagilson Oct 19, 2022
d3173a2
Fix tests
nagilson Oct 19, 2022
c738050
Update dependencies from https://github.com/dotnet/roslyn build 20221…
dotnet-maestro[bot] Oct 20, 2022
6942fe7
Merge pull request #28628 from nagilson/nagilson-exe-rids
nagilson Oct 20, 2022
24f5a85
Merge branch 'release/7.0.1xx' into release/7.0.2xx
Oct 20, 2022
d1dc7cf
Update dependencies from https://github.com/dotnet/roslyn build 20221…
dotnet-maestro[bot] Oct 20, 2022
e3c4d4e
Merge pull request #28670 from dotnet/darc-release/7.0.1xx-8c7a1a74-4…
v-wuzhai Oct 20, 2022
34a1ccc
Merge branch 'release/6.0.4xx' into release/7.0.1xx
Oct 20, 2022
883c806
Merge pull request #28666 from dotnet-maestro-bot/merge/release/6.0.4…
v-wuzhai Oct 20, 2022
a0754c1
Update dependencies from https://github.com/dotnet/roslyn build 20221…
dotnet-maestro[bot] Oct 20, 2022
6ca36ff
Update dependencies from https://github.com/dotnet/roslyn build 20221…
dotnet-maestro[bot] Oct 20, 2022
ee8da59
Update dependencies from https://github.com/dotnet/roslyn build 20221…
dotnet-maestro[bot] Oct 21, 2022
984099c
Update dependencies from https://github.com/dotnet/format build 20221…
dotnet-maestro[bot] Oct 21, 2022
dd01a53
Update dependencies from https://github.com/dotnet/format build 20221…
dotnet-maestro[bot] Oct 21, 2022
0445931
Update dependencies from https://github.com/dotnet/format build 20221…
dotnet-maestro[bot] Oct 21, 2022
656247e
Merge pull request #28699 from dotnet/darc-release/7.0.1xx-d9c269d0-2…
v-wuzhai Oct 21, 2022
cf932bd
Merge pull request #28676 from dotnet/darc-release/7.0.1xx-70feb7e3-7…
v-wuzhai Oct 21, 2022
187b997
Update dependencies from https://github.com/dotnet/format build 20221…
dotnet-maestro[bot] Oct 21, 2022
2b248a7
Update dependencies from https://github.com/dotnet/roslyn-analyzers b…
dotnet-maestro[bot] Oct 21, 2022
405d1bb
Update dependencies from https://github.com/dotnet/razor-compiler bui…
dotnet-maestro[bot] Oct 21, 2022
6f6f9f8
Update dependencies from https://github.com/dotnet/format build 20221…
dotnet-maestro[bot] Oct 21, 2022
657b33d
Update dependencies from https://github.com/dotnet/format build 20221…
dotnet-maestro[bot] Oct 21, 2022
aca7ed0
Merge pull request #28713 from dotnet/darc-release/7.0.1xx-53a379a8-7…
marcpopMSFT Oct 21, 2022
32c8684
Update dependencies from https://github.com/dotnet/roslyn-analyzers b…
dotnet-maestro[bot] Oct 24, 2022
bf3e5df
Update dependencies from https://github.com/dotnet/razor-compiler bui…
dotnet-maestro[bot] Oct 26, 2022
f74aef0
Switch back to the shipped RC2 build.
marcpopMSFT Oct 26, 2022
37ba536
Update dependencies from https://github.com/dotnet/fsharp build 20221…
dotnet-maestro[bot] Oct 27, 2022
8e1d0bd
Update branding to 7.0.101
vseanreesermsft Oct 27, 2022
c3c8ff4
Update dependencies from https://github.com/dotnet/roslyn build 20221…
dotnet-maestro[bot] Oct 27, 2022
31e1ec9
Update dependencies from https://github.com/dotnet/roslyn build 20221…
dotnet-maestro[bot] Oct 27, 2022
ec52c53
Update dependencies from https://github.com/dotnet/roslyn build 20221…
dotnet-maestro[bot] Oct 27, 2022
7570b08
Update dependencies from https://github.com/dotnet/fsharp build 20221…
dotnet-maestro[bot] Oct 28, 2022
544e527
Update dependencies from https://github.com/dotnet/roslyn-analyzers b…
dotnet-maestro[bot] Oct 28, 2022
74d5843
Update dependencies from https://github.com/dotnet/format build 20221…
dotnet-maestro[bot] Oct 29, 2022
e7ec426
Update dependencies from https://github.com/dotnet/format build 20221…
dotnet-maestro[bot] Oct 29, 2022
7acfef3
Update dependencies from https://github.com/dotnet/roslyn-analyzers b…
dotnet-maestro[bot] Oct 29, 2022
2401d14
Update dependencies from https://github.com/dotnet/roslyn-analyzers b…
dotnet-maestro[bot] Oct 29, 2022
60fb9fd
Update dependencies from https://github.com/dotnet/roslyn-analyzers b…
dotnet-maestro[bot] Oct 29, 2022
ded800d
Update dependencies from https://github.com/dotnet/roslyn-analyzers b…
dotnet-maestro[bot] Oct 31, 2022
f88e36e
Merge remote-tracking branch 'upstream/release/7.0.2xx' into merge/re…
nagilson Oct 31, 2022
2939b90
Account for changes in 7.0.2xx not in 7.0.1xx
nagilson Oct 31, 2022
46a5c69
Update dependencies from https://github.com/microsoft/vstest build 20…
dotnet-maestro[bot] Nov 1, 2022
be3f725
Update dependencies from https://github.com/dotnet/roslyn-analyzers b…
dotnet-maestro[bot] Nov 1, 2022
909ac65
Update Versions.props
marcpopMSFT Nov 1, 2022
4200cb1
Merge pull request #28835 from dotnet/darc-release/7.0.2xx-53cffbbc-f…
marcpopMSFT Nov 1, 2022
493c97e
Update aspnet to rc2 version
marcpopMSFT Nov 1, 2022
4136a2f
Merge pull request #28795 from vseanreesermsft/branding-7.0.101-2022-…
marcpopMSFT Nov 1, 2022
32c6ffa
Merge pull request #28668 from dotnet-maestro-bot/merge/release/7.0.1…
dsplaisted Nov 1, 2022
e41af10
Merge pull request #28706 from dotnet/darc-release/7.0.1xx-3a541df3-0…
marcpopMSFT Nov 1, 2022
a513289
Merge pull request #28711 from dotnet/darc-release/7.0.1xx-a8e892a3-0…
marcpopMSFT Nov 1, 2022
72adf5a
Merge pull request #28794 from dotnet/darc-release/7.0.1xx-6c45518c-4…
marcpopMSFT Nov 1, 2022
bd63176
Update dependencies from https://github.com/microsoft/vstest build 20…
dotnet-maestro[bot] Nov 2, 2022
e077c72
Update dependencies from https://github.com/dotnet/templating build 2…
dotnet-maestro[bot] Nov 2, 2022
5e553a7
Update dependencies from https://github.com/dotnet/templating build 2…
dotnet-maestro[bot] Nov 2, 2022
6096614
Merge pull request #28798 from dotnet/darc-release/7.0.1xx-d9ccdd1d-0…
marcpopMSFT Nov 2, 2022
da42e67
Merge pull request #28785 from dotnet/marcpopMSFT-backtorc2
marcpopMSFT Nov 2, 2022
87918dc
Merge pull request #28852 from dotnet/darc-release/7.0.2xx-be3a8481-4…
marcpopMSFT Nov 2, 2022
cc56da6
Update dependencies from https://github.com/dotnet/fsharp build 20221…
dotnet-maestro[bot] Nov 3, 2022
444f3c4
Merge pull request #28861 from dotnet/darc-release/7.0.2xx-98357f49-4…
v-wuzhai Nov 3, 2022
407781c
Merge branch 'release/7.0.1xx' into release/7.0.2xx
Nov 3, 2022
0608f6d
Merge pull request #28851 from dotnet/darc-release/7.0.2xx-bc4dd8ae-9…
v-wuzhai Nov 3, 2022
d106252
Merge pull request #28858 from dotnet-maestro-bot/merge/release/7.0.1…
v-wuzhai Nov 3, 2022
ce3297e
Update dependencies from https://github.com/microsoft/vstest build 20…
dotnet-maestro[bot] Nov 3, 2022
6a49258
Update dependencies from https://github.com/dotnet/fsharp build 20221…
dotnet-maestro[bot] Nov 3, 2022
acd2580
Merge pull request #28872 from dotnet/darc-release/7.0.2xx-cfd5ce6b-e…
marcpopMSFT Nov 3, 2022
1e15057
Merge pull request #28874 from dotnet/darc-release/7.0.2xx-be870703-6…
marcpopMSFT Nov 3, 2022
aa9ad19
Update dependencies from https://github.com/dotnet/templating build 2…
dotnet-maestro[bot] Nov 3, 2022
b596dff
Update dependencies from https://github.com/dotnet/fsharp build 20221…
dotnet-maestro[bot] Nov 3, 2022
1dbcc04
Update dependencies from https://github.com/dotnet/templating build 2…
dotnet-maestro[bot] Nov 3, 2022
b1d4a1c
Update dependencies from https://github.com/dotnet/roslyn build 20221…
dotnet-maestro[bot] Nov 3, 2022
76cdcf6
Update dependencies from https://github.com/dotnet/fsharp build 20221…
dotnet-maestro[bot] Nov 4, 2022
3d0d775
Merge pull request #28885 from dotnet/darc-release/7.0.2xx-941d3af0-f…
v-wuzhai Nov 4, 2022
d21e272
Merge pull request #28886 from dotnet/darc-release/7.0.2xx-7fd88680-0…
v-wuzhai Nov 4, 2022
075dde1
Merge pull request #28889 from dotnet/darc-release/7.0.2xx-b3c567f8-e…
v-wuzhai Nov 4, 2022
156336c
Merge branch 'release/7.0.2xx'
Nov 4, 2022
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace newc;

static class Program
{
static void Main()
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace lib;
public class Class1
{

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<PublishSingleFile>true</PublishSingleFile>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net7.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWindowsForms>true</UseWindowsForms>
<ImplicitUsings>enable</ImplicitUsings>
<PublishSingleFile>true</PublishSingleFile>
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="lib\lib.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.IO;
using System.Linq;
using Microsoft.DotNet.Cli;
Expand All @@ -17,7 +18,7 @@ public class SdkDirectoryWorkloadManifestProvider : IWorkloadManifestProvider
private readonly string [] _manifestDirectories;
private static HashSet<string> _outdatedManifestIds = new HashSet<string>(StringComparer.OrdinalIgnoreCase) { "microsoft.net.workload.android", "microsoft.net.workload.blazorwebassembly", "microsoft.net.workload.ios",
"microsoft.net.workload.maccatalyst", "microsoft.net.workload.macos", "microsoft.net.workload.tvos" };
private readonly HashSet<string>? _knownManifestIds;
private readonly Dictionary<string, int>? _knownManifestIdsAndOrder;

public SdkDirectoryWorkloadManifestProvider(string sdkRootPath, string sdkVersion, string? userProfileDir)
: this(sdkRootPath, sdkVersion, Environment.GetEnvironmentVariable, userProfileDir)
Expand All @@ -44,7 +45,12 @@ internal SdkDirectoryWorkloadManifestProvider(string sdkRootPath, string sdkVers
var knownManifestIdsFilePath = Path.Combine(_sdkRootPath, "sdk", sdkVersion, "IncludedWorkloadManifests.txt");
if (File.Exists(knownManifestIdsFilePath))
{
_knownManifestIds = File.ReadAllLines(knownManifestIdsFilePath).Where(l => !string.IsNullOrEmpty(l)).ToHashSet();
_knownManifestIdsAndOrder = new Dictionary<string, int>();
int lineNumber = 0;
foreach (var manifestId in File.ReadAllLines(knownManifestIdsFilePath).Where(l => !string.IsNullOrEmpty(l)))
{
_knownManifestIdsAndOrder[manifestId] = lineNumber++;
}
}

string? userManifestsDir = userProfileDir is null ? null : Path.Combine(userProfileDir, "sdk-manifests", _sdkVersionBand.ToString());
Expand Down Expand Up @@ -126,9 +132,9 @@ public IEnumerable<string> GetManifestDirectories()
}
}

if (_knownManifestIds != null && _knownManifestIds.Any(id => !manifestIdsToDirectories.ContainsKey(id)))
if (_knownManifestIdsAndOrder != null && _knownManifestIdsAndOrder.Keys.Any(id => !manifestIdsToDirectories.ContainsKey(id)))
{
var missingManifestIds = _knownManifestIds.Where(id => !manifestIdsToDirectories.ContainsKey(id));
var missingManifestIds = _knownManifestIdsAndOrder.Keys.Where(id => !manifestIdsToDirectories.ContainsKey(id));
foreach (var missingManifestId in missingManifestIds)
{
var manifestDir = FallbackForMissingManifest(missingManifestId);
Expand All @@ -139,7 +145,21 @@ public IEnumerable<string> GetManifestDirectories()
}
}

return manifestIdsToDirectories.Values;
// Return manifests in a stable order. Manifests in the IncludedWorkloadManifests.txt file will be first, and in the same order they appear in that file.
// Then the rest of the manifests (if any) will be returned in (ordinal case-insensitive) alphabetical order.
return manifestIdsToDirectories
.OrderBy(kvp =>
{
if (_knownManifestIdsAndOrder != null &&
_knownManifestIdsAndOrder.TryGetValue(kvp.Key, out var order))
{
return order;
}
return int.MaxValue;
})
.ThenBy(kvp => kvp.Key, StringComparer.OrdinalIgnoreCase)
.Select(kvp => kvp.Value)
.ToList();
}

private string FallbackForMissingManifest(string manifestId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,20 @@ Copyright (c) .NET Foundation. All rights reserved.
<RuntimeIdentifier Condition="'$(PlatformTarget)' == 'x86' or '$(PlatformTarget)' == ''">win7-x86</RuntimeIdentifier>
</PropertyGroup>

<PropertyGroup Condition="'$(UseCurrentRuntimeIdentifier)' == 'true' or
(
<PropertyGroup Condition="'$(UseCurrentRuntimeIdentifier)' == ''">
<UseCurrentRuntimeIdentifier Condition="
'$(RuntimeIdentifier)' == '' and
(
'$(SelfContained)' == 'true' or
'$(PublishReadyToRun)' == 'true' or
'$(PublishSingleFile)' == 'true' or
'$(PublishAot)' == 'true'
)
)">
'$(_IsExecutable)' == 'true' and '$(IsTestProject)' != 'true' and
'$(IsRidAgnostic)' != 'true' and
(
'$(SelfContained)' == 'true' or
'$(PublishReadyToRun)' == 'true' or
'$(PublishSingleFile)' == 'true' or
'$(PublishAot)' == 'true'
)">true</UseCurrentRuntimeIdentifier>
</PropertyGroup>

<PropertyGroup Condition="'$(UseCurrentRuntimeIdentifier)' == 'true'">
<RuntimeIdentifier>$(NETCoreSdkPortableRuntimeIdentifier)</RuntimeIdentifier>
</PropertyGroup>

Expand Down Expand Up @@ -221,7 +225,7 @@ Copyright (c) .NET Foundation. All rights reserved.
ResourceName="Prefer32BitIgnoredForNetCoreApp" />

<PropertyGroup>
<Prefer32Bit>false</Prefer32Bit>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>

</Target>
Expand All @@ -233,7 +237,7 @@ Copyright (c) .NET Foundation. All rights reserved.
<NETSdkError Condition="'$(PlatformTarget)' != 'AnyCPU' and !$(RuntimeIdentifier.ToUpperInvariant().Contains($(PlatformTarget.ToUpperInvariant())))"
ResourceName="CannotHaveRuntimeIdentifierPlatformMismatchPlatformTarget"
FormatArguments="$(RuntimeIdentifier);$(PlatformTarget)" />

</Target>

<Target Name="_CheckForLanguageAndFeatureCombinationSupport"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System.IO;
using FluentAssertions;
using Microsoft.NET.TestFramework;
using Microsoft.NET.TestFramework.Assertions;
using Microsoft.NET.TestFramework.Commands;
using Xunit;
using Xunit.Abstractions;

namespace Microsoft.NET.Publish.Tests
{
public class GivenThatWeWantToPublishASingleFileLibrary : SdkTest
{
public GivenThatWeWantToPublishASingleFileLibrary(ITestOutputHelper log) : base(log)
{
}

[WindowsOnlyFact]
// Tests regression on https://github.com/dotnet/sdk/pull/28484
public void ItPublishesSuccessfullyWithRIDAndPublishSingleFileLibrary()
{
var targetFramework = ToolsetInfo.CurrentTargetFramework;
var testAsset = _testAssetsManager
.CopyTestAsset("AppWithLibrarySDKStyleThatPublishesSingleFile")
.WithTargetFramework(targetFramework)
.WithSource();

var publishCommand = new PublishCommand(testAsset);
publishCommand.Execute()
.Should()
.Pass();

// It would be better if we could somehow check the library binlog or something for a RID instead.
var exeFolder = publishCommand.GetOutputDirectory(targetFramework: targetFramework);
// Parent: RID, then TFM, then Debug, then bin, then the test folder
var ridlessLibraryDllPath = Path.Combine(exeFolder.Parent.Parent.Parent.Parent.FullName, "lib", "bin", "Debug", targetFramework, "lib.dll");
Assert.True(File.Exists(ridlessLibraryDllPath));
}

}

}
24 changes: 24 additions & 0 deletions src/Tests/Microsoft.NET.Publish.Tests/RuntimeIdentifiersTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,30 @@ public void PublishWithRuntimeIdentifier(bool publishNoBuild)
}
}

[Fact]
public void ImplicitRuntimeIdentifierOptOutCorrecltyOptsOut()
{
var targetFramework = ToolsetInfo.CurrentTargetFramework;
var runtimeIdentifier = EnvironmentInfo.GetCompatibleRid(targetFramework);
var testProject = new TestProject()
{
IsExe = true,
TargetFrameworks = targetFramework
};
testProject.AdditionalProperties["SelfContained"] = "true";
testProject.AdditionalProperties["UseCurrentRuntimeIdentifier"] = "false";

var testAsset = _testAssetsManager.CreateTestProject(testProject);

var publishCommand = new PublishCommand(testAsset);
publishCommand
.Execute()
.Should()
.Fail()
.And
.HaveStdOutContaining("NETSDK1191");
}

[Fact]
public void DuplicateRuntimeIdentifiers()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,43 @@ var sdkDirectoryWorkloadManifestProvider
.BeEquivalentTo("6.0.100-preview.4/iOS", "6.0.100/Android");
}

[Fact]
public void ItReturnsManifestsInOrderFromIncludedWorkloadManifestsFile()
{
var testDirectory = _testAssetsManager.CreateTestDirectory().Path;
var fakeDotnetRootDirectory = Path.Combine(testDirectory, "dotnet");

// microsoft.net.workload.mono.toolchain.net6, microsoft.net.workload.mono.toolchain.net7, microsoft.net.workload.emscripten.net6, microsoft.net.workload.emscripten.net7

var currentSdkVersion = "7.0.100";
var fallbackWorkloadBand = "7.0.100-rc.2";

CreateMockManifest(fakeDotnetRootDirectory, currentSdkVersion, "NotInIncudedWorkloadsFile");
CreateMockManifest(fakeDotnetRootDirectory, currentSdkVersion, "Microsoft.Net.Workload.Mono.Toolchain.net6");
CreateMockManifest(fakeDotnetRootDirectory, fallbackWorkloadBand, "Microsoft.Net.Workload.Mono.Toolchain.net7");
CreateMockManifest(fakeDotnetRootDirectory, fallbackWorkloadBand, "Microsoft.Net.Workload.Emscripten.net6");
CreateMockManifest(fakeDotnetRootDirectory, currentSdkVersion, "Microsoft.Net.Workload.Emscripten.net7");

var knownWorkloadsFilePath = Path.Combine(fakeDotnetRootDirectory, "sdk", currentSdkVersion, "IncludedWorkloadManifests.txt");
Directory.CreateDirectory(Path.GetDirectoryName(knownWorkloadsFilePath)!);
File.WriteAllText(knownWorkloadsFilePath, @"
Microsoft.Net.Workload.Mono.Toolchain.net6
Microsoft.Net.Workload.Mono.Toolchain.net7
Microsoft.Net.Workload.Emscripten.net6
Microsoft.Net.Workload.Emscripten.net7"
.Trim());

var sdkDirectoryWorkloadManifestProvider = new SdkDirectoryWorkloadManifestProvider(sdkRootPath: fakeDotnetRootDirectory, sdkVersion: currentSdkVersion, userProfileDir: null);

GetManifestContents(sdkDirectoryWorkloadManifestProvider)
.Should()
.Equal($"{currentSdkVersion}/Microsoft.Net.Workload.Mono.Toolchain.net6",
$"{fallbackWorkloadBand}/Microsoft.Net.Workload.Mono.Toolchain.net7",
$"{fallbackWorkloadBand}/Microsoft.Net.Workload.Emscripten.net6",
$"{currentSdkVersion}/Microsoft.Net.Workload.Emscripten.net7",
$"{currentSdkVersion}/NotInIncudedWorkloadsFile");
}

private void CreateMockManifest(string rootDir, string version, string manifestId)
{
var manifestDirectory = Path.Combine(rootDir, "sdk-manifests", version);
Expand Down