Skip to content

Commit 6044479

Browse files
Fix issue with Csla.Web.Mvc package versioning (#4787)
* Update beta version * Update BlazorExample to net10.0 and csla 10 * #4774 Update state handling * #4774 Diagnosing and fixing blazor context issue * Update sample * #4786 Fix package versioning * Add claude settings
1 parent 34b3127 commit 6044479

6 files changed

Lines changed: 36 additions & 38 deletions

File tree

.claude/settings.local.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(dotnet nbgv:*)",
5+
"Bash(dotnet build:*)"
6+
]
7+
}
8+
}

Samples/BlazorExample/BlazorExample/BlazorExample.Client/Components/Pages/Counter.razor

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,25 @@
1818
}
1919

2020
@code {
21-
[CascadingParameter]
22-
private Task<AuthenticationState>? authenticationState { get; set; }
23-
private int currentCount = 0;
24-
25-
protected override async Task OnInitializedAsync()
26-
{
27-
// Every page _must_ initialize the state manager
28-
await StateManager.InitializeAsync();
29-
if (applicationContext.LocalContext.Contains("counter"))
30-
{
31-
var value = applicationContext.LocalContext["counter"];
32-
currentCount = value == null ? 0 : (int)value;
33-
}
34-
}
35-
36-
private void IncrementCount()
37-
{
38-
currentCount++;
39-
applicationContext.LocalContext["counter"] = currentCount;
40-
StateManager.SaveState();
41-
}
21+
[CascadingParameter]
22+
private Task<AuthenticationState>? authenticationState { get; set; }
23+
private int currentCount = 0;
24+
25+
protected override async Task OnInitializedAsync()
26+
{
27+
// Every page _must_ initialize the state manager
28+
await StateManager.InitializeAsync();
29+
if (applicationContext.LocalContext.Contains("counter"))
30+
{
31+
var value = applicationContext.LocalContext["counter"];
32+
currentCount = value == null ? 0 : (int)value;
33+
}
34+
}
35+
36+
private void IncrementCount()
37+
{
38+
currentCount++;
39+
applicationContext.LocalContext["counter"] = currentCount;
40+
StateManager.SaveState();
41+
}
4242
}

Samples/BlazorExample/BlazorExample/BlazorExample/Components/Layout/NavMenu.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
</NavLink>
3333
</div>
3434

35-
<div class="nav-item px-3">
35+
<div class="nav-item px-3">
3636
<NavLink class="nav-link" href="weather">
3737
<span class="bi bi-list-nested-nav-menu" aria-hidden="true"></span> Weather
3838
</NavLink>

Source/Csla.Web.Mvc5.Net4.6/Csla.Web.Mvc5-Net4.6.csproj

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@
1919
<PackageReference Include="Microsoft.AspNet.Mvc" Version="5.3.0" />
2020
<PackageReference Include="Microsoft.AspNet.WebApi.Core" Version="5.3.0" />
2121
<PackageReference Include="Microsoft.Web.Infrastructure" Version="2.0.0" />
22+
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
23+
<PackageReference Include="Microsoft.Build.Tasks.Git" Version="8.0.0">
24+
<PrivateAssets>all</PrivateAssets>
25+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
26+
</PackageReference>
2227
</ItemGroup>
2328
<ItemGroup>
24-
<Reference Include="Microsoft.Web.Infrastructure, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
25-
<HintPath>..\packages\Microsoft.Web.Infrastructure.2.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
26-
<Private>True</Private>
27-
</Reference>
2829
<Reference Include="System.Web" />
2930
<Reference Include="System.Xml" />
3031
<Reference Include="System.Xml.Linq" />

Source/Csla.Web.Mvc5.Net4.6/packages.config

Lines changed: 0 additions & 11 deletions
This file was deleted.

Source/version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/main/src/NerdBank.GitVersioning/version.schema.json",
3-
"version": "10.0.0-beta.0021",
3+
"version": "10.0.0-beta.0022",
44
"publicReleaseRefSpec": [
55
"^refs/heads/main$",
66
"^refs/heads/release$",

0 commit comments

Comments
 (0)