migrate from default target framework net472 to net48

This commit is contained in:
Jason Gilbertson 2023-02-05 13:34:47 -05:00
Родитель a76506438d
Коммит d20b0fccde
10 изменённых файлов: 42 добавлений и 30 удалений

2
.github/workflows/workflow.yml поставляемый
Просмотреть файл

@ -6,7 +6,7 @@ env:
artifacts_path: .\src\bin\artifacts
release_path: .\src\bin\Release
release_config: .\configurationFiles\collectsfdata.options.json
target_version: net472
target_version: net48
github_owner: ${{ github.event.repository.owner.name }}
on:

Просмотреть файл

@ -1,5 +1,9 @@
# Change log
##
- migrate from .net472 default to .net48 default
## 02/05/2023
- fix configuration class inconsistencies in base classes

Просмотреть файл

@ -68,7 +68,7 @@ Use the below steps to setup environment for use with CollectSFData.
1. Download latest release from nuget or github release:
a. nuget
1. nuget install Microsoft.ServiceFabric.CollectSFData
1. cd .\Microsoft.ServiceFabric.CollectSFData.{{ version }}\lib\net472
1. cd .\Microsoft.ServiceFabric.CollectSFData.{{ version }}\lib\net48
b. github
1. [collectsfdata.zip](https://github.com/microsoft/CollectServiceFabricData/releases/latest)

Просмотреть файл

@ -378,7 +378,7 @@ C:.
| | Sf.Tx.Core.dll
| | Sf.Tx.Windows.dll
| |
| +---net472
| +---net48
| | CollectSFDataDll.dll
| | Sf.Tx.Core.dll
| | Sf.Tx.Windows.dll
@ -526,7 +526,7 @@ C:.
| | System.Xml.XPath.dll
| | System.Xml.XPath.XDocument.dll
| |
| +---net472
| +---net48
| | CollectSFData.exe
| | CollectSFData.exe.config
| | collectsfdata.options.json

Просмотреть файл

@ -3,8 +3,8 @@
#>
param(
[ValidateSet('net472', 'netcoreapp2.2', 'netcoreapp3.1', 'net6.0', 'net462')]
[string[]]$targetFrameworks = @('net472', 'netcoreapp3.1', 'net6.0', 'net462'),
[ValidateSet('net48', 'netcoreapp2.2', 'netcoreapp3.1', 'net6.0', 'net462')]
[string[]]$targetFrameworks = @('net48', 'netcoreapp3.1', 'net6.0', 'net462'),
[ValidateSet('all', 'debug', 'release')]
$configuration = 'all',
[switch]$publish,

Просмотреть файл

@ -10,6 +10,7 @@ creates $nuget ps object with functions an properties to manage nuget packages
# -allversions is broken in nuget.exe
.EXAMPLE
[net.servicePointManager]::Expect100Continue = $true;[net.servicePointManager]::SecurityProtocol = [net.SecurityProtocolType]::Tls12;
invoke-webRequest "https://raw.githubusercontent.com/microsoft/CollectServiceFabricData/master/scripts/nuget-functions.ps1" -outFile "$pwd/nuget-functions.ps1";
.\nuget-functions.ps1;
$nuget
@ -43,7 +44,7 @@ class NugetObj {
if (!(test-path $this.nuget)) {
write-host "downloading nuget"
invoke-webRequest $nugetDownloadUrl -outFile $this.nuget
[net.webclient]::new().DownloadFile($nugetDownloadUrl, $this.nuget)
}
}
else {
@ -101,7 +102,9 @@ class NugetObj {
mkdir $packageDirectory
}
$this.locals.Add($packageDirectoryName, $packageDirectory)
if(!($this.locals.Contains($packageDirectoryName))) {
$this.locals.Add($packageDirectoryName, $packageDirectory)
}
}
if ((test-path $this.nugetFallbackFolder)) {
@ -299,7 +302,7 @@ class NugetObj {
}
[string[]] GetDirectories([string]$sourcePath, [string]$sourcePattern) {
write-host "getdirectories: $sourcePath $sourcePattern"
write-host "getdirectories: $sourcePath\$sourcePattern"
if (!(test-path $sourcePath)) {
$sourcePath = $this.EnumLocalsPath($sourcePath)
}
@ -338,7 +341,12 @@ class NugetObj {
$outputDirectory = $null
if ($packagesDirectory) {
if (!(test-path $packagesDirectory)) {
$packagesDirectory = $this.EnumLocalsPath($packagesDirectory)
write-host "checking: $packagesDirectory"
$outputDirectory = $this.EnumLocalsPath($packagesDirectory)
if (!$outputDirectory) {
write-host "creating path: $packagesDirectory"
mkdir $packagesDirectory
}
}
$outputDirectory = " -directdownload -outputdirectory $packagesDirectory"
}

Просмотреть файл

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net462;net472;net6.0</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net462;net48;net6.0</TargetFrameworks>
<Platforms>x64</Platforms>
<RuntimeIdentifiers>win-x64;ubuntu.18.04-x64</RuntimeIdentifiers>
<PlatformTarget>x64</PlatformTarget>

Просмотреть файл

@ -43,7 +43,7 @@
<dependency id="System.Security.Cryptography.Cng" version="4.7.0" exclude="Build,Analyzers" />
<dependency id="System.Security.Cryptography.ProtectedData" version="4.7.0" exclude="Build,Analyzers" />
</group>
<group targetFramework=".NETFramework4.7.2">
<group targetFramework=".NETFramework4.8.0">
<dependency id="Azure.Security.KeyVault.Certificates" version="4.1.0" exclude="Build,Analyzers" />
<dependency id="Azure.Security.KeyVault.Keys" version="4.1.0" exclude="Build,Analyzers" />
<dependency id="Azure.Security.KeyVault.Secrets" version="4.1.0" exclude="Build,Analyzers" />
@ -150,22 +150,22 @@
<file src="..\bin\$configuration$\net462\*.pdb" target="lib\net462" />
<file src="..\bin\$configuration$\net462\Etlreader.dll" target="lib\net462" />
<file src="..\bin\$configuration$\net462\System.Fabric.Strings.dll" target="lib\net462" />
<!-- net472 tools -->
<!-- net48 tools -->
<!--
<file src="..\bin\$configuration$\net472\*.exe" target="tools\net472" />
<file src="..\bin\$configuration$\net472\*.dll" target="tools\net472" />
<file src="..\bin\$configuration$\net472\*.pdb" target="tools\net472" />
<file src="..\bin\$configuration$\net472\manifests\*.man" target="tools\net472\manifests" />
<file src="..\bin\$configuration$\net472\*.config" target="tools\net472" />
<file src="..\..\configurationFiles\collectsfdata.options.json" target="tools\net472" />
<file src="..\bin\$configuration$\net48\*.exe" target="tools\net48" />
<file src="..\bin\$configuration$\net48\*.dll" target="tools\net48" />
<file src="..\bin\$configuration$\net48\*.pdb" target="tools\net48" />
<file src="..\bin\$configuration$\net48\manifests\*.man" target="tools\net48\manifests" />
<file src="..\bin\$configuration$\net48\*.config" target="tools\net48" />
<file src="..\..\configurationFiles\collectsfdata.options.json" target="tools\net48" />
-->
<!-- net472 lib -->
<file src="..\bin\$configuration$\net472\CollectSFDataDll.dll" target="lib\net472" />
<file src="..\bin\$configuration$\net472\Sf.Tx.Core.dll" target="lib\net472" />
<file src="..\bin\$configuration$\net472\Sf.Tx.Windows.dll" target="lib\net472" />
<file src="..\bin\$configuration$\net472\*.pdb" target="lib\net472" />
<file src="..\bin\$configuration$\net472\Etlreader.dll" target="lib\net472" />
<file src="..\bin\$configuration$\net472\System.Fabric.Strings.dll" target="lib\net472" />
<!-- net48 lib -->
<file src="..\bin\$configuration$\net48\CollectSFDataDll.dll" target="lib\net48" />
<file src="..\bin\$configuration$\net48\Sf.Tx.Core.dll" target="lib\net48" />
<file src="..\bin\$configuration$\net48\Sf.Tx.Windows.dll" target="lib\net48" />
<file src="..\bin\$configuration$\net48\*.pdb" target="lib\net48" />
<file src="..\bin\$configuration$\net48\Etlreader.dll" target="lib\net48" />
<file src="..\bin\$configuration$\net48\System.Fabric.Strings.dll" target="lib\net48" />
<!-- netcoreapp3.1 tools -->
<file src="..\bin\$configuration$\netcoreapp3.1\*.exe" target="tools\netcoreapp3.1" />
<file src="..\bin\$configuration$\netcoreapp3.1\*.runtimeconfig.json" target="tools\netcoreapp3.1" />

Просмотреть файл

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net462;net472;net6.0</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net462;net48;net6.0</TargetFrameworks>
<Platforms>x64</Platforms>
<PlatformTarget>x64</PlatformTarget>
<RuntimeIdentifiers>win-x64;ubuntu.18.04-x64</RuntimeIdentifiers>

Просмотреть файл

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net46;net45;net472</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net46;net45;net48</TargetFrameworks>
<SignAssembly>true</SignAssembly>
<!-- <AssemblyOriginatorKeyFile>..\key.snk</AssemblyOriginatorKeyFile> -->
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
@ -30,7 +30,7 @@
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0'">
<DefineConstants>NETCORE;NETSTANDARD;NETSTANDARD2_0</DefineConstants>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' Or '$(TargetFramework)'=='net46' Or '$(TargetFramework)'=='net472'">
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' Or '$(TargetFramework)'=='net46' Or '$(TargetFramework)'=='net48'">
<PackageReference Include="System.Reactive" Version="4.0.0" />
</ItemGroup>