Convert all project files to SDK-style format (remaining on .NET Framework 4.8)#197
Convert all project files to SDK-style format (remaining on .NET Framework 4.8)#197Copilot wants to merge 10 commits into
Conversation
- Convert HaemophilusWeb.csproj to SDK-style format - Convert HaemophilusWebTests.csproj to SDK-style format - Convert AccessImporter.csproj to SDK-style format - Convert CsvImporter.csproj to SDK-style format - Convert SystemTests.csproj to SDK-style format - Remove all packages.config files (dependencies migrated to PackageReference) - Update GitHub Actions workflow to use dotnet build and dotnet test Co-authored-by: markusrt <299753+markusrt@users.noreply.github.com>
markusrt
left a comment
There was a problem hiding this comment.
@copilot after this change lots of tests are failing with null exception. Can you take a look and fix the issues?
Failed DataTable_OtherClinicalInformation [2 ms]
Error Message:
System.TypeInitializationException : The type initializer for 'HaemophilusWeb.Domain.MeningoIsolateInterpretation' threw an exception.
----> System.ArgumentNullException : Value cannot be null.
Parameter name: stream
Stack Trace:
at HaemophilusWeb.Domain.MeningoIsolateInterpretation..ctor()
at HaemophilusWeb.Tools.MeningoSendingLaboratoryExport..ctor() in D:\a\NRZMHiDB\NRZMHiDB\HaemophilusWeb\Tools\MeningoSendingLaboratoryExport.cs:line 13
at HaemophilusWeb.Tools.MeningoSendingLaboratoryExportTests.CreateExportDefinition() in D:\a\NRZMHiDB\NRZMHiDB\HaemophilusWebTests\Tools\MeningoSendingLaboratoryExportTests.cs:line 310
at HaemophilusWeb.Tools.MeningoSendingLaboratoryExportTests.DataTable_OtherClinicalInformation() in D:\a\NRZMHiDB\NRZMHiDB\HaemophilusWebTests\Tools\MeningoSendingLaboratoryExportTests.cs:line 217
--ArgumentNullException
at System.IO.StreamReader..ctor(Stream stream, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean leaveOpen)
at System.IO.StreamReader..ctor(Stream stream)
at HaemophilusWeb.Domain.MeningoIsolateInterpretation.DeserializeFromResource[T](String resourceName) in D:\a\NRZMHiDB\NRZMHiDB\HaemophilusWeb\Domain\MeningoIsolateInterpretation.cs:line 195
at HaemophilusWeb.Domain.MeningoIsolateInterpretation..cctor() in D:\a\NRZMHiDB\NRZMHiDB\HaemophilusWeb\Domain\MeningoIsolateInterpretation.cs:line 22
Fix TypeInitializationException by including the JSON files as embedded resources in HaemophilusWeb.csproj. The SDK-style project format does not automatically include files as embedded resources. Co-authored-by: markusrt <299753+markusrt@users.noreply.github.com>
Fixed in ed869a0. The SDK-style project format doesn't automatically include files as embedded resources. Added the three JSON files from |
|
@copilot there is an issue with project
|
…udio This allows Visual Studio to recognize the project as a web application and enables running/debugging with IIS Express. Co-authored-by: markusrt <299753+markusrt@users.noreply.github.com>
Fixed in 0e640e6. Added |
@copilot this did not fix it. Still it complains about this being a class library that can not be started. |
Switch from Microsoft.NET.Sdk to Microsoft.NET.Sdk.Web which provides better Visual Studio integration for ASP.NET web applications. Remove duplicate content includes that are now auto-included by the Web SDK. Co-authored-by: markusrt <299753+markusrt@users.noreply.github.com>
Fixed in 6471350. Changed the SDK from |
|
|
@copilot Please merge master into this branch. |
|
@copilot Please merge master into this branch. |
…ject-files-to-sdk-style # Conflicts: # .github/workflows/main.yml Co-authored-by: markusrt <299753+markusrt@users.noreply.github.com>
|
@copilot there is a security finding from Sonar in .github/workflows/main.yml, please fix it: uses: microsoft/setup-msbuild@v2 |
Co-authored-by: markusrt <299753+markusrt@users.noreply.github.com>
Fixed in commit 52bfca4. Updated both actions to use full commit SHAs:
This hardens the workflow against tag spoofing attacks. |
|
@copilot please merge master into this branch |
…ject-files-to-sdk-style Co-authored-by: markusrt <299753+markusrt@users.noreply.github.com>
Done. Merged |
|
@copilot one of the last two merges done by you today went wrong. The project "HaemophilusWeb/HaemophilusWeb.csproj" does not load anymore and does not even have a valid XML. Please check the two merges from tody carefully and do it properly. |
Co-authored-by: markusrt <299753+markusrt@users.noreply.github.com>
Fixed. Both merges had silently combined master's old-style csproj content into the SDK-style files:
I restored the clean SDK-style projects. All of master's new files (ConfigurationController, ConfigurationService, the new migrations, the new tests, etc.) are picked up automatically via |
|



Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.