Skip to content

Commit

Permalink
Update development tools to .NET 7.0 #1870 (#2473)
Browse files Browse the repository at this point in the history
  • Loading branch information
BernieWhite authored Oct 7, 2023
1 parent 01256b4 commit 247f948
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.x
dotnet-version: 7.x

- name: Install dependencies
shell: pwsh
Expand Down
6 changes: 6 additions & 0 deletions docs/CHANGELOG-v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ See [upgrade notes][1] for helpful information when upgrading from previous vers

## Unreleased

What's changed since v1.30.2:

- Engineering:
- Bump development tools to .NET 7.0 SDK by @BernieWhite.
[#1870](https://github.com/Azure/PSRule.Rules.Azure/issues/1870)

## v1.30.2

What's changed since v1.30.1:
Expand Down
10 changes: 5 additions & 5 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ For best results, configure the `PSRule.Rules.Azure` module using `ps-rule.yaml`

```yaml title="ps-rule.yaml"
requires:
PSRule.Rules.Azure: '>=1.27.0'
PSRule.Rules.Azure: '>=1.29.0'

include:
module:
Expand Down Expand Up @@ -259,10 +259,10 @@ This build script will compile the module and documentation then output the resu
| Operating System | Tool | Overview | Installation Link |
| ---------------- | ---- | -------- | ----------------- |
| Windows | Windows PowerShell | Support for version 5.1 with .NET Framework 4.7.2 or greater. | [link](https://dotnet.microsoft.com/download/dotnet-framework/net48) |
| Windows, MacOS, Linux | PowerShell | Version 7.2 or greater is support. | [link](https://github.com/PowerShell/PowerShell#get-powershell) |
| Windows, MacOS, Linux | PowerShell | Version 7.3 or greater is support. | [link](https://github.com/PowerShell/PowerShell#get-powershell) |
| - | - | Multiple PowerShell modules are required (PlatyPS, Pester, PSScriptAnalyzer, PowerShellGet, PackageManagement, InvokeBuild, PSRule). | Installed when you run the `build.ps1` script |
| - | .NET | .NET SDK v6 is required. | [link](https://dotnet.microsoft.com/en-us/download/dotnet/6.0) |
| - | Bicep CLI | PSRule depends on the Bicep CLI to decompile (expand) Bicep modules to ARM | [link](https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/install) |
| - | .NET | .NET SDK v7 is required. | [link](https://dotnet.microsoft.com/en-us/download/dotnet/6.0) |
| - | Bicep CLI | PSRule depends on the Bicep CLI to expand Bicep modules to ARM | [link](https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/install) |

The following dependencies will be automatically installed if the required versions are not present:

Expand Down Expand Up @@ -320,4 +320,4 @@ After downloading the modules, copy the module directories to devices with restr
*[CI]: continuous integration

[module]: https://www.powershellgallery.com/packages/PSRule.Rules.Azure
[dotnet]: https://dotnet.microsoft.com/download/dotnet/6.0
[dotnet]: https://dotnet.microsoft.com/download/dotnet/7.0
2 changes: 1 addition & 1 deletion pipeline.build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ task ScaffoldHelp Build, BuildRuleDocs, {

task Benchmark {
if ($Benchmark -or $BuildTask -eq 'Benchmark') {
dotnet run --project src/PSRule.Rules.Azure.Benchmark -f net6.0 -c Release -- benchmark --output $PWD;
dotnet run --project src/PSRule.Rules.Azure.Benchmark -f net7.0 -c Release -- benchmark --output $PWD;
}
}

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

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<PlatformTarget>AnyCPU</PlatformTarget>
<ProjectGuid>{9bb90abe-25f9-4110-af9f-149b0618b2a0}</ProjectGuid>
<RepositoryUrl>https://github.com/Azure/PSRule.Rules.Azure</RepositoryUrl>
Expand All @@ -19,6 +19,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.3.7" />
<PackageReference Include="System.Management.Automation" Version="7.3.7" />
<PackageReference Include="BenchmarkDotNet" Version="0.13.8" />
<PackageReference Include="Microsoft.Extensions.CommandLineUtils" Version="1.1.1" />
</ItemGroup>
Expand All @@ -27,14 +29,6 @@
<PackageReference Include="BenchmarkDotNet.Diagnostics.Windows" Version="0.13.8" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net472'">
<PackageReference Include="Microsoft.PowerShell.5.1.ReferenceAssemblies" Version="1.0.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.2.6" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\PSRule.Rules.Azure\PSRule.Rules.Azure.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="..\PSRule.Common.props" />
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<ProjectGuid>{218b2d45-a2bd-4966-9b9f-4064cd68ba8a}</ProjectGuid>
<EnableNuget>false</EnableNuget>
<IsPackable>false</IsPackable>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<ProjectGuid>{28251f7f-fc8c-495b-af73-d134f642ffb9}</ProjectGuid>
<IsTestProject>true</IsTestProject>
<IsPackable>false</IsPackable>
Expand All @@ -11,7 +11,8 @@

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.2.6" />
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.3.7" />
<PackageReference Include="System.Management.Automation" Version="7.3.7" />
<PackageReference Include="xunit" Version="2.5.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.1">
<PrivateAssets>all</PrivateAssets>
Expand Down

0 comments on commit 247f948

Please sign in to comment.