AlbanianXrm.ImageAsBase64Const.MSBuild 1.0.1

dotnet add package AlbanianXrm.ImageAsBase64Const.MSBuild --version 1.0.1
                    
NuGet\Install-Package AlbanianXrm.ImageAsBase64Const.MSBuild -Version 1.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AlbanianXrm.ImageAsBase64Const.MSBuild" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AlbanianXrm.ImageAsBase64Const.MSBuild" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="AlbanianXrm.ImageAsBase64Const.MSBuild" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AlbanianXrm.ImageAsBase64Const.MSBuild --version 1.0.1
                    
#r "nuget: AlbanianXrm.ImageAsBase64Const.MSBuild, 1.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package AlbanianXrm.ImageAsBase64Const.MSBuild@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AlbanianXrm.ImageAsBase64Const.MSBuild&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=AlbanianXrm.ImageAsBase64Const.MSBuild&version=1.0.1
                    
Install as a Cake Tool

Copyright 2025 AlbanianXrm albanian@xrm.al

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

AlbanianXrm.ImageAsBase64ConstGenerator.MSBuild

This MSBuild package can convert the referenced Image files to Base64 string constants in your application. You need to specify the details of the generated code in a None item and it will be picked up by the custom task. Simple usage example:

<?xml version="1.0" encoding="utf-8"?>
<Project>
	<ItemGroup>
		<None Update="Resources\ShkoOnline32x32.png">
			<Namespace>ShkoOnline.DataverseExcelReporter</Namespace>
			<ClassName>Resources</ClassName>
			<ImageAsBase64Const>ShkoOnline32x32</ImageAsBase64Const>
		</None>
	</ItemGroup>
	<ItemGroup>
		<PackageReference Include="AlbanianXrm.ImageAsBase64Const.MSBuild" Version="1.0.0" PrivateAssets="All" />
	</ItemGroup>
</Project>

The previous example will generate a class named Resources in the ShkoOnline.DataverseExcelReporter namespace with a constant string property named ShkoOnline32x32 containing the Base64 representation of the image.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 309 11/16/2025
1.0.0 212 11/15/2025

v1.0.1:
- Moved generated files to `IntermediateOutputPath`
- Fixed documentation typo in Readme file.
- Added Release Notes file to NuGet package.

v1.0.0:
- First Release. Can convert images to Base64 strings for use as Icons in a XrmToolBox tool.