ThisAssembly.Resources 2.1.0-beta
Open Source Maintenance Fee
To ensure the long-term sustainability of this project, use of ThisAssembly requires an Open Source Maintenance Fee. While the source code is freely available under the terms of the MIT License, all other aspects of the project --including opening or commenting on issues, participating in discussions and downloading releases-- require adherence to the Maintenance Fee.
In short, if you use this project to generate revenue, the Maintenance Fee is required.
To pay the Maintenance Fee, become a Sponsor at the corresponding OSMF tier (starting at just $10!).
This package generates a static ThisAssembly.Resources class with public
properties exposing typed APIs to retrieve the contents of embedded resources.
<ItemGroup>
<EmbeddedResource Include="Content/Docs/License.md" />
</ItemGroup>

Since markdown files are text files, the API will expose a Text property property
for it that will read its content once and cache it:

The $(EmbeddedResourceStringExtensions) MSBuild property allows customizing which
file extensions get treated as text files. By default, it's defined as:
<PropertyGroup>
<EmbeddedResourceStringExtensions>.txt|.cs|.sql|.json|.md</EmbeddedResourceStringExtensions>
</PropertyGroup>
You can append additional file extensions to this list, or override it completely. The list must be pipe-separated.
You can always use the provided GetStream and GetBytes for more advanced scenarios (or for
non-text resources).
Optionally, you can specify the Kind metadata for a specific EmbeddedResource you want
treated as a text file:
<ItemGroup>
<EmbeddedResource Include="query.kql" Kind="Text" />
</ItemGroup>
You can also add a Comment item metadata attribute, which will be used as the <summary> XML
doc for the generated member.
Adding dynamic resources
You can also provide additional embedded resources dynamically, by running a target before
PrepareEmbeddedResources:
<Target Name="AddDynamicResources" BeforeTargets="PrepareEmbeddedResources">
<ItemGroup>
<EmbeddedResource Include="Content/Docs/$(Configuration).md" />
</ItemGroup>
</Target>
Customizing the generated code
The following MSBuild properties can be used to customize the generated code:
| Property | Description |
|---|---|
| ThisAssemblyNamespace | Sets the namespace of the generated ThisAssembly root class. If not set, it will be in the global namespace. |
| ThisAssemblyVisibility | Sets the visibility modifier of the generated ThisAssembly root class. If not set, it will be internal. |
Sponsors
Showing the top 20 packages that depend on ThisAssembly.Resources.
| Packages | Downloads |
|---|---|
|
ThisAssembly
Meta-package that includes all ThisAssembly.* packages.
|
4 |
|
ThisAssembly
Meta-package that includes all ThisAssembly.* packages.
> This project uses SponsorLink to attribute sponsor status (direct, indirect or implicit). For IDE usage, sponsor status is required.
> IDE-only warnings will be emitted after a grace period otherwise. Learn more at https://github.com/devlooped#sponsorlink.
|
3 |
|
ThisAssembly
Meta-package that includes all ThisAssembly.* packages.
|
2 |
|
ThisAssembly
Meta-package that includes all ThisAssembly.* packages.
> This project uses SponsorLink to attribute sponsor status (direct, indirect or implicit). For IDE usage, sponsor status is required.
> IDE-only warnings will be emitted after a grace period otherwise. Learn more at https://github.com/devlooped#sponsorlink.
|
2 |
.NET Standard 2.0
- Microsoft.CSharp (>= 4.7.0)
- System.Threading.Tasks.Extensions (>= 4.6.3)
| Version | Downloads | Last updated |
|---|---|---|
| 2.1.2 | 2 | 06/16/2026 |
| 2.1.1 | 3 | 06/16/2026 |
| 2.1.0 | 3 | 06/16/2026 |
| 2.1.0-rc.1 | 3 | 06/16/2026 |
| 2.1.0-rc | 3 | 06/16/2026 |
| 2.1.0-beta | 2 | 06/16/2026 |
| 2.0.14 | 3 | 06/16/2026 |
| 2.0.13 | 3 | 06/16/2026 |
| 2.0.12 | 3 | 06/16/2026 |
| 2.0.11 | 3 | 06/16/2026 |
| 2.0.10 | 3 | 06/16/2026 |
| 2.0.9 | 3 | 06/16/2026 |
| 2.0.8 | 3 | 06/16/2026 |
| 2.0.7 | 3 | 06/16/2026 |
| 2.0.6 | 3 | 06/15/2026 |
| 2.0.5 | 3 | 06/16/2026 |
| 2.0.4 | 3 | 06/16/2026 |
| 2.0.3 | 3 | 06/16/2026 |
| 2.0.2 | 3 | 06/16/2026 |
| 1.4.3 | 3 | 06/16/2026 |
| 1.4.2 | 3 | 06/16/2026 |
| 1.4.1 | 3 | 06/16/2026 |
| 1.4.0 | 3 | 06/16/2026 |
| 1.1.3 | 3 | 06/16/2026 |
| 1.1.1 | 3 | 06/16/2026 |
