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

CS0117: 'Resource' does not contain a definition for #22796

Open
inimirpaz opened this issue Jun 3, 2024 · 3 comments
Open

CS0117: 'Resource' does not contain a definition for #22796

inimirpaz opened this issue Jun 3, 2024 · 3 comments
Labels
area-xaml XAML, CSS, Triggers, Behaviors migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert platform/android 🤖 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@inimirpaz
Copy link

inimirpaz commented Jun 3, 2024

Description

(probably a VS for Mac issue)

See repro (Platforms/Android/MainActivity.cs): when you try to access the Resources you do not get autocompletion, rather you get a fake CS0117 error. It seems the partial class generated by the designer is empty:

	#pragma warning disable IDE0002
	public partial class Resource : _Microsoft.Android.Resource.Designer.ResourceConstant {
	}
	#pragma warning restore IDE0002

I say "fake" because the error is ignored and the application is built successfully (the resource is also properly resolved).

Steps to Reproduce

No response

Link to public reproduction project repository

https://github.com/inimirpaz/maui_issues/tree/android_resource_issue

Version with bug

Unknown/Other

Is this a regression from previous behavior?

Yes, this used to work in Xamarin.Forms

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

@inimirpaz inimirpaz added the t/bug Something isn't working label Jun 3, 2024
Copy link
Contributor

github-actions bot commented Jun 3, 2024

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@Zhanglirong-Winnie Zhanglirong-Winnie added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert labels Jun 4, 2024
@Zhanglirong-Winnie
Copy link
Collaborator

Verified this issue with Visual Studio 17.6.12(build410)(8.0.40&8.0.3). Can repro this issue with sample project.
image

@PureWeen PureWeen added the area-xaml XAML, CSS, Triggers, Behaviors label Jun 4, 2024
@jsuarezruiz jsuarezruiz added this to the Backlog milestone Jun 10, 2024
@ggbtvs
Copy link

ggbtvs commented Jun 20, 2024

Is this likely to be fixed for VS for Mac BEFORE the app's retirement

@samhouts samhouts removed s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Jul 3, 2024
@samhouts samhouts added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-xaml XAML, CSS, Triggers, Behaviors migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert platform/android 🤖 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants