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
4 changes: 2 additions & 2 deletions DotnetRuntimeMetadata.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"sdk": {
"channel": "8.0.1xx-preview7",
"channel": "8.0.1xx-rc1",
"quality": "daily",
"qualityFallback": "preview",
"packageVersionPattern": "8.0.0-preview.7",
"packageVersionPattern": "8.0.0-rc.1",
"sdkImageVersion": "8.0.100",
"nextChannel": "8.0.1xx-preview4",
"azureFeed": "",
Expand Down
16 changes: 16 additions & 0 deletions build.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,17 @@ Fix steps:
$Arguments += "--self-contained"
}

if ($Options.Runtime -like 'win*') {
# Starting in .NET 8, the .NET SDK won't recognize version-specific RIDs by default, such as win7-x64,
# see https://learn.microsoft.com/dotnet/core/compatibility/sdk/8.0/rid-graph for details.
# It will cause huge amount of changes in our build infrastructure because our building and packaging
# scripts have the 'win7-xx' assumption regarding the target runtime.
#
# As a workaround, we use the old full RID graph during the build so that we can continue to use the
# 'win7-x64' and 'win7-x86' RIDs.
$Arguments += "/property:UseRidGraph=true"
}

if ($Options.Runtime -like 'win*' -or ($Options.Runtime -like 'fxdependent*' -and $environment.IsWindows)) {
$Arguments += "/property:IsWindows=true"
if(!$environment.IsWindows) {
Expand Down Expand Up @@ -800,6 +811,7 @@ function Restore-PSPackage

if ($Options.Runtime -like 'win*') {
$RestoreArguments += "/property:EnableWindowsTargeting=True"
$RestoreArguments += "/property:UseRidGraph=True"
}

if ($InteractiveAuth) {
Expand Down Expand Up @@ -1197,6 +1209,10 @@ function Publish-PSTestTools {
$runtime = $Options.Runtime
}

# We are using non-version/distro specific RIDs for test tools, so we need to fix the runtime
# value here if it starts with 'win7'.
$runtime = $runtime -replace '^win7-', 'win-'

Write-Verbose -Verbose -Message "Starting dotnet publish for $toolPath with runtime $runtime"

dotnet publish --output bin --configuration $Options.Configuration --framework $Options.Framework --runtime $runtime --self-contained | Out-String | Write-Verbose -Verbose
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"sdk": {
"version": "8.0.100-preview.7.23376.3"
"version": "8.0.100-rc.1.23455.8"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<ItemGroup>
<ProjectReference Include="..\System.Management.Automation\System.Management.Automation.csproj" />
<PackageReference Include="System.Diagnostics.PerformanceCounter" Version="8.0.0-preview.7.23375.6" />
<PackageReference Include="System.Diagnostics.PerformanceCounter" Version="8.0.0-rc.1.23419.3" />
</ItemGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

<ItemGroup>
<!-- the following package(s) are from https://github.com/dotnet/corefx -->
<PackageReference Include="System.ServiceProcess.ServiceController" Version="8.0.0-preview.7.23375.6" />
<PackageReference Include="System.ServiceProcess.ServiceController" Version="8.0.0-rc.1.23419.3" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.7.0" />
<PackageReference Include="System.Threading.AccessControl" Version="8.0.0-preview.7.23375.6" />
<PackageReference Include="System.Drawing.Common" Version="8.0.0-preview.5.23280.5" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.8.0-1.final" />
<PackageReference Include="System.Threading.AccessControl" Version="8.0.0-rc.1.23419.3" />
<PackageReference Include="System.Drawing.Common" Version="8.0.0-rc.1.23416.3" />
<PackageReference Include="JsonSchema.Net" Version="5.2.5" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<ItemGroup>
<!-- the following package(s) are from https://github.com/dotnet/corefx -->
<PackageReference Include="System.Diagnostics.EventLog" Version="8.0.0-preview.7.23375.6" />
<PackageReference Include="System.Diagnostics.EventLog" Version="8.0.0-rc.1.23419.3" />
</ItemGroup>

</Project>
8 changes: 4 additions & 4 deletions src/Microsoft.PowerShell.SDK/Microsoft.PowerShell.SDK.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
<!-- the following package(s) are from https://github.com/dotnet/fxdac -->
<PackageReference Include="System.Data.SqlClient" Version="4.8.5" />
<!-- the following package(s) are from https://github.com/dotnet/corefx -->
<PackageReference Include="System.IO.Packaging" Version="8.0.0-preview.7.23375.6" />
<PackageReference Include="System.Net.Http.WinHttpHandler" Version="8.0.0-preview.7.23375.6" />
<PackageReference Include="System.Text.Encodings.Web" Version="8.0.0-preview.7.23375.6" />
<PackageReference Include="System.IO.Packaging" Version="8.0.0-rc.1.23419.3" />
<PackageReference Include="System.Net.Http.WinHttpHandler" Version="8.0.0-rc.1.23419.3" />
<PackageReference Include="System.Text.Encodings.Web" Version="8.0.0-rc.1.23419.3" />
<!--
the following package(s) are from https://github.com/dotnet/wcf
they are pinned to the version 4.10.2 due to a breaking change in newer versions.
Expand All @@ -34,7 +34,7 @@
<PackageReference Include="System.ServiceModel.Security" Version="4.10.2" />
<PackageReference Include="System.Private.ServiceModel" Version="4.10.2" />
<!-- the source could not be found for the following package(s) -->
<PackageReference Include="Microsoft.Windows.Compatibility" Version="8.0.0-preview.7.23376.1" />
<PackageReference Include="Microsoft.Windows.Compatibility" Version="8.0.0-rc.1.23416.3" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<ProjectReference Include="..\System.Management.Automation\System.Management.Automation.csproj" />
<ProjectReference Include="..\Microsoft.WSMan.Runtime\Microsoft.WSMan.Runtime.csproj" />
<!-- the following package(s) are from https://github.com/dotnet/corefx -->
<PackageReference Include="System.ServiceProcess.ServiceController" Version="8.0.0-preview.7.23375.6" />
<PackageReference Include="System.ServiceProcess.ServiceController" Version="8.0.0-rc.1.23419.3" />
</ItemGroup>

<PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/ResGen/ResGen.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<OutputType>Exe</OutputType>
<TieredCompilation>true</TieredCompilation>
<TieredCompilationQuickJit>true</TieredCompilationQuickJit>
<RuntimeIdentifiers>win7-x86;win7-x64;osx-x64;linux-x64</RuntimeIdentifiers>
<RuntimeIdentifiers>win-x86;win-x64;osx-x64;linux-x64</RuntimeIdentifiers>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@
<!-- the Application Insights package -->
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.21.0" />
<!-- the following package(s) are from https://github.com/dotnet/corefx -->
<PackageReference Include="Microsoft.Win32.Registry.AccessControl" Version="8.0.0-preview.7.23375.6" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="8.0.0-preview.7.23375.6" />
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="8.0.0-preview.7.23375.6" />
<PackageReference Include="System.DirectoryServices" Version="8.0.0-preview.7.23375.6" />
<PackageReference Include="Microsoft.Win32.Registry.AccessControl" Version="8.0.0-rc.1.23419.3" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="8.0.0-rc.1.23419.3" />
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="8.0.0-rc.1.23419.3" />
<PackageReference Include="System.DirectoryServices" Version="8.0.0-rc.1.23419.3" />
<!--PackageReference Include="System.IO.FileSystem.AccessControl" Version="6.0.0-preview.5.21301.5" /-->
<PackageReference Include="System.Management" Version="8.0.0-preview.7.23375.6" />
<PackageReference Include="System.Management" Version="8.0.0-rc.1.23419.3" />
<PackageReference Include="System.Security.AccessControl" Version="6.0.2-mauipre.1.22102.15" />
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="8.0.0-preview.7.23375.6" />
<PackageReference Include="System.Security.Permissions" Version="8.0.0-preview.7.23375.6" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="8.0.0-preview.7.23375.6" />
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="8.0.0-rc.1.23419.3" />
<PackageReference Include="System.Security.Permissions" Version="8.0.0-rc.1.23419.3" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="8.0.0-rc.1.23419.3" />
<!-- the following package(s) are from the powershell org -->
<PackageReference Include="Microsoft.Management.Infrastructure" Version="3.0.0-preview.2" />
<PackageReference Include="Microsoft.PowerShell.Native" Version="7.4.0-preview.2" />
Expand Down
3 changes: 1 addition & 2 deletions src/System.Management.Automation/engine/parser/ast.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8451,8 +8451,7 @@ public TypeName(IScriptExtent extent, string name)
throw PSTraceSource.NewArgumentException(nameof(name));
}

int backtick = name.IndexOf('`');
if (backtick != -1)
if (name.Contains('`'))
{
name = name.Replace("``", "`");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ internal string GetMessage(string resourceString, params object[] args)
/// <summary>
/// Default shellname.
/// </summary>
protected const string DefaultPowerShellRemoteShellName = System.Management.Automation.Remoting.Client.WSManNativeApi.ResourceURIPrefix + "Microsoft.PowerShell";
protected const string DefaultPowerShellRemoteShellName = WSManNativeApi.ResourceURIPrefix + "Microsoft.PowerShell";

/// <summary>
/// Default application name for the connection uri.
Expand Down Expand Up @@ -3940,9 +3940,9 @@ internal Collection<PSSession> GetDisconnectedSessions(Collection<WSManConnectio
string shellUri = null;
if (!string.IsNullOrEmpty(configurationName))
{
shellUri = (configurationName.IndexOf(
System.Management.Automation.Remoting.Client.WSManNativeApi.ResourceURIPrefix, StringComparison.OrdinalIgnoreCase) != -1) ?
configurationName : System.Management.Automation.Remoting.Client.WSManNativeApi.ResourceURIPrefix + configurationName;
shellUri = configurationName.Contains(WSManNativeApi.ResourceURIPrefix, StringComparison.OrdinalIgnoreCase)
? configurationName
: WSManNativeApi.ResourceURIPrefix + configurationName;
}

foreach (Runspace runspace in runspaces)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -446,9 +446,9 @@ private void QueryForAndConnectCommands(string name, Guid instanceId)
string shellUri = null;
if (!string.IsNullOrEmpty(ConfigurationName))
{
shellUri = (ConfigurationName.IndexOf(
System.Management.Automation.Remoting.Client.WSManNativeApi.ResourceURIPrefix, StringComparison.OrdinalIgnoreCase) != -1) ?
ConfigurationName : System.Management.Automation.Remoting.Client.WSManNativeApi.ResourceURIPrefix + ConfigurationName;
shellUri = ConfigurationName.Contains(WSManNativeApi.ResourceURIPrefix, StringComparison.OrdinalIgnoreCase)
? ConfigurationName
: WSManNativeApi.ResourceURIPrefix + ConfigurationName;
}

// Connect selected runspace/command and direct command output to host
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4932,23 +4932,13 @@ protected override string GetParentPath(string path, string root)
// Note: we don't use IO.Path.IsPathRooted as this deals with "invalid" i.e. unnormalized paths
private static bool IsAbsolutePath(string path)
{
bool result = false;

// check if we're on a single root filesystem and it's an absolute path
if (LocationGlobber.IsSingleFileSystemAbsolutePath(path))
{
return true;
}

// Find the drive separator
int index = path.IndexOf(':');

if (index != -1)
{
result = true;
}

return result;
return path.Contains(':');
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion src/TypeCatalogGen/TypeCatalogGen.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<OutputType>Exe</OutputType>
<TieredCompilation>true</TieredCompilation>
<TieredCompilationQuickJit>true</TieredCompilationQuickJit>
<RuntimeIdentifiers>win7-x86;win7-x64;osx-x64;linux-x64</RuntimeIdentifiers>
<RuntimeIdentifiers>win-x86;win-x64;osx-x64;linux-x64</RuntimeIdentifiers>
</PropertyGroup>

</Project>
1 change: 0 additions & 1 deletion test/hosting/hosting.tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<PropertyGroup>
<Description>PowerShell hosting SDK xUnit Tests</Description>
<AssemblyName>powershell-hosting-tests</AssemblyName>
<!--RuntimeIdentifiers>win7-x86;win7-x64;osx.10.13-x64;linux-x64</RuntimeIdentifiers-->
</PropertyGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.13.7" />
<PackageReference Include="BenchmarkDotNet.Diagnostics.Windows" Version="0.13.7" />
<PackageReference Include="BenchmarkDotNet" Version="0.13.8" />
<PackageReference Include="BenchmarkDotNet.Diagnostics.Windows" Version="0.13.8" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<PackageReference Include="CommandLineParser" Version="2.9.1" />
<PackageReference Include="MarkdownLog.NS20" Version="0.10.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="BenchmarkDotNet" Version="0.13.7" />
<PackageReference Include="BenchmarkDotNet" Version="0.13.8" />
<PackageReference Include="Perfolizer" Version="0.3.5" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@

<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="System.Management.Automation" Version="7.4.0-preview.4" />
<PackageReference Include="System.Management.Automation" Version="7.4.0-preview.5" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion test/tools/TestExe/TestExe.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<OutputType>Exe</OutputType>
<TieredCompilation>true</TieredCompilation>
<TieredCompilationQuickJit>true</TieredCompilationQuickJit>
<RuntimeIdentifiers>win7-x86;win7-x64;osx-x64;linux-x64</RuntimeIdentifiers>
<RuntimeIdentifiers>win-x86;win-x64;osx-x64;linux-x64</RuntimeIdentifiers>
</PropertyGroup>

</Project>
4 changes: 2 additions & 2 deletions test/tools/TestService/TestService.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
<OutputType>Exe</OutputType>
<TieredCompilation>true</TieredCompilation>
<TieredCompilationQuickJit>true</TieredCompilationQuickJit>
<RuntimeIdentifiers>win7-x86;win7-x64</RuntimeIdentifiers>
<RuntimeIdentifiers>win-x86;win-x64</RuntimeIdentifiers>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Windows.Compatibility" Version="8.0.0-preview.7.23376.1" />
<PackageReference Include="Microsoft.Windows.Compatibility" Version="8.0.0-rc.1.23416.3" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion test/tools/UnixSocket/UnixSocket.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<OutputType>Exe</OutputType>
<TieredCompilation>true</TieredCompilation>
<TieredCompilationQuickJit>true</TieredCompilationQuickJit>
<RuntimeIdentifiers>win7-x86;win7-x64;osx-x64;linux-x64</RuntimeIdentifiers>
<RuntimeIdentifiers>win-x86;win-x64;osx-x64;linux-x64</RuntimeIdentifiers>
</PropertyGroup>

</Project>
4 changes: 2 additions & 2 deletions test/tools/WebListener/WebListener.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.0-preview.7.23375.9" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="8.0.0-preview.7.23375.6" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.0-rc.1.23421.28" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="8.0.0-rc.1.23419.3" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion test/xUnit/xUnit.tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Description>PowerShell xUnit Tests</Description>
<AssemblyName>powershell-tests</AssemblyName>
<GenerateProgramFile>true</GenerateProgramFile>
<RuntimeIdentifiers>win7-x86;win7-x64;osx-x64;linux-x64</RuntimeIdentifiers>
<RuntimeIdentifiers>win-x86;win-x64;osx-x64;linux-x64</RuntimeIdentifiers>
</PropertyGroup>

<PropertyGroup>
Expand Down