Skip to content

Commit

Permalink
Target PowerShell 7.2 and .NET 6
Browse files Browse the repository at this point in the history
  • Loading branch information
sharpjs committed Dec 23, 2023
1 parent 112ce2f commit df20630
Show file tree
Hide file tree
Showing 20 changed files with 33 additions and 10 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ jobs:
#url: https://github.com/actions/setup-dotnet
with:
dotnet-version: |
3.1.x
6.0.x
- name: Stamp Version
Expand Down
1 change: 0 additions & 1 deletion .root.targets
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
-->

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<EnableDefaultItems>false</EnableDefaultItems>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
Expand Down
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Most lines should begin with one of these words:
*Add*, *Fix*, *Update*, *Change*, *Deprecate*, *Remove*.

## [Unreleased](https://github.com/sharpjs/PSql/compare/release/2.1.0..HEAD)
- Change target to PowerShell 7.2 / .NET 6.
- Change how the module loads dependencies. Now, the module loads dependencies
into a private context using [the recommended technique](https://learn.microsoft.com/en-us/powershell/scripting/dev-cross-plat/resolving-dependency-conflicts)
to prevent errors if other moduels load conflicting dependencies.
Expand Down
1 change: 1 addition & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

<!-- Build properties -->
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>12</LangVersion>
<ImplicitUsings>true</ImplicitUsings>
<Nullable>enable</Nullable>
Expand Down
4 changes: 2 additions & 2 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@

<ItemGroup>
<PackageVersion Include="Microsoft.Data.SqlClient" Version="5.1.2" />
<PackageVersion Include="Microsoft.PowerShell.SDK" Version="7.0.13" />
<PackageVersion Include="Microsoft.PowerShell.SDK" Version="7.2.17" />
<PackageVersion Include="Prequel" Version="1.0.3" />
<PackageVersion Include="Subatomix.Build.Packaging.PowerShellModule" Version="1.1.1" />
<PackageVersion Include="Subatomix.Testing" Version="2.5.0" />
<PackageVersion Include="System.Management.Automation" Version="[7.0.0, 8.0.0)" />
<PackageVersion Include="System.Management.Automation" Version="[7.2.0, 8.0.0)" />
<PackageVersion Include="Unindent" Version="1.1.1" />
</ItemGroup>

Expand Down
1 change: 0 additions & 1 deletion PSql.Core/PSql.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

<PropertyGroup>
<Description>PSql Core Types Library</Description>
<TargetFramework>netcoreapp3.1</TargetFramework>
<RootNamespace>PSql</RootNamespace>
<IsPackable>false</IsPackable>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand Down
1 change: 0 additions & 1 deletion PSql.Tests/PSql.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

<PropertyGroup>
<Description>Tests for PSql</Description>
<TargetFramework>netcoreapp3.1</TargetFramework>
<RootNamespace>PSql</RootNamespace>
</PropertyGroup>

Expand Down
1 change: 0 additions & 1 deletion PSql.private/PSql.private.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

<PropertyGroup>
<Description>PSql Private Dependencies Library</Description>
<TargetFramework>netcoreapp3.1</TargetFramework>
<RuntimeIdentifiers>win-arm;win-arm64;win-x64;win-x86;unix</RuntimeIdentifiers>
<RootNamespace>PSql</RootNamespace>
<IsPackable>false</IsPackable>
Expand Down
1 change: 0 additions & 1 deletion PSql/PSql.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

<PropertyGroup>
<Description>Cmdlets to connect and invoke commands against SQL Server, Azure SQL Database, or compatible products.</Description>
<TargetFramework>netcoreapp3.1</TargetFramework>
<GenerateDependencyFile>false</GenerateDependencyFile>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion PSql/PSql.psd1.t
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

# Requirements
CompatiblePSEditions = 'Core'
PowerShellVersion = '7.0'
PowerShellVersion = '7.2'
#RequiredModules = @(...)
RequiredAssemblies = @("PSql.Core")

Expand Down
3 changes: 3 additions & 0 deletions PSql/_Commands/ConnectSqlCommand.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// Copyright 2023 Subatomix Research Inc.
// SPDX-License-Identifier: ISC

// Don't require doc comments. Commands are documented via a help file.
#pragma warning disable CS1591

namespace PSql;

[Cmdlet(VerbsCommunications.Connect, "Sql")]
Expand Down
3 changes: 3 additions & 0 deletions PSql/_Commands/ConnectedCmdlet.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// Copyright 2023 Subatomix Research Inc.
// SPDX-License-Identifier: ISC

// Don't require doc comments. Commands are documented via a help file.
#pragma warning disable CS1591

namespace PSql;

/// <summary>
Expand Down
3 changes: 3 additions & 0 deletions PSql/_Commands/DisconnectSqlCommand.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// Copyright 2023 Subatomix Research Inc.
// SPDX-License-Identifier: ISC

// Don't require doc comments. Commands are documented via a help file.
#pragma warning disable CS1591

namespace PSql;

[Cmdlet(VerbsCommunications.Disconnect, "Sql")]
Expand Down
3 changes: 3 additions & 0 deletions PSql/_Commands/ExpandSqlCmdDirectivesCommand.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// Copyright 2023 Subatomix Research Inc.
// SPDX-License-Identifier: ISC

// Don't require doc comments. Commands are documented via a help file.
#pragma warning disable CS1591

using System.Collections;

namespace PSql;
Expand Down
3 changes: 3 additions & 0 deletions PSql/_Commands/InvokeSqlCommand.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// Copyright 2023 Subatomix Research Inc.
// SPDX-License-Identifier: ISC

// Don't require doc comments. Commands are documented via a help file.
#pragma warning disable CS1591

using System.Collections;

namespace PSql;
Expand Down
3 changes: 3 additions & 0 deletions PSql/_Commands/NewSqlContextCommand.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// Copyright 2023 Subatomix Research Inc.
// SPDX-License-Identifier: ISC

// Don't require doc comments. Commands are documented via a help file.
#pragma warning disable CS1591

namespace PSql;

using static ApplicationIntent;
Expand Down
3 changes: 3 additions & 0 deletions PSql/_Data/SqlContext.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// Copyright 2023 Subatomix Research Inc.
// SPDX-License-Identifier: ISC

// TODO: Document
#pragma warning disable CS1591

using System.Globalization;
using System.Net;
using System.Runtime.CompilerServices;
Expand Down
3 changes: 3 additions & 0 deletions PSql/_Metadata/ValidateNullOrPositiveUInt16Attribute.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// Copyright 2023 Subatomix Research Inc.
// SPDX-License-Identifier: ISC

// TODO: Document
#pragma warning disable CS1591

namespace PSql;

public class ValidateNullOrPositiveUInt16Attribute : ValidateArgumentsAttribute
Expand Down
3 changes: 3 additions & 0 deletions PSql/_Metadata/ValidateNullOrTimeoutAttribute.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// Copyright 2023 Subatomix Research Inc.
// SPDX-License-Identifier: ISC

// TODO: Document
#pragma warning disable CS1591

namespace PSql;

public class ValidateNullOrTimeoutAttribute : ValidateArgumentsAttribute
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ of production use too.

## Installation

PSql requires PowerShell 7.0 or later and should work on any platform where
PSql requires PowerShell 7.2 or later and should work on any platform where
PowerShell runs.

To install PSql from [PowerShell Gallery](https://www.powershellgallery.com/packages/PSql),
Expand Down

0 comments on commit df20630

Please sign in to comment.