GFlisch / Arc4u.Guidance.Doc

Other
5 stars 1 forks source link

Adding a new Blazor project does not build #198

Closed poldepuysseleyr closed 11 months ago

poldepuysseleyr commented 11 months ago

Describe the bug Adding a new Blazor web project does not build from the get go.

First bug: Visual studio detects 3 nuget packages that are a downgrade:

Second bug: OAuth2HttpHandler.cs and OAuth2TokenSettingsReader.cs seem to be missing in the Infrastructure folder, but are defined in an ItemGroup as included on compile time in the csproj.

These are also required in the Program.cs line 32.

Third bug: In Program.cs line 58 in the services.AddScopedOperationsPolicy method, Operations get passed but these are not defined in the project. This is probably something we have to add manually, but a disclaimer could come in handy.

To Reproduce Steps to reproduce the behavior:

  1. In a new project after defining the backend, add a new blazor project through the Guidance in the FE folder.
  2. Build the solution
  3. See errors

Expected behavior First bug: Upgrading the packages to the correct version. Tested this myself. I manually updated the version in the csproj as in screenshot to the required version and the error was gone. Nuget upgrade

Second bug: Make sure files are present in the Infrastructure folder. I copy pasted them from another project (SN 4.0), then removed the ItemGroup in the csproj, added import in Program.cs and errors were resolved.

Third bug: No error anymore for operations. Maybe a disclaimer what we should pass through here. I did this just so I could move on in the project. operations fix

Screenshots First bug: Error when adding new blazor project

Second bug: OAuth2 errors

Third bug: Program cs errors

Desktop (please complete the following information):

GFlisch commented 11 months ago

Hi @poldepuysseleyr , this is due to the fact that the templates have been adapted to the Guidance 2022.2.1.13. You have first to update your project to 2022.2.1.13 before you can do this. Old Guidance script is applied to new templates and even classes that don’t exist anymore…

poldepuysseleyr commented 11 months ago

Ok, my bad. Did not see there was a new version yet. Sorry for the fake news then.

GFlisch commented 11 months ago

No issue @poldepuysseleyr .