Skip to content

Conversation

@thompson-tomo
Copy link

Closes #460

@cdmdotnet cdmdotnet changed the base branch from trunk to develop June 20, 2025 07:37
@cdmdotnet cdmdotnet self-assigned this Jun 20, 2025
@cdmdotnet
Copy link
Collaborator

Can you explain why you've added .net6 as a compiling target to four projects (csproj files) but only effectively removed Microsoft.CSharp Version 4.7.0 from one of them? Can you explain why the other four projects required a change.
I'll also note that there is a quirk in several csproj files where the target declaration occurs more than once and the second one overrides the first. cqrs.csproj has this quirk and line 129 needs updating for this to take effect.

While the above is an information request. we can't accept/approve this PR as it will introduce breaking changes. It appears that your haven't reviewed the class files for compiler declaration and control switches. A quick glance has identified that Framework\Cqrs\Services\ServiceChannelFactory.cs has compile time control switches targeting NETSTANDARD2_0 for one flow and all other targets for the other flow. Your change will introduce a breaking change if that control switch does not include .Net 6.

Please review code in ALL classes, make any required changes to update any relevant compile time control switches. Create unit tests to test the control flows are correct (usually this is introducing async methods so a unit test to make sure the method exists and a lambda expression compiles will suffice as the compiler will throw a method missing exception).

@thompson-tomo thompson-tomo changed the base branch from develop to trunk June 20, 2025 10:40
@thompson-tomo
Copy link
Author

Apologies for that. I have reviewed the compilation switches and nearly everyone I could find was already ok except for that one class you mentioned. Have also added the missing conditions on the dependencies.

There should be no breaking changes as net 6 behaves the same as net standard.

In relation to testing I have increased the test frameworks on the respective test frameworks.

@cdmdotnet cdmdotnet changed the base branch from trunk to develop June 21, 2025 02:13
@cdmdotnet
Copy link
Collaborator

We're seeing compiler errors. Please address these. Seems to be that Package imports aren't being picked up

Restore complete (1.6s)
Cqrs net40 succeeded (2.7s) → bin\Debug\net40\Cqrs.dll
Cqrs net48 succeeded (2.3s) → bin\Debug\net48\Cqrs.dll
Cqrs net6.0 failed with 82 error(s) (2.6s)
...
Framework\Cqrs\Events\SqlSnapshotStore.cs(15,17): error CS0234: The type or namespace name 'EntityFrameworkCore' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
CQRS\Framework\Cqrs\Services\ServiceChannelFactory.cs(12,27): error CS0234: The type or namespace name 'Description' does not exist in the namespace 'System.ServiceModel' (are you missing an assembly reference?)
Framework\Cqrs\Authentication\IAuthenticationTokenHelper.cs(18,3): error CS0246: The type or namespace name 'ServiceContractAttribute' could not be found (are you missing a using directive or an assembly reference?)
Framework\Cqrs\Authentication\IAuthenticationTokenHelper.cs(18,3): error CS0246: The type or namespace name 'ServiceContract' could not be found (are you missing a using directive or an assembly reference?)
Framework\Cqrs\Authentication\IAuthenticationTokenHelper.cs(24,4): error CS0246: The type or namespace name 'OperationContractAttribute' could not be found (are you missing a using directive or an assembly reference?)
Framework\Cqrs\Authentication\IAuthenticationTokenHelper.cs(24,4): error CS0246: The type or namespace name 'OperationContract' could not be found (are you missing a using directive or an assembly reference?)

Also can you base this off the develop branch. We don't accept external PRs directly to master.

@thompson-tomo
Copy link
Author

Have changed the branch looked into the issues. It ended up being easier to target net standard 2.1 rather than net 6 due to wcf issues.

@cdmdotnet
Copy link
Collaborator

Can you review all files you've modified. You've said you decided to target standard 2.1 rather than .net 6, however at least one csproj file still has a new target of .net6 it sounds like it shouldn't have. Cqrs.Azure.Storage.csproj comes to mind, but there appears to be several.

@thompson-tomo
Copy link
Author

WCF is only utilised in the base CQRS package hence adding net 6 was a big/risky undertaking for that project and the same time the high level outcome could be achieved by adding net standard 2.1 for that library. The other projects I remained with net 6 which was the preference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add additional TFM to eliminate explicit dependency

2 participants