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
847 changes: 822 additions & 25 deletions build.psm1

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"sdk": {
"version": "11.0.100-preview.1.26104.118"
"version": "11.0.100-preview.2.26159.112"
}
}
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="11.0.0-preview.1.26104.118" />
<PackageReference Include="System.Diagnostics.PerformanceCounter" Version="11.0.0-preview.2.26159.112" />
</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="11.0.0-preview.1.26104.118" />
<PackageReference Include="System.ServiceProcess.ServiceController" Version="11.0.0-preview.2.26159.112" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2718,7 +2718,7 @@ protected override void ProcessRecord()
{
// Get the localized prompt string

string prompt = StringUtil.Format(NavigationResources.RemoveItemWithChildren, resolvedPath.Path);
string prompt = StringUtil.Format(NavigationResources.RemoveItemWithChildren, providerPath);

// Confirm the user wants to remove all children and the item even if
// they did not specify -recurse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -674,13 +674,30 @@ protected override void ProcessRecord()
#endregion Overrides

#nullable enable

/// <summary>
/// Writes a verbose message when a service property query fails.
/// </summary>
/// <param name="serviceName">Name of the service.</param>
/// <param name="propertyName">Name of the property that failed to be queried.</param>
private void WriteServicePropertyError(string serviceName, string propertyName)
{
Win32Exception e = new(Marshal.GetLastWin32Error());
WriteVerbose(
StringUtil.Format(
ServiceResources.CouldNotGetServiceProperty,
serviceName,
propertyName,
e.Message));
}

/// <summary>
/// Adds UserName, Description, BinaryPathName, DelayedAutoStart and StartupType to a ServiceController object.
/// </summary>
/// <param name="scManagerHandle">Handle to the local SCManager instance.</param>
/// <param name="service"></param>
/// <returns>ServiceController as PSObject with UserName, Description and StartupType added.</returns>
private static PSObject AddProperties(nint scManagerHandle, ServiceController service)
private PSObject AddProperties(nint scManagerHandle, ServiceController service)
{
NakedWin32Handle hService = nint.Zero;

Expand Down Expand Up @@ -709,6 +726,10 @@ private static PSObject AddProperties(nint scManagerHandle, ServiceController se
{
description = descriptionInfo.lpDescription;
}
else
{
WriteServicePropertyError(service.ServiceName, nameof(NativeMethods.SERVICE_DESCRIPTIONW));
}

if (NativeMethods.QueryServiceConfig2(
hService,
Expand All @@ -717,6 +738,10 @@ private static PSObject AddProperties(nint scManagerHandle, ServiceController se
{
isDelayedAutoStart = autostartInfo.fDelayedAutostart;
}
else
{
WriteServicePropertyError(service.ServiceName, nameof(NativeMethods.SERVICE_DELAYED_AUTO_START_INFO));
}

if (NativeMethods.QueryServiceConfig(
hService,
Expand All @@ -731,6 +756,15 @@ private static PSObject AddProperties(nint scManagerHandle, ServiceController se
isDelayedAutoStart.Value);
}
}
else
{
WriteServicePropertyError(service.ServiceName, nameof(NativeMethods.QUERY_SERVICE_CONFIG));
}
}
else
{
// handle when OpenServiceW itself fails:
WriteServicePropertyError(service.ServiceName, nameof(NativeMethods.SERVICE_QUERY_CONFIG));
}
}
finally
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema

<!--
Microsoft ResX Schema
Version 2.0

The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.

Example:

... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
Expand All @@ -26,36 +26,36 @@
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>

There are any number of "resheader" rows that contain simple
There are any number of "resheader" rows that contain simple
name/value pairs.

Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.

The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:

Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.

mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.

mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.

mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
Expand Down Expand Up @@ -213,4 +213,7 @@
<data name="UnsupportedStartupType" xml:space="preserve">
<value>The startup type '{0}' is not supported by {1}.</value>
</data>
<data name="CouldNotGetServiceProperty" xml:space="preserve">
<value>Could not retrieve property '{1}' for service '{0}': {2}</value>
</data>
</root>
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="Markdig.Signed" Version="1.0.0" />
<PackageReference Include="Markdig.Signed" Version="1.1.2" />
<PackageReference Include="Microsoft.PowerShell.MarkdownRender" Version="7.2.1" />
</ItemGroup>

Expand All @@ -32,8 +32,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="5.0.0" />
<PackageReference Include="System.Drawing.Common" Version="11.0.0-preview.1.26104.118" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="5.3.0" />
<PackageReference Include="System.Drawing.Common" Version="11.0.0-preview.2.26159.112" />
<PackageReference Include="JsonSchema.Net" Version="7.4.0" />
</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="11.0.0-preview.1.26104.118" />
<PackageReference Include="System.Diagnostics.EventLog" Version="11.0.0-preview.2.26159.112" />
</ItemGroup>

</Project>
15 changes: 7 additions & 8 deletions src/Microsoft.PowerShell.SDK/Microsoft.PowerShell.SDK.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@

<ItemGroup>
<!-- This section is to force the version of non-direct dependencies -->
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="11.0.0-preview.1.26104.118" />
<PackageReference Include="Microsoft.Extensions.ObjectPool" Version="11.0.0-preview.1.26104.118" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="11.0.0-preview.2.26159.112" />
<PackageReference Include="Microsoft.Extensions.ObjectPool" Version="11.0.0-preview.2.26159.112" />
<!-- the following package(s) are from https://github.com/dotnet/fxdac -->
<PackageReference Include="System.Data.SqlClient" Version="4.9.1" />
<!-- the following package(s) are from https://github.com/dotnet/corefx -->
<PackageReference Include="System.IO.Packaging" Version="11.0.0-preview.1.26104.118" />
<PackageReference Include="System.Net.Http.WinHttpHandler" Version="11.0.0-preview.1.26104.118" />
<PackageReference Include="System.IO.Packaging" Version="11.0.0-preview.2.26159.112" />
<PackageReference Include="System.Net.Http.WinHttpHandler" Version="11.0.0-preview.2.26159.112" />
<!-- the following package(s) are from https://github.com/dotnet/wcf -->
<PackageReference Include="System.ServiceModel.Http" Version="10.0.652802" />
<PackageReference Include="System.ServiceModel.NetTcp" Version="10.0.652802" />
<PackageReference Include="System.ServiceModel.Primitives" Version="10.0.652802" />
<!-- the source could not be found for the following package(s) -->
<PackageReference Include="Microsoft.Windows.Compatibility" Version="11.0.0-preview.1.26104.118" />
<PackageReference Include="Microsoft.Windows.Compatibility" Version="11.0.0-preview.2.26159.112" />
</ItemGroup>

<!--
Expand All @@ -41,14 +41,13 @@
dotnet msbuild ./dummy.csproj /t:ResolveAssemblyReferencesDesignTime /fileLogger /noconsolelogger /v:diag
3. Search '_ReferencesFromRAR' in the produced 'msbuild.log' file.
-->
<Target Name="_GetDependencies"
DependsOnTargets="ResolveAssemblyReferencesDesignTime">
<Target Name="_GetDependencies" DependsOnTargets="ResolveAssemblyReferencesDesignTime">
<ItemGroup>
<!--
Excludes 'Microsoft.Management.Infrastructure' from the type catalog reference list,
as it is provided separately at runtime and must not be included in the generated catalog.
-->
<_RefAssemblyPath Include="%(_ReferencesFromRAR.OriginalItemSpec)%3B" Condition=" '%(_ReferencesFromRAR.NuGetPackageId)' != 'Microsoft.Management.Infrastructure' "/>
<_RefAssemblyPath Include="%(_ReferencesFromRAR.OriginalItemSpec)%3B" Condition=" '%(_ReferencesFromRAR.NuGetPackageId)' != 'Microsoft.Management.Infrastructure' " />
</ItemGroup>
<WriteLinesToFile File="$(_DependencyFile)" Lines="@(_RefAssemblyPath)" Overwrite="true" />
</Target>
Expand Down
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="11.0.0-preview.1.26104.118" />
<PackageReference Include="System.ServiceProcess.ServiceController" Version="11.0.0-preview.2.26159.112" />
</ItemGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ public static string MapColorPairToEscapeSequence(ConsoleColor foregroundColor,
throw new ArgumentOutOfRangeException(paramName: nameof(foregroundColor));
}

if (backIndex < 0 || backIndex >= ForegroundColorMap.Length)
if (backIndex < 0 || backIndex >= BackgroundColorMap.Length)
{
throw new ArgumentOutOfRangeException(paramName: nameof(backgroundColor));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="5.0.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="4.14.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="5.3.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="5.3.0" PrivateAssets="all" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@
<!-- the Application Insights package -->
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.23.0" />
<!-- the following package(s) are from https://github.com/dotnet/corefx -->
<PackageReference Include="Microsoft.Win32.Registry.AccessControl" Version="11.0.0-preview.1.26104.118" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="11.0.0-preview.1.26104.118" />
<PackageReference Include="System.DirectoryServices" Version="11.0.0-preview.1.26104.118" />
<PackageReference Include="System.Management" Version="11.0.0-preview.1.26104.118" />
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="11.0.0-preview.1.26104.118" />
<PackageReference Include="System.Security.Permissions" Version="11.0.0-preview.1.26104.118" />
<PackageReference Include="Microsoft.Win32.Registry.AccessControl" Version="11.0.0-preview.2.26159.112" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="11.0.0-preview.2.26159.112" />
<PackageReference Include="System.DirectoryServices" Version="11.0.0-preview.2.26159.112" />
<PackageReference Include="System.Management" Version="11.0.0-preview.2.26159.112" />
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="11.0.0-preview.2.26159.112" />
<PackageReference Include="System.Security.Permissions" Version="11.0.0-preview.2.26159.112" />
<!-- the following package(s) are from the powershell org -->
<PackageReference Include="Microsoft.Management.Infrastructure" Version="3.0.0" />
<PackageReference Include="Microsoft.PowerShell.Native" Version="700.0.0-rc.1" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
<PackageReference Include="MarkdownLog.NS20" Version="0.10.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
<PackageReference Include="BenchmarkDotNet" Version="0.15.8" />
<PackageReference Include="Perfolizer" Version="0.6.7" />
<PackageReference Include="Perfolizer" Version="0.7.1" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion test/tools/TestService/TestService.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Windows.Compatibility" Version="11.0.0-preview.1.26104.118" />
<PackageReference Include="Microsoft.Windows.Compatibility" Version="11.0.0-preview.2.26159.112" />
<PackageReference Include="System.Data.SqlClient" Version="4.9.1" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion test/tools/WebListener/WebListener.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="11.0.0-preview.1.26104.118" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="11.0.0-preview.2.26159.112" />
</ItemGroup>
</Project>
Loading
Loading