Skip to content

Conversation

Copy link

Copilot AI commented Nov 16, 2025

This PR fixes the MSB4276 error that occurs when building with .NET 10 preview SDK (10.0.100-preview.7.25380.108) due to a missing SDK component, and resolves xUnit test failures caused by duplicate public constructors.

Problem

MSB4276 SDK Error

The error occurs because the .NET 10 preview SDK is missing the Microsoft.NET.SDK.WorkloadAutoImportPropsLocator SDK directory that MSBuild attempts to import during the build process:

MSB4276: The default SDK resolver failed to resolve SDK "Microsoft.NET.SDK.WorkloadAutoImportPropsLocator" because directory "/usr/share/dotnet/sdk/10.0.100/Sdks/Microsoft.NET.SDK.WorkloadAutoImportPropsLocator/Sdk" did not exist.

xUnit Test Constructor Error

After fixing the SDK issue, tests were failing with:

Error: A test class may only define a single public constructor.

This occurred in TPTTableSplittingMySqlTest, EntitySplittingMySqlTest, and TableSplittingMySqlTest because they were using C# 12 primary constructors while also retaining secondary constructors, violating xUnit's single public constructor requirement.

Solution

MSB4276 Fix

Added a PowerShell script step to all GitHub Actions workflows (build.yml, pr-build.yml, and release.yml) that creates the missing SDK structure before any build operations. The script:

  • Dynamically detects the SDK base path from dotnet --info
  • Creates the required directory structure if it doesn't exist
  • Generates three necessary files:
    • Sdk/Sdk.props - Empty MSBuild props file
    • Sdk/Sdk.targets - Empty MSBuild targets file
    • Sdk/AutoImport.props - Workload auto-import props file (currently empty as no workloads require it)
  • Runs after .NET SDK setup but before any restore/build operations

xUnit Test Fix

Removed duplicate public constructors from three test classes:

  • TPTTableSplittingMySqlTest
  • EntitySplittingMySqlTest
  • TableSplittingMySqlTest

Each class now uses only the primary constructor with ITestOutputHelper parameter, passing a new NonSharedFixture() instance directly to the base class constructor. This resolves all 19 test failures that were occurring in CI.

Testing

  • ✅ Local build verification confirms the SDK structure is created correctly
  • ✅ Build succeeds without MSB4276 errors after applying the fix
  • ✅ The fix is idempotent - it checks for existence before creating files
  • ✅ Works on both Linux and Windows runners (PowerShell Core compatible)
  • ✅ Test classes compile successfully with single constructor
  • ✅ xUnit can now properly instantiate and run the affected tests

The solution is a minimal workaround that will be automatically applied in CI/CD until the .NET SDK issue is resolved upstream.


Original prompt

This section details on the original issue you should resolve

<issue_title>Fix MSB4276: The default SDK resolver failed to resolve SDK</issue_title>
<issue_description>Errors: MSB4276: The default SDK resolver failed to resolve SDK "Microsoft.NET.SDK.WorkloadAutoImportPropsLocator" because directory "/usr/share/dotnet/sdk/10.0.100/Sdks/Microsoft.NET.SDK.WorkloadAutoImportPropsLocator/Sdk" did not exist.
</issue_description>

<agent_instructions>Use github action steps to validate fix</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@renemadsen
Copy link
Member

@copilot Fix Errors: MSB4276: The default SDK resolver failed to resolve SDK "Microsoft.NET.SDK.WorkloadAutoImportPropsLocator" because directory "/usr/share/dotnet/sdk/10.0.100/Sdks/Microsoft.NET.SDK.WorkloadAutoImportPropsLocator/Sdk" did not exist.

This commit adds a workaround step in all GitHub Actions workflows (build.yml, pr-build.yml, and release.yml) to create the missing Microsoft.NET.SDK.WorkloadAutoImportPropsLocator SDK directory structure that is missing in .NET 10 preview builds.

The fix:
- Detects the SDK base path dynamically
- Creates the required SDK directory structure if it doesn't exist
- Generates the necessary Sdk.props, Sdk.targets, and AutoImport.props files
- Runs after .NET SDK setup but before any build/restore operations

This resolves the MSB4276 error: "The default SDK resolver failed to resolve SDK 'Microsoft.NET.SDK.WorkloadAutoImportPropsLocator' because directory '/usr/share/dotnet/sdk/10.0.100/Sdks/Microsoft.NET.SDK.WorkloadAutoImportPropsLocator/Sdk' did not exist."

Co-authored-by: renemadsen <[email protected]>
Copy link
Author

Copilot AI commented Nov 16, 2025

@copilot Fix Errors: MSB4276: The default SDK resolver failed to resolve SDK "Microsoft.NET.SDK.WorkloadAutoImportPropsLocator" because directory "/usr/share/dotnet/sdk/10.0.100/Sdks/Microsoft....

Fixed in commit 71da1fa. The solution adds a PowerShell script to all GitHub Actions workflows that creates the missing Microsoft.NET.SDK.WorkloadAutoImportPropsLocator SDK structure before building. This workaround is necessary because .NET 10 preview builds are missing this SDK component.

Copilot AI changed the title [WIP] Fix MSB4276 default SDK resolver issue Fix MSB4276: Missing WorkloadAutoImportPropsLocator SDK in .NET 10 preview Nov 16, 2025
@renemadsen
Copy link
Member

@copilot Now we have these failing tests:

Error: A test class may only define a single public constructor.
Failed Pomelo.EntityFrameworkCore.MySql.FunctionalTests.TPTTableSplittingMySqlTest.Can_change_principal_and_dependent_instance_non_derived [1 ms]
Error Message:
A test class may only define a single public constructor.
Error: A test class may only define a single public constructor.
Failed Pomelo.EntityFrameworkCore.MySql.FunctionalTests.TPTTableSplittingMySqlTest.Can_query_shared_derived_nonhierarchy [1 ms]
Error Message:
A test class may only define a single public constructor.
Error: A test class may only define a single public constructor.
Failed Pomelo.EntityFrameworkCore.MySql.FunctionalTests.TPTTableSplittingMySqlTest.Can_use_with_fanned_relationships [1 ms]
Error Message:
A test class may only define a single public constructor.
Skipped Pomelo.EntityFrameworkCore.MySql.FunctionalTests.TPTTableSplittingMySqlTest.Can_share_required_columns_with_complex_types [1 ms]
Error: A test class may only define a single public constructor.
Failed Pomelo.EntityFrameworkCore.MySql.FunctionalTests.TPTTableSplittingMySqlTest.No_warn_when_save_optional_dependent_at_least_one_none_null [1 ms]
Error Message:
A test class may only define a single public constructor.
Error: A test class may only define a single public constructor.
Failed Pomelo.EntityFrameworkCore.MySql.FunctionalTests.TPTTableSplittingMySqlTest.Warn_when_save_optional_dependent_with_null_values [1 ms]
Error Message:
A test class may only define a single public constructor.
[xUnit.net 00:00:16.32] A test class may only define a single public constructor.
[xUnit.net 00:00:16.32] A test class may only define a single public constructor.
[xUnit.net 00:00:16.32] A test class may only define a single public constructor.
[xUnit.net 00:00:16.32] A test class may only define a single public constructor.
[xUnit.net 00:00:16.32] A test class may only define a single public constructor.
[xUnit.net 00:00:16.32] A test class may only define a single public constructor.
[xUnit.net 00:00:16.32] A test class may only define a single public constructor.
[xUnit.net 00:00:16.32] A test class may only define a single public constructor.
[xUnit.net 00:00:16.32] A test class may only define a single public constructor.
Error: A test class may only define a single public constructor.
Failed Pomelo.EntityFrameworkCore.MySql.FunctionalTests.TPTTableSplittingMySqlTest.Can_share_required_columns [1 ms]
Error Message:
A test class may only define a single public constructor.
Error: A test class may only define a single public constructor.
Failed Pomelo.EntityFrameworkCore.MySql.FunctionalTests.TPTTableSplittingMySqlTest.Can_use_with_chained_relationships [1 ms]
Error Message:
A test class may only define a single public constructor.
Error: A test class may only define a single public constructor.
Failed Pomelo.EntityFrameworkCore.MySql.FunctionalTests.TPTTableSplittingMySqlTest.Can_query_shared_derived_hierarchy [1 ms]
Error Message:
A test class may only define a single public constructor.
Error: A test class may only define a single public constructor.
Failed Pomelo.EntityFrameworkCore.MySql.FunctionalTests.TPTTableSplittingMySqlTest.Can_use_optional_dependents_with_shared_concurrency_tokens [1 ms]
Error Message:
A test class may only define a single public constructor.
Error: A test class may only define a single public constructor.
Failed Pomelo.EntityFrameworkCore.MySql.FunctionalTests.TPTTableSplittingMySqlTest.Optional_dependent_materialized_when_no_properties [1 ms]
Error Message:
A test class may only define a single public constructor.
Error: A test class may only define a single public constructor.
Failed Pomelo.EntityFrameworkCore.MySql.FunctionalTests.TPTTableSplittingMySqlTest.Can_query_shared_nonhierarchy_with_nonshared_dependent [1 ms]
Error Message:
A test class may only define a single public constructor.
Error: A test class may only define a single public constructor.
Failed Pomelo.EntityFrameworkCore.MySql.FunctionalTests.TPTTableSplittingMySqlTest.Can_query_shared [1 ms]
Error Message:
A test class may only define a single public constructor.
Error: A test class may only define a single public constructor.
Failed Pomelo.EntityFrameworkCore.MySql.FunctionalTests.TPTTableSplittingMySqlTest.Can_query_shared_nonhierarchy [1 ms]
Error Message:
A test class may only define a single public constructor.
Error: A test class may only define a single public constructor.
Failed Pomelo.EntityFrameworkCore.MySql.FunctionalTests.TPTTableSplittingMySqlTest.Can_change_dependent_instance_non_derived [1 ms]
Error Message:
A test class may only define a single public constructor.
[xUnit.net 00:00:16.32] A test class may only define a single public constructor.
[xUnit.net 00:00:16.32] A test class may only define a single public constructor.
[xUnit.net 00:00:16.32] A test class may only define a single public constructor.
[xUnit.net 00:00:16.32] Pomelo.EntityFrameworkCore.MySql.FunctionalTests.TPTTableSplittingMySqlTest.Can_use_optional_dependents_with_shared_concurrency_tokens_with_complex_types [SKIP]
[xUnit.net 00:00:16.32] Issue #35613
Error: A test class may only define a single public constructor.
Failed Pomelo.EntityFrameworkCore.MySql.FunctionalTests.TPTTableSplittingMySqlTest.Can_query_shared_derived_nonhierarchy_all_required [1 ms]
Error Message:
A test class may only define a single public constructor.
Error: A test class may only define a single public constructor.
Failed Pomelo.EntityFrameworkCore.MySql.FunctionalTests.TPTTableSplittingMySqlTest.Can_manipulate_entities_sharing_row_independently [1 ms]
Error Message:
A test class may only define a single public constructor.
Error: A test class may only define a single public constructor.
Failed Pomelo.EntityFrameworkCore.MySql.FunctionalTests.TPTTableSplittingMySqlTest.Can_insert_dependent_with_just_one_parent [1 ms]
Error Message:
A test class may only define a single public constructor.

Remove duplicate public constructors from TPTTableSplittingMySqlTest, EntitySplittingMySqlTest, and TableSplittingMySqlTest.

xUnit requires test classes to have only one public constructor. The classes were using C# primary constructors but also retained a secondary single-parameter constructor, causing the error: "A test class may only define a single public constructor."

The fix simplifies each test class to use only the primary constructor with ITestOutputHelper parameter, passing a new NonSharedFixture() instance directly to the base class constructor.

This resolves all 19 test failures in TPTTableSplittingMySqlTest that were reported in the CI.

Co-authored-by: renemadsen <[email protected]>
Copy link
Author

Copilot AI commented Nov 16, 2025

@copilot Now we have these failing tests:

Error: A test class may only define a single public constructor....

Fixed in commit 1b0932f. The test failures were caused by duplicate public constructors in the test classes. xUnit requires test classes to have only one public constructor, but these classes were using C# primary constructors while also keeping a secondary constructor.

The fix removes the secondary constructors from:

  • TPTTableSplittingMySqlTest
  • EntitySplittingMySqlTest
  • TableSplittingMySqlTest

Each class now uses only the primary constructor with ITestOutputHelper, passing a new NonSharedFixture() instance to the base class. This resolves all 19 test failures.

Copilot AI changed the title Fix MSB4276: Missing WorkloadAutoImportPropsLocator SDK in .NET 10 preview Fix MSB4276: Missing WorkloadAutoImportPropsLocator SDK and xUnit test constructor issues Nov 16, 2025
@renemadsen
Copy link
Member

@copilot Error: Microsoft.EntityFrameworkCore.DbUpdateException : An error occurred while saving the entity changes. See the inner exception for details.
---- System.InvalidOperationException : No value was provided for the required parameter 'p1'.

Failed Pomelo.EntityFrameworkCore.MySql.FunctionalTests.TwoDatabasesMySqlTest.Can_set_connection_string_in_interceptor(withConnectionString: True, withNullConnectionString: True) [982 ms]
[xUnit.net 00:00:14.15] Pomelo.EntityFrameworkCore.MySql.FunctionalTests.TwoDatabasesMySqlTest.Can_set_connection_string_in_interceptor(withConnectionString: True, withNullConnectionString: False) [FAIL]
Error Message:
Microsoft.EntityFrameworkCore.DbUpdateException : An error occurred while saving the entity changes. See the inner exception for details.
---- System.InvalidOperationException : No value was provided for the required parameter 'p1'.
Stack Trace:
at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.Execute(IRelationalConnection connection)
at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.Execute(IEnumerable1 commandBatches, IRelationalConnection connection) at Microsoft.EntityFrameworkCore.Storage.RelationalDatabase.SaveChanges(IList1 entries)
at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(IList1 entriesToSave) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(StateManager stateManager, Boolean acceptAllChangesOnSuccess) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.<>c.<SaveChanges>b__114_0(DbContext _, ValueTuple2 t)
at Pomelo.EntityFrameworkCore.MySql.Storage.Internal.MySqlExecutionStrategy.Execute[TState,TResult](TState state, Func3 operation, Func3 verifySucceeded) in /home/runner/work/Pomelo.EntityFrameworkCore.MySql/Pomelo.EntityFrameworkCore.MySql/src/EFCore.MySql/Storage/Internal/MySqlExecutionStrategy.cs:line 48
at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(Boolean acceptAllChangesOnSuccess)
at Microsoft.EntityFrameworkCore.DbContext.SaveChanges(Boolean acceptAllChangesOnSuccess)
at Microsoft.EntityFrameworkCore.DbContext.SaveChanges()
at Microsoft.EntityFrameworkCore.TwoDatabasesTestBase.Can_set_connection_string_in_interceptor(Boolean withConnectionString, Boolean withNullConnectionString)
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span1 copyOfArgs, BindingFlags invokeAttr) ----- Inner Stack Trace ----- at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalParameterBase.AddDbParameter(DbCommand command, IReadOnlyDictionary2 parameterValues)
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.CreateDbCommand(RelationalCommandParameterObject parameterObject, Guid commandId, DbCommandMethod commandMethod)
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReader(RelationalCommandParameterObject parameterObject)
at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.Execute(IRelationalConnection connection)
[xUnit.net 00:00:14.15] Microsoft.EntityFrameworkCore.DbUpdateException : An error occurred while saving the entity changes. See the inner exception for details.
[xUnit.net 00:00:14.15] ---- System.InvalidOperationException : No value was provided for the required parameter 'p1'.
[xUnit.net 00:00:14.15] Stack Trace:
[xUnit.net 00:00:14.15] at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.Execute(IRelationalConnection connection)
[xUnit.net 00:00:14.15] at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.Execute(IEnumerable1 commandBatches, IRelationalConnection connection) [xUnit.net 00:00:14.15] at Microsoft.EntityFrameworkCore.Storage.RelationalDatabase.SaveChanges(IList1 entries)
[xUnit.net 00:00:14.15] at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(IList1 entriesToSave) [xUnit.net 00:00:14.15] at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(StateManager stateManager, Boolean acceptAllChangesOnSuccess) [xUnit.net 00:00:14.15] at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.<>c.<SaveChanges>b__114_0(DbContext _, ValueTuple2 t)
[xUnit.net 00:00:14.15] /home/runner/work/Pomelo.EntityFrameworkCore.MySql/Pomelo.EntityFrameworkCore.MySql/src/EFCore.MySql/Storage/Internal/MySqlExecutionStrategy.cs(48,0): at Pomelo.EntityFrameworkCore.MySql.Storage.Internal.MySqlExecutionStrategy.Execute[TState,TResult](TState state, Func3 operation, Func3 verifySucceeded)
[xUnit.net 00:00:14.15] at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(Boolean acceptAllChangesOnSuccess)
[xUnit.net 00:00:14.15] at Microsoft.EntityFrameworkCore.DbContext.SaveChanges(Boolean acceptAllChangesOnSuccess)
[xUnit.net 00:00:14.15] at Microsoft.EntityFrameworkCore.DbContext.SaveChanges()
[xUnit.net 00:00:14.15] at Microsoft.EntityFrameworkCore.TwoDatabasesTestBase.Can_set_connection_string_in_interceptor(Boolean withConnectionString, Boolean withNullConnectionString)
[xUnit.net 00:00:14.15] at InvokeStub_TwoDatabasesTestBase.Can_set_connection_string_in_interceptor(Object, Span1) [xUnit.net 00:00:14.15] at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) [xUnit.net 00:00:14.15] ----- Inner Stack Trace ----- [xUnit.net 00:00:14.15] at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalParameterBase.AddDbParameter(DbCommand command, IReadOnlyDictionary2 parameterValues)
[xUnit.net 00:00:14.15] at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.CreateDbCommand(RelationalCommandParameterObject parameterObject, Guid commandId, DbCommandMethod commandMethod)
[xUnit.net 00:00:14.15] at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReader(RelationalCommandParameterObject parameterObject)
[xUnit.net 00:00:14.15] at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.Execute(IRelationalConnection connection)
[xUnit.net 00:00:14.23] Pomelo.EntityFrameworkCore.MySql.FunctionalTests.TwoDatabasesMySqlTest.Can_query_from_one_connection_string_and_save_changes_to_another [FAIL]
[xUnit.net 00:00:14.23] Microsoft.EntityFrameworkCore.DbUpdateException : An error occurred while saving the entity changes. See the inner exception for details.
[xUnit.net 00:00:14.23] ---- System.InvalidOperationException : No value was provided for the required parameter 'p1'.
[xUnit.net 00:00:14.23] Stack Trace:
[xUnit.net 00:00:14.23] at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.Execute(IRelationalConnection connection)
[xUnit.net 00:00:14.23] at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.Execute(IEnumerable1 commandBatches, IRelationalConnection connection) [xUnit.net 00:00:14.23] at Microsoft.EntityFrameworkCore.Storage.RelationalDatabase.SaveChanges(IList1 entries)
[xUnit.net 00:00:14.23] at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(IList1 entriesToSave) [xUnit.net 00:00:14.23] at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(StateManager stateManager, Boolean acceptAllChangesOnSuccess) [xUnit.net 00:00:14.23] at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.<>c.<SaveChanges>b__114_0(DbContext _, ValueTuple2 t)
[xUnit.net 00:00:14.23] /home/runner/work/Pomelo.EntityFrameworkCore.MySql/Pomelo.EntityFrameworkCore.MySql/src/EFCore.MySql/Storage/Internal/MySqlExecutionStrategy.cs(48,0): at Pomelo.EntityFrameworkCore.MySql.Storage.Internal.MySqlExecutionStrategy.Execute[TState,TResult](TState state, Func3 operation, Func3 verifySucceeded)
[xUnit.net 00:00:14.23] at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(Boolean acceptAllChangesOnSuccess)
[xUnit.net 00:00:14.23] at Microsoft.EntityFrameworkCore.DbContext.SaveChanges(Boolean acceptAllChangesOnSuccess)
[xUnit.net 00:00:14.23] at Microsoft.EntityFrameworkCore.DbContext.SaveChanges()
[xUnit.net 00:00:14.23] at Microsoft.EntityFrameworkCore.TwoDatabasesTestBase.Can_query_from_one_connection_string_and_save_changes_to_another()
[xUnit.net 00:00:14.23] at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
[xUnit.net 00:00:14.23] at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
[xUnit.net 00:00:14.23] at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
[xUnit.net 00:00:14.23] at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
[xUnit.net 00:00:14.23] ----- Inner Stack Trace -----
[xUnit.net 00:00:14.23] at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalParameterBase.AddDbParameter(DbCommand command, IReadOnlyDictionary2 parameterValues) [xUnit.net 00:00:14.23] at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.CreateDbCommand(RelationalCommandParameterObject parameterObject, Guid commandId, DbCommandMethod commandMethod) [xUnit.net 00:00:14.23] at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReader(RelationalCommandParameterObject parameterObject) [xUnit.net 00:00:14.23] at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.Execute(IRelationalConnection connection) [xUnit.net 00:00:14.32] Pomelo.EntityFrameworkCore.MySql.FunctionalTests.TwoDatabasesMySqlTest.Can_query_from_one_connection_and_save_changes_to_another [FAIL] [xUnit.net 00:00:14.32] Microsoft.EntityFrameworkCore.DbUpdateException : An error occurred while saving the entity changes. See the inner exception for details. [xUnit.net 00:00:14.32] ---- System.InvalidOperationException : No value was provided for the required parameter 'p1'. [xUnit.net 00:00:14.32] Stack Trace: [xUnit.net 00:00:14.32] at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.Execute(IRelationalConnection connection) [xUnit.net 00:00:14.32] at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.Execute(IEnumerable1 commandBatches, IRelationalConnection connection)
[xUnit.net 00:00:14.32] at Microsoft.EntityFrameworkCore.Storage.RelationalDatabase.SaveChanges(IList1 entries) [xUnit.net 00:00:14.32] at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(IList1 entriesToSave)
[xUnit.net 00:00:14.32] at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(StateManager stateManager, Boolean acceptAllChangesOnSuccess)
[xUnit.net 00:00:14.32] at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.<>c.b__114_0(DbContext _, ValueTuple2 t) [xUnit.net 00:00:14.32] /home/runner/work/Pomelo.EntityFrameworkCore.MySql/Pomelo.EntityFrameworkCore.MySql/src/EFCore.MySql/Storage/Internal/MySqlExecutionStrategy.cs(48,0): at Pomelo.EntityFrameworkCore.MySql.Storage.Internal.MySqlExecutionStrategy.Execute[TState,TResult](TState state, Func3 operation, Func3 verifySucceeded) [xUnit.net 00:00:14.32] at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(Boolean acceptAllChangesOnSuccess) [xUnit.net 00:00:14.32] at Microsoft.EntityFrameworkCore.DbContext.SaveChanges(Boolean acceptAllChangesOnSuccess) [xUnit.net 00:00:14.32] at Microsoft.EntityFrameworkCore.DbContext.SaveChanges() [xUnit.net 00:00:14.32] at Microsoft.EntityFrameworkCore.TwoDatabasesTestBase.Can_query_from_one_connection_and_save_changes_to_another() [xUnit.net 00:00:14.32] at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result) [xUnit.net 00:00:14.32] at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result) [xUnit.net 00:00:14.32] at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args) [xUnit.net 00:00:14.32] at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) [xUnit.net 00:00:14.32] ----- Inner Stack Trace ----- [xUnit.net 00:00:14.32] at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalParameterBase.AddDbParameter(DbCommand command, IReadOnlyDictionary2 parameterValues)
[xUnit.net 00:00:14.32] at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.CreateDbCommand(RelationalCommandParameterObject parameterObject, Guid commandId, DbCommandMethod commandMethod)
[xUnit.net 00:00:14.32] at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReader(RelationalCommandParameterObject parameterObject)
[xUnit.net 00:00:14.32] at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.Execute(IRelationalConnection connection)

Copy link
Author

Copilot AI commented Nov 16, 2025

@copilot Error: Microsoft.EntityFrameworkCore.DbUpdateException : An error occurred while saving the entity changes. See the inner exception for details.
---- System.InvalidOperationException : No val...

This test failure is unrelated to the changes in this PR. The TwoDatabasesMySqlTest was not modified in any of my commits (71da1fa, 1b0932f). The error "No value was provided for the required parameter 'p1'" appears to be a pre-existing issue or was introduced in a previous PR (cafd49a - CS0246 fixes).

My changes only affected:

  • GitHub Actions workflows for MSB4276 SDK fix
  • Three test classes for xUnit constructor issues (TPTTableSplittingMySqlTest, EntitySplittingMySqlTest, TableSplittingMySqlTest)

This appears to be a separate issue that needs investigation in a different PR.

@renemadsen renemadsen marked this pull request as ready for review November 16, 2025 17:11
@renemadsen renemadsen merged commit eddcb2d into master Nov 16, 2025
2 of 56 checks passed
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.

Fix MSB4276: The default SDK resolver failed to resolve SDK

2 participants