Fix all build warnings: remove unused variable (CS0219) and suppress CA1416 for Windows-only WPF app
This commit is contained in:
@@ -1,6 +1,9 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net10.0-windows</TargetFramework>
|
<TargetFramework>net10.0-windows10.0.17763.0</TargetFramework>
|
||||||
|
<SupportedOSPlatformVersion>10.0.17763.0</SupportedOSPlatformVersion>
|
||||||
|
<!-- CA1416: App esclusivamente WPF/Windows, le API di piattaforma sono sempre disponibili -->
|
||||||
|
<NoWarn>$(NoWarn);CA1416</NoWarn>
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<RootNamespace>HorseRacingPredictor</RootNamespace>
|
<RootNamespace>HorseRacingPredictor</RootNamespace>
|
||||||
<AssemblyName>HorseRacingPredictor</AssemblyName>
|
<AssemblyName>HorseRacingPredictor</AssemblyName>
|
||||||
|
|||||||
@@ -97,7 +97,6 @@ namespace HorseRacingPredictor.HorseRacing
|
|||||||
|
|
||||||
int totalPhases = (doAu ? 1 : 0) + (doNz ? 1 : 0);
|
int totalPhases = (doAu ? 1 : 0) + (doNz ? 1 : 0);
|
||||||
int currentPhase = 0;
|
int currentPhase = 0;
|
||||||
int totalRunners = 0;
|
|
||||||
int totalErrors = 0;
|
int totalErrors = 0;
|
||||||
int totalMeetings = 0;
|
int totalMeetings = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Runtime.Versioning;
|
||||||
|
|
||||||
// Le informazioni generali relative a un assembly sono controllate dal seguente
|
// Le informazioni generali relative a un assembly sono controllate dal seguente
|
||||||
// set di attributi. Modificare i valori di questi attributi per modificare le informazioni
|
// set di attributi. Modificare i valori di questi attributi per modificare le informazioni
|
||||||
|
|||||||
@@ -1,106 +0,0 @@
|
|||||||
# Release Notes — v2.0.0
|
|
||||||
|
|
||||||
**Data**: 2025-07-15
|
|
||||||
**Tag**: `v2.0.0`
|
|
||||||
**Branch**: `main`
|
|
||||||
**Commit**: `a7cb8e0`
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Panoramica
|
|
||||||
|
|
||||||
Aggiornamento completo di **BettingPredictor** da .NET Framework 4.8.1 a **.NET 10.0**, con modernizzazione del sistema di configurazione e rimozione di tutte le dipendenze legacy.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Modifiche principali
|
|
||||||
|
|
||||||
### ?? Upgrade .NET Framework 4.8.1 ? .NET 10.0
|
|
||||||
|
|
||||||
- Convertito il progetto da formato classico a **SDK-style** (`Microsoft.NET.Sdk`)
|
|
||||||
- Target framework aggiornato a `net10.0-windows`
|
|
||||||
- Rimosso `packages.config` — tutti i pacchetti ora gestiti via `<PackageReference>`
|
|
||||||
- Rimosso `CsvHelperStubs.cs` — non più necessario con CsvHelper 33.1 su .NET 10
|
|
||||||
|
|
||||||
### ?? Pacchetti NuGet aggiornati
|
|
||||||
|
|
||||||
| Pacchetto | Vecchia versione | Nuova versione |
|
|
||||||
|---|---|---|
|
|
||||||
| CsvHelper | 30.x (con stubs) | **33.1.0** |
|
|
||||||
| Microsoft.Data.SqlClient | *(nuovo)* | **7.0.0** |
|
|
||||||
| Microsoft.ML | 3.x | **6.0.0-preview** |
|
|
||||||
| Microsoft.Web.WebView2 | 1.x | **1.0.3908-prerelease** |
|
|
||||||
| RestSharp | 110.x | **114.0.0** |
|
|
||||||
| Microsoft.Extensions.Configuration.Json | *(nuovo)* | **10.0.5** |
|
|
||||||
|
|
||||||
### ?? Migrazione SqlClient
|
|
||||||
|
|
||||||
- `System.Data.SqlClient` ? `Microsoft.Data.SqlClient` in **19 file**
|
|
||||||
- Aggiunto `TrustServerCertificate=True` alle connection string per compatibilità
|
|
||||||
|
|
||||||
### ?? Migrazione configurazione
|
|
||||||
|
|
||||||
#### app.config ? appsettings.json
|
|
||||||
- Eliminato `App.config` (assembly binding redirects non necessari su .NET 10)
|
|
||||||
- Eliminati `Properties/Settings.Designer.cs` e `Properties/Settings.settings` (vuoti/inutilizzati)
|
|
||||||
- Rimosso pacchetto `System.Configuration.ConfigurationManager`
|
|
||||||
- Creato `appsettings.json` con connection strings e API keys
|
|
||||||
- Creato `AppConfig.cs` — classe statica per accesso centralizzato alla configurazione
|
|
||||||
- Connection strings e API key non più hardcoded nel codice sorgente
|
|
||||||
- Supporto per override per ambiente (`appsettings.Development.json`)
|
|
||||||
|
|
||||||
#### settings.ini ? usersettings.json
|
|
||||||
- Creato `UserSettings.cs` — classe POCO tipizzata con 16 proprietà
|
|
||||||
- Serializzazione/deserializzazione JSON con `System.Text.Json`
|
|
||||||
- Migrazione automatica one-time: se trova un vecchio `settings.ini`, lo converte e lo elimina
|
|
||||||
- Valori tipizzati (`bool`, `List<string>`) anziché parsing manuale di "1"/"0"
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## File eliminati
|
|
||||||
|
|
||||||
- `App.config`
|
|
||||||
- `packages.config`
|
|
||||||
- `CsvHelperStubs.cs`
|
|
||||||
- `Properties/Settings.Designer.cs`
|
|
||||||
- `Properties/Settings.settings`
|
|
||||||
|
|
||||||
## File creati
|
|
||||||
|
|
||||||
- `appsettings.json` — configurazione applicazione (connection strings, API keys)
|
|
||||||
- `AppConfig.cs` — helper per `IConfiguration`
|
|
||||||
- `UserSettings.cs` — preferenze utente persistenti in JSON
|
|
||||||
|
|
||||||
## File modificati (principali)
|
|
||||||
|
|
||||||
- `BettingPredictor.csproj` — conversione SDK-style + nuovi pacchetti
|
|
||||||
- `Manager/Database.cs` — costruttore con connection string da configurazione
|
|
||||||
- `Football/Manager/Database.cs` — connection string da `AppConfig`
|
|
||||||
- `Football/Manager/API.cs` — API key/headers da `AppConfig`
|
|
||||||
- `Horses/Database.cs` — connection string da `AppConfig`
|
|
||||||
- `MainWindow.xaml.cs` — settings via `UserSettings.Load()`/`Save()`
|
|
||||||
- 19 file con migrazione `System.Data.SqlClient` ? `Microsoft.Data.SqlClient`
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Build
|
|
||||||
|
|
||||||
- ? **0 errori**
|
|
||||||
- ?? 1 warning informativo (`NU1510` — pacchetti preview)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Requisiti di runtime
|
|
||||||
|
|
||||||
- **.NET 10.0 SDK** (o superiore)
|
|
||||||
- **Windows** (WPF + Windows Forms interop)
|
|
||||||
- **Microsoft Edge WebView2 Runtime** (per la sezione Calcio Virtuale)
|
|
||||||
- **SQL Server** raggiungibile (per le funzionalità database)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Note di compatibilità
|
|
||||||
|
|
||||||
- Il file `settings.ini` esistente viene **migrato automaticamente** a `usersettings.json` al primo avvio
|
|
||||||
- Le connection string sono ora in `appsettings.json` — aggiornare i valori per il proprio ambiente
|
|
||||||
- `appsettings.json` può essere aggiunto a `.gitignore` per proteggere credenziali
|
|
||||||
Reference in New Issue
Block a user