From 4ebd6b97197f87db22115a3c0b751ef49004bb70 Mon Sep 17 00:00:00 2001 From: Jackson Schuster <36744439+jtschuster@users.noreply.github.com> Date: Mon, 12 May 2025 11:50:10 -0700 Subject: [PATCH 1/5] ComWrappersGeneration fix for PublishAOT with DNNE (#7048) * Set DnneBuildExports=false when publishing AOT * Set DnneAddGeneratedBinaryToProject=true * Update README to add /u flag for regsvr32.exe when unregistering --- .../source-generation/ComWrappersGeneration/README.md | 4 ++-- .../ComWrappersGeneration/Server/Server.csproj | 11 +++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/core/interop/source-generation/ComWrappersGeneration/README.md b/core/interop/source-generation/ComWrappersGeneration/README.md index 1be774bb52f..f264b0d0248 100644 --- a/core/interop/source-generation/ComWrappersGeneration/README.md +++ b/core/interop/source-generation/ComWrappersGeneration/README.md @@ -25,11 +25,11 @@ This sample supports NativeAOT and standard CoreCLR deployments. The native meth ### NativeAOT -Build the Native AOT binaries by running `dotnet publish -r ` where `` is the RuntimeIdentifier for your OS, for example `win-x64`. The projects will copy the binaries to the `OutputFiles\` directory. After publishing, use `regsvr32.exe` to register `Server.dll` with COM by running run `regsvr.exe .\OutputFiles\Server\Server.dll`. Then, run the client application `.\OutputFiles\Client\Client.exe` and observe the output as it activates and uses a COM instance from `Server.dll`. +Build the Native AOT binaries by running `dotnet publish -r ` where `` is the RuntimeIdentifier for your OS, for example `win-x64`. The projects will copy the binaries to the `OutputFiles\` directory. After publishing, use `regsvr32.exe` to register `Server.dll` with COM by running run `regsvr32.exe .\OutputFiles\Server\Server.dll`. Then, run the client application `.\OutputFiles\Client\Client.exe` and observe the output as it activates and uses a COM instance from `Server.dll`. When you are finished, unregister the server by running `regsvr32.exe /u .\OutputFiles\Server\Server.dll`. ### CoreCLR -Build the projects by running `dotnet publish`. The projects will copy the binaries to the `OutputFiles\` directory. After publishing, use `regsvr32.exe` to register the native binary produced by DNNE, `ServerNE.dll` by running `regsvr.exe .\OutputFiles\Server\ServerNE.dll`. `ServerNE.dll` will start the .NET runtime and call the exported methods in the managed `Server.dll` which register the server with COM. Then, run the client application `.\OutputFiles\Client\Client.exe` and observe the output as it activates and uses a COM instance from `ServerNE.dll`. +Build the projects by running `dotnet publish`. The projects will copy the binaries to the `OutputFiles\` directory. After publishing, use `regsvr32.exe` to register the native binary produced by DNNE, `ServerNE.dll`, by running `regsvr32.exe .\OutputFiles\Server\ServerNE.dll`. `ServerNE.dll` will start the .NET runtime and call the exported methods in the managed `Server.dll` which register the server with COM. Then, run the client application `.\OutputFiles\Client\Client.exe` and observe the output as it activates and uses a COM instance from `ServerNE.dll`. When you are finished, unregister the server by running `regsvr32.exe /u .\OutputFiles\Server\ServerNE.dll`. ## See also diff --git a/core/interop/source-generation/ComWrappersGeneration/Server/Server.csproj b/core/interop/source-generation/ComWrappersGeneration/Server/Server.csproj index 722917711f4..3b60ab9e430 100644 --- a/core/interop/source-generation/ComWrappersGeneration/Server/Server.csproj +++ b/core/interop/source-generation/ComWrappersGeneration/Server/Server.csproj @@ -6,7 +6,7 @@ enable enable - + @@ -15,10 +15,17 @@ true Server.def + + true + + + + + false - + From c932dffd154d9fe740bae5adf53595ac143332a9 Mon Sep 17 00:00:00 2001 From: Denis Zmitrichenko Date: Tue, 13 May 2025 11:00:42 +0500 Subject: [PATCH 2/5] Updated C1 packages to latest, changed target framework to net8.0-windows, updated description, company and copyright information --- .../cs/FlexGridShowcaseDemo.csproj | 18 +++++++++--------- windowsforms/FlexGridShowcaseDemo/cs/README.md | 12 ++++++------ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/windowsforms/FlexGridShowcaseDemo/cs/FlexGridShowcaseDemo.csproj b/windowsforms/FlexGridShowcaseDemo/cs/FlexGridShowcaseDemo.csproj index 776edab7bc8..5bfec742f38 100644 --- a/windowsforms/FlexGridShowcaseDemo/cs/FlexGridShowcaseDemo.csproj +++ b/windowsforms/FlexGridShowcaseDemo/cs/FlexGridShowcaseDemo.csproj @@ -2,12 +2,12 @@ WinExe - net6.0-windows + net8.0-windows true enable App.ico - GrapeCity, Inc. - (c) GrapeCity, Inc. All rights reserved. + MESCIUS inc. + ©️ MESCIUS inc. All rights reserved. @@ -15,12 +15,12 @@ - - - - - - + + + + + + diff --git a/windowsforms/FlexGridShowcaseDemo/cs/README.md b/windowsforms/FlexGridShowcaseDemo/cs/README.md index e4d6436cfe8..81cc01e7b8f 100644 --- a/windowsforms/FlexGridShowcaseDemo/cs/README.md +++ b/windowsforms/FlexGridShowcaseDemo/cs/README.md @@ -6,12 +6,12 @@ products: page_type: sample name: "Windows Forms Datagrid Sample: FlexGrid Showcase (C#)" urlFragment: "winforms-flexgridshowcase-cs" -description: ".NET 6.0 Windows Forms application that demonstrates how to use GrapeCity FlexGrid" +description: ".NET 8.0 Windows Forms application that demonstrates how to use ComponentOne FlexGrid" --- # FlexGrid Showcase Demo -This sample is a .NET 6.0 Windows Forms application that demonstrates how to use GrapeCity [`FlexGrid`](https://www.grapecity.com/componentone/winforms-ui-controls/flexgrid-winforms-data-grid), a Windows Forms Datagrid control. +This sample is a .NET 8.0 Windows Forms application that demonstrates how to use ComponentOne [`FlexGrid`](https://developer.mescius.com/componentone/winforms-ui-controls/flexgrid-winforms-data-grid), a Windows Forms Datagrid control. The sample shows different operations with `FlexGrid`: @@ -23,7 +23,7 @@ The sample shows different operations with `FlexGrid`: ![Screenshot with grouped data](../images/screenshot2.png) -There are several GrapeCity packages used in the sample: +There are several ComponentOne packages used in the sample: * [`FlexGrid`](https://www.nuget.org/packages/C1.Win.FlexGrid) * [`Ribbon`](https://www.nuget.org/packages/C1.Win.Ribbon) @@ -31,17 +31,17 @@ There are several GrapeCity packages used in the sample: * [`SuperTooltip`](https://www.nuget.org/packages/C1.Win.SuperTooltip) * [`Themes`](https://www.nuget.org/packages/C1.Win.Themes) -For more code examples and tutorials see the [documentation](https://www.grapecity.com/componentone/docs/win/online-flexgrid/overview.html). +For more code examples and tutorials see the [documentation](https://developer.mescius.com/componentone/docs/win/online-flexgrid/overview.html). Mentioned controls and packages require a valid license for runtime testing and distribution. Also there is 30-day trial for evaluation purposes. -For more licensing information visit [www.grapecity.com/componentone/licensing](https://www.grapecity.com/componentone/licensing). +For more licensing information visit [developer.mescius.com/componentone/licensing](https://developer.mescius.com/componentone/licensing). ## Sample prerequisites -This sample is written in C# and targets .NET 6.0 running on Windows. It requires the [.NET 6.0 SDK](https://dotnet.microsoft.com/download/dotnet/6.0). +This sample is written in C# and targets .NET 8.0 running on Windows. It requires the [.NET 8.0 SDK](https://dotnet.microsoft.com/download/dotnet/8.0). ## Building the sample From 8a055a75934dc62b32f3d21631eb976f78900d5c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 14 May 2025 20:41:22 +0000 Subject: [PATCH 3/5] Bump dependabot/fetch-metadata from 2.3.0 to 2.4.0 in the dotnet group Bumps the dotnet group with 1 update: [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata). Updates `dependabot/fetch-metadata` from 2.3.0 to 2.4.0 - [Release notes](https://github.com/dependabot/fetch-metadata/releases) - [Commits](https://github.com/dependabot/fetch-metadata/compare/v2.3.0...v2.4.0) --- updated-dependencies: - dependency-name: dependabot/fetch-metadata dependency-version: 2.4.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: dotnet ... Signed-off-by: dependabot[bot] --- .github/workflows/dependabot-approve-and-automerge.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dependabot-approve-and-automerge.yml b/.github/workflows/dependabot-approve-and-automerge.yml index 0d30818f8f2..dca6079c023 100644 --- a/.github/workflows/dependabot-approve-and-automerge.yml +++ b/.github/workflows/dependabot-approve-and-automerge.yml @@ -12,7 +12,7 @@ jobs: steps: - name: Dependabot metadata id: metadata - uses: dependabot/fetch-metadata@v2.3.0 + uses: dependabot/fetch-metadata@v2.4.0 with: github-token: "${{ secrets.GITHUB_TOKEN }}" - name: Approve a PR From b0669e626ff63e4016b0f2d9fbe14f2079c7edb3 Mon Sep 17 00:00:00 2001 From: Eric Mutta Date: Mon, 2 Jun 2025 20:00:29 +0300 Subject: [PATCH 4/5] Fix broken link (#7055) Original document was linking to: > https://github.com/dotnet/samples/blob/main/core/nativeaot/NativeLibrary/Class1.cs ...which doesn't exist. I reckon the intent was to link to this instead: > https://github.com/dotnet/samples/blob/main/core/nativeaot/NativeLibrary/LibraryFunctions.cs --- core/nativeaot/NativeLibrary/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/nativeaot/NativeLibrary/README.md b/core/nativeaot/NativeLibrary/README.md index 804f643c532..48a17479f59 100644 --- a/core/nativeaot/NativeLibrary/README.md +++ b/core/nativeaot/NativeLibrary/README.md @@ -87,7 +87,7 @@ After the native library is built, the above C# `Add` method will be exported as * Exported methods cannot be called from regular managed C# code, an exception will be thrown. * Exported methods cannot use regular C# exception handling, they should return error codes instead. -The sample [source code](Class1.cs) demonstrates common techniques used to stay within these limitations. +The sample [source code](LibraryFunctions.cs) demonstrates common techniques used to stay within these limitations. ## Building static libraries From 4d316c2c266eab827f3712567b44ec73a15583e3 Mon Sep 17 00:00:00 2001 From: Rossimac Date: Mon, 9 Jun 2025 19:02:39 +0100 Subject: [PATCH 5/5] Bug fixes for Orleans Bank Account sample. (#7019) * Bug fixes for Orleans Bank Account sample. Balance now updates after Deposit or Withdraw operations. Withdraw decrements now instead of incorrectly incrementing. * Code Review suggestions and bug fixes. Made Balance a class instead of a record as no benefit in using record here. Added Id attribute to Balance.Value so that it is serialized and to allow state to be persisted after a Withdrawal. Removed Reentrant attribute from AccountGrain as this could introduce race conditions when using Transactions. --- .../AccountTransfer.Grains/AccountGrain.cs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/orleans/BankAccount/AccountTransfer.Grains/AccountGrain.cs b/orleans/BankAccount/AccountTransfer.Grains/AccountGrain.cs index 97b71f422d6..02b37972902 100644 --- a/orleans/BankAccount/AccountTransfer.Grains/AccountGrain.cs +++ b/orleans/BankAccount/AccountTransfer.Grains/AccountGrain.cs @@ -1,16 +1,15 @@ using AccountTransfer.Interfaces; -using Orleans.Concurrency; using Orleans.Transactions.Abstractions; namespace AccountTransfer.Grains; -[GenerateSerializer, Immutable] -public record class Balance +[GenerateSerializer] +public class Balance { - public int Value { get; init; } = 1_000; + [Id(0)] + public int Value { get; set; } = 1_000; } -[Reentrant] public sealed class AccountGrain : Grain, IAccountGrain { private readonly ITransactionalState _balance; @@ -21,7 +20,7 @@ public AccountGrain( public Task Deposit(int amount) => _balance.PerformUpdate( - balance => balance with { Value = balance.Value + amount }); + balance => balance.Value += amount); public Task Withdraw(int amount) => _balance.PerformUpdate(balance => @@ -34,7 +33,7 @@ public Task Withdraw(int amount) => $" This account has {balance.Value} credits."); } - return balance with { Value = balance.Value + amount }; + balance.Value -= amount; }); public Task GetBalance() =>