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

feat: Allow AvaloniaVS defered load #312

Merged

Conversation

workgroupengineering
Copy link
Contributor

@workgroupengineering workgroupengineering commented Mar 1, 2023

Allow loading the AvaloniaVS extension when referencing the Avalonia nuget package or add ProjectCapability Avalonia to project

Doc

Example to Add ProjectCapability to project

  <ItemGroup>
    <ProjectCapability Include="Avalonia"/>
  </ItemGroup>

Fixes #311
Depend of AvaloniaUI/Avalonia#10523
Part of #279

@workgroupengineering workgroupengineering marked this pull request as ready for review March 1, 2023 16:06
@Mrxx99
Copy link

Mrxx99 commented Mar 1, 2023

Will the extension than still work for projects with Avalonia versions where this is not set?

@maxkatz6
Copy link
Member

maxkatz6 commented Mar 2, 2023

Yes. It needs to be confirmed.
Avalonia PR should be backported to 0.10.19 too.

@workgroupengineering
Copy link
Contributor Author

Yes work. For version <= 0.10.18 you shold add following to csproj

  <ItemGroup>
    <ProjectCapability Include="Avalonia"/>
  </ItemGroup>

you may think, at first, of adding these lines to the templates.

@Mrxx99
Copy link

Mrxx99 commented Mar 2, 2023

But couldn't that still lead to many users thinking the extension is broken after updating it when using it with an existing project? Maybe that is a tradeoff that is okay and maybe a pinned issue in the repository would be enough but that change still has the potential to flood Telegram and even the main Avalonia repo with "bug reports". And the usecase that you clone another project and you first have to set that property before the extension works, needs to be considered too.

I am not against this change per se, just raising some points to consider.

Allow loading the AvaloniaVS extension when referencing the Avalonia nuget package or add ProjectCapability Avalonia
@maxkatz6
Copy link
Member

maxkatz6 commented Jun 9, 2023

@Mrxx99 @workgroupengineering ProjectCapability was included with 0.10.20+ and 11.0 versions. As well as in newer templates.
It shouldn't be an issue for new users, but only for users who installed a new extension with an old Avalonia.
Meaning, at this point, should be safe to merge this PR and help users of old versions.

@maxkatz6 maxkatz6 merged commit 6809360 into AvaloniaUI:master Jun 9, 2023
@workgroupengineering workgroupengineering deleted the features/Defered_Load branch June 9, 2023 06:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Load Extension only Avalonia Project
3 participants