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
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"tools": {
"dotnet": "6.0.100-rc.1.21379.2",
"dotnet": "6.0.100-rc.1.21417.19",
"runtimes": {
"dotnet": [
"$(VSRedistCommonNetCoreSharedFrameworkx6460PackageVersion)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
<PropertyGroup>
<TargetFramework>$(AspNetTestTfm)</TargetFramework>
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
<!-- Removing implicit namespace imports for web since AspNetCore.App is removed -->
<DisableImplicitNamespaceImports_Web>true</DisableImplicitNamespaceImports_Web>
</PropertyGroup>

<ItemGroup>
Expand Down
1 change: 0 additions & 1 deletion src/Assets/TestProjects/HelloWorld/HelloWorld.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>$(CurrentTargetFramework)</TargetFramework>
<DisableImplicitNamespaceImports>true</DisableImplicitNamespaceImports>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>$(CurrentTargetFramework)</TargetFramework>
<DisableImplicitNamespaceImports>true</DisableImplicitNamespaceImports>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/BlazorWasmSdk/Sdk/Sdk.props
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Copyright (c) .NET Foundation. All rights reserved.

<Import Project="$(_BlazorWebAssemblyPropsFile)" />

<ItemGroup Condition="'$(ImplicitUsings)' == 'true' or '$(ImplicitUsings)' == 'enable'">
<ItemGroup Condition="'$(Language)' == 'C#' AND ('$(ImplicitUsings)' == 'true' or '$(ImplicitUsings)' == 'enable')">
<Using Include="Microsoft.Extensions.Configuration" />
<Using Include="Microsoft.Extensions.DependencyInjection" />
<Using Include="Microsoft.Extensions.Logging" />
Expand Down
2 changes: 2 additions & 0 deletions src/BuiltInTools/dotnet-watch/Filters/DotNetBuildFilter.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// 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;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.DotNet.Watcher.Internal;
using Microsoft.Extensions.Tools.Internal;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

#nullable enable

using System;
using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Build.Graph;
using Microsoft.DotNet.Watcher.Internal;
Expand Down
4 changes: 4 additions & 0 deletions src/Cli/dotnet/Installer/Windows/MsiPackageCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@

#nullable disable

using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Pipes;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
Expand Down
2 changes: 2 additions & 0 deletions src/Cli/dotnet/Installer/Windows/UpgradeAttributes.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// 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;

namespace Microsoft.DotNet.Installer.Windows
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
// 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;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.Versioning;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.DotNet.Cli;
using Microsoft.DotNet.Cli.NuGetPackageDownloader;
Expand Down Expand Up @@ -61,7 +66,7 @@ public NetSdkMsiInstallerClient(InstallElevationContextBase elevationContext,

if (IsElevated)
{
// Turn off automatic updates. We don't want MU to potentially patch the SDK
// Turn off automatic updates. We don't want MU to potentially patch the SDK
// and it also reduces the risk of hitting ERROR_INSTALL_ALREADY_RUNNING.
UpdateAgent.Stop();
}
Expand Down Expand Up @@ -132,7 +137,7 @@ public void GarbageCollectInstalledWorkloadPacks(DirectoryPath? offlineCache = n
{
Log?.LogMessage($"Evaluating dependent for workload pack, dependent: {dependent}, pack ID: {packRecord.PackId}, pack version: {packRecord.PackVersion}");

// Dependents created by the SDK should have 3 parts, for example, "Microsoft.NET.Sdk,6.0.100,x86".
// Dependents created by the SDK should have 3 parts, for example, "Microsoft.NET.Sdk,6.0.100,x86".
string[] dependentParts = dependent.Split(',');

if (dependentParts.Length != 3)
Expand Down Expand Up @@ -254,18 +259,18 @@ public void InstallWorkloadManifest(ManifestId manifestId, ManifestVersion manif
Log?.LogMessage($"Installing manifest: Id: {manifestId}, version: {manifestVersion}, feature band: {sdkFeatureBand}, rollback: {isRollback}.");

// Resolve the package ID for the manifest payload package
string msiPackageId = WorkloadManifestUpdater.GetManifestPackageId(sdkFeatureBand, manifestId, InstallType.Msi).ToString();
string msiPackageId = WorkloadManifestUpdater.GetManifestPackageId(sdkFeatureBand, manifestId, InstallType.Msi).ToString();
string msiPackageVersion = $"{manifestVersion}";

Log?.LogMessage($"Resolving {manifestId} ({manifestVersion}) to {msiPackageId} ({msiPackageVersion}).");

// Retrieve the payload from the MSI package cache.
// Retrieve the payload from the MSI package cache.
MsiPayload msi = GetCachedMsiPayload(msiPackageId, msiPackageVersion, offlineCache);
VerifyPackage(msi);
DetectState state = DetectPackage(msi.ProductCode, out Version installedVersion);
InstallAction plannedAction = PlanPackage(msi, state, InstallAction.Install, installedVersion, out IEnumerable<string> relatedProducts);

// If we've detected a downgrade, it's possible we might be doing a rollback after the manifests were updated,
// If we've detected a downgrade, it's possible we might be doing a rollback after the manifests were updated,
// but another error occurred. In this case we need to try and uninstall the upgrade and the install the lower
// version of the MSI.
if (plannedAction == InstallAction.Downgrade && isRollback && state == DetectState.Absent)
Expand All @@ -277,7 +282,7 @@ public void InstallWorkloadManifest(ManifestId manifestId, ManifestVersion manif

// Let's try and remove the SDK dependency. If anything's left then this is a shared installation, e.g.
// the manifest was already installed by VS, we triggered a CLI installation, but because the package was
// present, we simply added a dependent against it.
// present, we simply added a dependent against it.
UpdateDependent(InstallRequestType.RemoveDependent, msi.Manifest.ProviderKeyName, _dependent);

if (depProvider.Dependents.Any())
Expand Down Expand Up @@ -342,7 +347,7 @@ public void RepairWorkloadPack(PackInfo packInfo, SdkFeatureBand sdkFeatureBand,
// Determine the MSI payload package ID based on the host architecture, pack ID and pack version.
string msiPackageId = GetMsiPackageId(packInfo);

// Retrieve the payload from the MSI package cache.
// Retrieve the payload from the MSI package cache.
MsiPayload msi = GetCachedMsiPayload(msiPackageId, packInfo.Version, offlineCache);
VerifyPackage(msi);
DetectState state = DetectPackage(msi, out Version installedVersion);
Expand All @@ -368,7 +373,7 @@ public void InstallWorkloadPack(PackInfo packInfo, SdkFeatureBand sdkFeatureBand
// Determine the MSI payload package ID based on the host architecture, pack ID and pack version.
string msiPackageId = GetMsiPackageId(packInfo);

// Retrieve the payload from the MSI package cache.
// Retrieve the payload from the MSI package cache.
MsiPayload msi = GetCachedMsiPayload(msiPackageId, packInfo.Version, offlineCache);
VerifyPackage(msi);
DetectState state = DetectPackage(msi, out Version installedVersion);
Expand All @@ -395,7 +400,7 @@ public void RollBackWorkloadPackInstall(PackInfo packInfo, SdkFeatureBand sdkFea
// Determine the MSI payload package ID based on the host architecture, pack ID and pack version.
string msiPackageId = GetMsiPackageId(packInfo);

// Retrieve the payload from the MSI package cache.
// Retrieve the payload from the MSI package cache.
MsiPayload msi = GetCachedMsiPayload(msiPackageId, packInfo.Version, offlineCache);
VerifyPackage(msi);

Expand Down Expand Up @@ -606,7 +611,7 @@ private InstallAction PlanPackage(MsiPayload msi, DetectState state, InstallActi

if (relatedProduct.Attributes.HasFlag(UpgradeAttributes.OnlyDetect) && (state == DetectState.Absent))
{
// If we're not installed, but detect-only related, it's very likely that
// If we're not installed, but detect-only related, it's very likely that
// that we'd trigger a downgrade launch condition. We can't know for sure, but
// generally that's the most common use for detect-only entries.
plannedAction = InstallAction.Downgrade;
Expand Down Expand Up @@ -665,7 +670,7 @@ private string ExtractPackage(string packageId, string packageVersion, Directory
throw new FileNotFoundException(string.Format(LocalizableStrings.CacheMissingPackage, packageId, packageVersion, offlineCache));
}

// Extract the contents to a random folder to avoid potential file injection/hijacking
// Extract the contents to a random folder to avoid potential file injection/hijacking
// shenanigans before moving it to the final cache directory.
string extractionDirectory = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
Directory.CreateDirectory(extractionDirectory);
Expand Down Expand Up @@ -699,7 +704,7 @@ private IEnumerable<SdkFeatureBand> GetInstalledFeatureBands()

/// <summary>
/// Tries to retrieve the MSI payload for the specified package ID and version from
/// the MSI package cache.
/// the MSI package cache.
/// </summary>
/// <param name="packageId">The ID of the payload package.</param>
/// <param name="packageVersion">The version of the payload package.</param>
Expand Down Expand Up @@ -814,7 +819,7 @@ private void VerifyPackage(MsiPayload msiPayload)
}

/// <summary>
/// Creates a new <see cref="NetSdkMsiInstallerClient"/> instance. If the current host process is not elevated,
/// Creates a new <see cref="NetSdkMsiInstallerClient"/> instance. If the current host process is not elevated,
/// the elevated server process will also be started by running an additional command.
/// </summary>
/// <param name="nugetPackageDownloader"></param>
Expand Down
1 change: 0 additions & 1 deletion src/Layout/toolset-tasks/toolset-tasks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<TargetFrameworks>$(SdkTargetFramework);net472</TargetFrameworks>
<TargetFrameworks Condition=" '$([MSBuild]::IsOSPlatform(`Windows`))' == 'false' ">$(SdkTargetFramework)</TargetFrameworks>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<DisableImplicitNamespaceImports>true</DisableImplicitNamespaceImports>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<DisableImplicitNamespaceImports Condition="'$(DisableImplicitNamespaceImports)'==''">$(DisableImplicitFrameworkReferences)</DisableImplicitNamespaceImports>
</PropertyGroup>
<ItemGroup Condition=" '$(DisableImplicitNamespaceImports)' != 'true' and '$(TargetFrameworkIdentifier)' == '.NETFramework'">
<!-- These namespaces are present in 2.0 Framework assemblies -->
<Import Include="Microsoft.VisualBasic" />
Expand Down
2 changes: 1 addition & 1 deletion src/Tests/EndToEnd.Tests/GivenDotNetUsesMSBuild.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public GivenDotNetUsesMSBuild(ITestOutputHelper log) : base(log)
{
}

[RequiresMSBuildVersionFact("17.0.0.32901", Skip = "Unskipping tracked by https://github.com/dotnet/sdk/issues/19696")]
[RequiresMSBuildVersionFact("17.0.0.32901")]
public void ItCanNewRestoreBuildRunCleanMSBuildProject()
{
string projectDirectory = _testAssetsManager.CreateTestDirectory().Path;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
<EnableSourceControlManagerQueries>false</EnableSourceControlManagerQueries>
<EnableSourceLink>false</EnableSourceLink>
<DeterministicSourcePaths>false</DeterministicSourcePaths>
<CheckEolTargetFramework>false</CheckEolTargetFramework>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
<EnableSourceControlManagerQueries>false</EnableSourceControlManagerQueries>
<EnableSourceLink>false</EnableSourceLink>
<DeterministicSourcePaths>false</DeterministicSourcePaths>
<CheckEolTargetFramework>false</CheckEolTargetFramework>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
<EnableSourceControlManagerQueries>false</EnableSourceControlManagerQueries>
<EnableSourceLink>false</EnableSourceLink>
<DeterministicSourcePaths>false</DeterministicSourcePaths>
<CheckEolTargetFramework>false</CheckEolTargetFramework>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
<EnableSourceControlManagerQueries>false</EnableSourceControlManagerQueries>
<EnableSourceLink>false</EnableSourceLink>
<DeterministicSourcePaths>false</DeterministicSourcePaths>
<CheckEolTargetFramework>false</CheckEolTargetFramework>
</PropertyGroup>
</Project>
6 changes: 3 additions & 3 deletions src/Tests/Microsoft.NET.Build.Tests/WorkloadTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public void It_should_fail_to_restore_without_workload_when_multitargeted()
// .HaveStdOutContaining("android");
}

[Fact]
[Fact(Skip = "https://github.com/dotnet/sdk/issues/19866")]
public void It_should_fail_to_build_without_workload_when_multitargeted()
{
var testProject = new TestProject()
Expand Down Expand Up @@ -238,7 +238,7 @@ public void It_should_import_aliased_pack()
.BeEquivalentTo("true");
}

[Fact]
[Fact(Skip = "https://github.com/dotnet/sdk/issues/19866")]
public void It_should_get_suggested_workload_by_GetRequiredWorkloads_target()
{
var mainProject = new TestProject()
Expand Down Expand Up @@ -266,7 +266,7 @@ public void It_should_get_suggested_workload_by_GetRequiredWorkloads_target()
.BeEquivalentTo("microsoft-android-sdk-full");
}

[Theory]
[Theory(Skip = "https://github.com/dotnet/sdk/issues/19866")]
[InlineData("net6.0-android;net6.0-ios", "net6.0-android;net6.0-ios", "microsoft-android-sdk-full;microsoft-ios-sdk-full")]
[InlineData("net6.0", "net6.0;net6.0-android;net6.0-ios", "microsoft-android-sdk-full;microsoft-ios-sdk-full")]
[InlineData("net6.0;net6.0-ios", "net6.0;net6.0-android", "microsoft-android-sdk-full;microsoft-ios-sdk-full")]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
// 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;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Microsoft.AspNetCore.Razor.Tasks;
using Microsoft.NET.Sdk.Razor.Tests;
using Microsoft.NET.TestFramework;
Expand All @@ -22,7 +25,7 @@ private string TemplatizeCompressedAssets(StaticWebAsset asset, string originalV
{
return null;
}

if (asset.RelatedAsset == originalValue)
{
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Xml.Linq;
using Microsoft.AspNetCore.Razor.Tasks;
using Microsoft.NET.TestFramework.Assertions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//

using System;
using System.IO;
using System.Text.Json;
using System.Xml.Linq;
Expand Down Expand Up @@ -213,7 +214,7 @@ public void JsModules_CanCustomizeBlazorInitialization()
</BlazorPublishExtension>
<FileWrites Include=""$(IntermediateOutputPath)publish.extension.txt"" />
</ItemGroup>

<WriteLinesToFile
Lines=""@(_BlazorBootFilesToUpdate->'%(FullPath)')""
File=""$(IntermediateOutputPath)publish.extension.txt""
Expand Down Expand Up @@ -290,7 +291,7 @@ public void JsModules_Hosted_CanCustomizeBlazorInitialization()
</BlazorPublishExtension>
<FileWrites Include=""$(IntermediateOutputPath)publish.extension.txt"" />
</ItemGroup>

<WriteLinesToFile
Lines=""@(_BlazorBootFilesToUpdate->'%(FullPath)')""
File=""$(IntermediateOutputPath)publish.extension.txt""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
// 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;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Text.Json;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
// 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;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using FluentAssertions;
using Microsoft.AspNetCore.Razor.Tasks;
using Microsoft.Build.Framework;
Expand Down Expand Up @@ -101,8 +105,8 @@ public void PrefersSpecificKindAssetsOverAllKindAssets()
{
BuildEngine = buildEngine.Object,
Source = "MyPackage",
Assets = new[]
{
Assets = new[]
{
CreateCandidate("wwwroot\\candidate.js", "MyPackage", "Discovered", "candidate.js", "All", "All"),
CreateCandidate("wwwroot\\candidate.other.js", "MyPackage", "Discovered", "candidate.js", "Build", "All")
},
Expand Down Expand Up @@ -365,7 +369,7 @@ private ITaskItem CreateCandidate(

result.ApplyDefaults();
result.Normalize();

return result.ToTaskItem();
}

Expand Down
Loading