Description
We have a .NET class library assembly COM server that executes a client call to a SOAP service. It works fine in .NET framework 6.x but when we change the target framework to .NET 7.x it throws the exception 'The given assembly name was invalid' at the point where the proxy function for the SOAP service is called. Changing the target framework was the only change made. The application works as expected when the target is .NET 6.x.
Microsoft support case #2212020010001039
Reproduction Steps
See the included example project which duplicates the error.
Expected behavior
We would expect the application to work the same (no error when executing the SOAP service proxy method) when the only change to the project is to change the target framework from .NET 6 to .NET 7.
Actual behavior
The exception error message 'The given assembly name was invalid' is generated when the .NET assembly COM server attempts to invoke a SOAP web service method.
Regression?
Works as expected in .NET 6
Known Workarounds
Workaround is to target framework 6.0, not 7.0.
Impact
Prevents upgrading from .NET 6 to .NET 7.
Configuration
.NET version: 7.x
OS: Windows 10 and 11 and Windows Server 2019
Architecture: X86, Any CPU, x64
Other information
No response