Skip to content

Spike/mvc packagereference migration - #1

Closed
dgates82 wants to merge 12 commits into
mainfrom
spike/mvc-packagereference-migration
Closed

Spike/mvc packagereference migration#1
dgates82 wants to merge 12 commits into
mainfrom
spike/mvc-packagereference-migration

Conversation

@dgates82

@dgates82 dgates82 commented Jul 9, 2026

Copy link
Copy Markdown
Owner

No description provided.

dgates82 added 12 commits July 6, 2026 20:16
- Rename secret path from dev/DGates.AwsSecretsManager.Examples/OpenWeatherMap
  to dev/MvcExample/OpenWeatherMap, matching ConsoleExample's
  dev/ConsoleExample/DbConfig pattern
- Update seed-secrets.sh to seed the new secret name
- Fix LOCAL_DEV.md fallback JSON example to match secret name/shape
  actually seeded (Url + Key fields, not ApiKey)
- Add dev/MvcExample/OpenWeatherMap to "Secrets seeded by default" table
- Document seed-secrets.local.sh as the supported pattern for testing
  against a real OpenWeatherMap key (gitignored, never committed)
… layout

feat: add weather demo page, MvcExample.Core/Tests split, Bootstrap 5 layout

- Weather controller/view is the default route; drop Home, About, HowTo,
  Contact in favor of a single working demo
- Add MvcExample.Core (net48;net8.0) for testable, AWS-SDK-free
  secret/view-model logic
- Add MvcExample.Tests (xUnit), runs cross-platform via
  `dotnet test --framework net8.0`
- Wire both into the .sln alongside the existing MvcExample web project
- Update _Layout.cshtml for Bootstrap 5
… layout

- Weather controller/view is the new default route; drop Home/Index and
  Contact, keep About (content replaced)
- Add MvcExample.Core (net48;net8.0) for testable, AWS-SDK-free
  secret/view-model logic
- Add MvcExample.Tests (xUnit), runs cross-platform via
  `dotnet test --framework net8.0`
- Wire both into the .sln alongside the existing MvcExample web project
- Update _Layout.cshtml for Bootstrap 5, add Weather Demo/GitHub nav links
- Rename section to "Running examples without Docker"
- Add ConsoleExample JSON fallback steps (was MvcExample-only)
- Fix DbConfig fixture shape to match seed-secrets.sh (Server/Database/
  Username/Password, not guessed fields)
- Fix MvcExample placeholder key to YOUR_KEY_HERE, matching seed script
…th resolution

- Program.cs: read LocalJsonFallbackPath from App.config and set it on
  SecretsManagerSettings (was previously missing entirely)
- ConsoleExample.csproj: copy fixtures/console-secrets.json to output
  directory on build, so the relative path in App.config resolves when
  running the built exe
- LOCAL_DEV.md: correct ConsoleExample fallback steps to match actual
  wiring; add matching MvcExample fixture section
  - Without a BOM, classic ASP.NET Razor falls back to the machine's
    default codepage instead of UTF-8, corrupting the em dash (— → â€")
    in About.cshtml and Weather/Index.cshtml
- Move 9 packages (Mvc, Razor, WebPages, Web.Optimization,
    Web.Infrastructure, WebGrease, Antlr, Newtonsoft.Json, CodeDom
    compiler platform) from packages.config to PackageReference, so
    `dotnet restore`/`dotnet build` no longer depend on a pre-populated
    local packages/ folder (which doesn't exist on a clean CI checkout)
  - packages.config now only holds the 4 content-only front-end
    packages (bootstrap, jQuery, jQuery.Validation, unobtrusive
    validation) whose files are already checked in
  - Legacy (non-SDK) csproj doesn't auto-populate compile references
    from PackageReference like SDK-style projects do, so wire each package's resolved path via GeneratePathProperty + explicit
    Reference/HintPath instead
  - Keep CodeDom compiler-platform's build customization
    Windows/full-framework-only (ExcludeAssets on Core), same fix as
    before, now expressed as PackageReference metadata
  - Drop the now-obsolete manual CodeDom props import and
    EnsureNuGetPackageBuildImports target (packages.config-era
    bookkeeping)
  - Verified full solution build + test pass from a clean state with no
    local packages/ folder present
- WeatherController: secret lookup -> geocode -> weather -> view model,
    with user-facing messages for unconfigured key/city-not-found/errors
  - MvcExample.Core: pure parsing/view-model logic, no AWS SDK/System.Web
    dependency, covered by 17 new unit tests
  - Add MvcExample.Infrastructure (net48-only) to hold SecretsManagerAccessor,
    so the legacy web project pulls in DGates.AwsSecretsManager and its
    transitive deps via ProjectReference instead of hand-wired references
  - Web.config: add AWS/LocalStack appSettings, fix stale Newtonsoft.Json
    binding redirect (11.0.0.0 -> 13.0.0.0), add post-build copy step for
    transitive DLLs the legacy project's P2P copy was dropping
  - Update CLAUDE.md structure and docs/LOCAL_DEV.md
@dgates82 dgates82 closed this Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant