Skip to content

Conversation

@daxian-dbw
Copy link
Member

PR Summary

We ran into a .NET bug in .NET 6 preview.7 when creating a COM object with Activator.CreateInstance. The bug is triggered when passing an empty arguments array along with the COM type to CreateInstance (see the bug here). The workaround is to not passing in the empty argument array.

When looking at our New-Object code with @adityapatwardhan, we found -ArgumentList is not even in the COM parameter set, but the COM object creation code is still using ArgumentList. That's not right and is fixed in this PR.

PR Checklist

@iSazonov iSazonov added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Aug 13, 2021
@adityapatwardhan adityapatwardhan merged commit 05e6413 into PowerShell:master Aug 14, 2021
@adityapatwardhan adityapatwardhan added this to the 7.2.0-preview.9 milestone Aug 14, 2021
@daxian-dbw daxian-dbw deleted the comobj branch August 14, 2021 20:58
xtqqczze pushed a commit to xtqqczze/PowerShell-PowerShell that referenced this pull request Aug 20, 2021
@ghost
Copy link

ghost commented Aug 23, 2021

🎉v7.2.0-preview.9 has been released which incorporates this pull request.:tada:

Handy links:

@ghost
Copy link

ghost commented Sep 28, 2021

🎉v7.2.0-preview.10 has been released which incorporates this pull request.:tada:

Handy links:

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

Labels

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants