CommunityToolkit / Maui

The .NET MAUI Community Toolkit is a community-created library that contains .NET MAUI Extensions, Advanced UI/UX Controls, and Behaviors to help make your life as a .NET MAUI developer easier
https://learn.microsoft.com/dotnet/communitytoolkit/maui
MIT License
2.28k stars 404 forks source link

[BUG] Sample project build error #1215

Closed b-pattanayak closed 1 year ago

b-pattanayak commented 1 year ago

Is there an existing issue for this?

Did you read the "Reporting a bug" section on Contributing file?

Current Behavior

while took latest from main branch and build sample project getting build errors missing extension methods pages/ converters , TextCenterVertical() and .TextCenter() methods are missing image

Expected Behavior

extension methods should be available and build should be success

Steps To Reproduce

take latest from main branch and build sample project

Link to public reproduction project repository

this is simple build issue

Environment

- .NET MAUI CommunityToolkit:
- OS:
- .NET MAUI:

Anything else?

No response

brminnick commented 1 year ago

Unable to reproduce

VladislavAntonyuk commented 1 year ago

make sure you built SourceGenerators

Kapusch commented 11 months ago

Since I upgraded CommunityToolkit.Maui.Markup from v3.0.0 to v4.0.0, I have this IntelliSense issue on Visual Studio For Mac

image

Although this is same error code CS1061, this isn't preventing build or execution to work

brminnick commented 11 months ago

@Kapusch Which IDE are you using in this screenshot?

The TextCenter() extension methods are auto-generated using Source Generators. It could be that your IDE hadn't auto-generated the TextCenter code before running the intellisense analyzers.

Kapusch commented 11 months ago

It's on Visual Studio Community 2022 For Mac v17.6.7

It was just a remark like it was working well with CommunityToolkit.Maui.Markup v3.0.0...

image

... but not anymore with v.4.0.0 ^^

I didn't test in VS Code how it behaves, I don't know if there is any IntelliSense there by the way.

brminnick commented 11 months ago

Ah - yea, that makes sense. VS for Mac is usually late to get all of the Roslyn updates.

I switched to Jet Brains Rider from VS for Mac after Microsoft announced they're deprecating VS for Mac, and I haven't sen this problem in Rider.

It could also be that we need to push out CommunityToolkit.Maui.Markup v4.0.1; in our Source Generator, we updated it to use the latest version of Microsoft.CodeAnalysis.CSharp v4.8.0, but haven't yet released an update to CommunityToolkit.Maui.Markup since.

Let's keep an eye on it for now, but I have a hunch that it may be resolved in a future VS for Mac update. If the next VS for Mac update doesn't fix it, let me know and we'll publish CommunityToolkit.Maui.Markup v4.0.1 to see if that fixes the problem!