-
Notifications
You must be signed in to change notification settings - Fork 565
[tests] add test for package-less [Register("CustomView"]
#10717
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
jonathanpeppers
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot can you add a test for this scenario and assert it gets XA4238
jonathanpeppers
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not merge, as I understand now a fix is required in dotnet/java-interop.
Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
[Register("CustomView"]
jonathanpeppers
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll merge tomorrow and write a commit message, I reran some test lanes.
Summary
This PR fixes issue #10715 by converting the unhandled
InvalidOperationExceptionthat occurs when using[Register("CustomView")]without a package prefix into a proper MSBuild error (XA4238).Changes Made:
JavaObjectsXmlFile.Import()to catchInvalidOperationExceptionand log a proper MSBuild error[Register("CustomView")]and asserts the error is emittedError Message:
Before:
System.InvalidOperationException: Missing required attribute 'package'(stack trace)After:
error XA4238: Could not load Java callable wrapper XML file '{path}': Missing required attribute 'package'Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.