Where to locate reference files for multiple platforms in .NET 9.0 MAUI Blazor Hybrid & Web?

Stephen Braich 20 Reputation points
2025-02-06T08:23:32.82+00:00

In Visual Studio 2022, the new version .NET 9.0 project template ".NET MAUI Blazor Hybrid and Web App" will create the following projects in a new solution:

  • ProjectName
  • ProjectName.Shared
  • ProjectName.Web

Where would you put the resources? Currently, I have them in ProjectName under the following path:

Resources/raw

This works well for Windows, Android, and iPhone. But how do I access these for web? I would prefer they exist in the same location. In my particular use case, these are the same files I use for all 4 platforms. Some of them are large language models and I would rather not keep duplicates around.
User's image

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,665 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,943 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 71,686 Reputation points
    2025-02-07T21:17:53.67+00:00

    you question is not clear. if you mean compiled resources, then share makes a good case. if you mean actual files, then they are copied to target folders at build time which will vary by project type. note: the project dll files (which are not small) get copied on build.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.