Skip to content
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

NativeAOT: No coercion operator is defined between types 'Microsoft.Extensions.Primitives.StringValues' and 'System.String' #60609

Closed
1 task done
lgztx96 opened this issue Feb 25, 2025 · 1 comment
Labels
NativeAOT needs-area-label Used by the dotnet-issue-labeler to label those issues which couldn't be triaged automatically

Comments

@lgztx96
Copy link

lgztx96 commented Feb 25, 2025

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I am hosting the ASP net core API in the Avalonia application, and after AOT is released, accessing the API prompts' No coaching operator is defined between types' Microsoft Extensions.Primitives.StringValues' and 'System.String''
Is there a way to solve this?

Image

Expected Behavior

No response

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version

No response

Anything else?

No response

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label Used by the dotnet-issue-labeler to label those issues which couldn't be triaged automatically label Feb 25, 2025
@lgztx96
Copy link
Author

lgztx96 commented Feb 26, 2025

Writing rd.xml solved my problem

<Directives>
	<Application>
		<Assembly Name="Microsoft.Extensions.Primitives">
			<Type Name="Microsoft.Extensions.Primitives.StringValues" Dynamic="Required All" />
		</Assembly>
	</Application>
</Directives>

@lgztx96 lgztx96 closed this as completed Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NativeAOT needs-area-label Used by the dotnet-issue-labeler to label those issues which couldn't be triaged automatically
Projects
None yet
Development

No branches or pull requests

1 participant