MAUI set build action to bundleresource

ohumidk 1 Reputation point
2022-06-10T20:59:06.157+00:00

In Xamarin.iOS, you are able to set a file's build action to BundleResource but I am not finding this in MAUI.

I am trying to work with Firestore, and I have this fully functioning in Xamarin Forms but this small thing is blocking me on MAUI. Does anyone know how this can be set?

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,176 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 28,876 Reputation points Microsoft Vendor
    2022-06-13T05:48:27.45+00:00

    Hello @ohumidk ,

    I'm not sure which IDE you are using (VS for Mac or VS2022 on Windows), some file templates are not ready yet. You could specify the BundleResource file in your .csproj, refer to

     <ItemGroup>  
        <BundleResource Include="Resources\XXX.png" />// I add the image in Resources, please enter your file path  
      </ItemGroup>  
    

    --------Update--------
    If you are trying to build a MAUI app, as in cross-platform, why do you need to select a resource as a BundleResource ? What kind of item are you trying to set?
    I see you reported this issue at https://github.com/dotnet/maui/issues/7938, please follow the progress.

    Best Regards,
    Wenyan Zhang


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.