SvgBuild.MsBuild 0.0.1

Render SVG file as part of the build.

There is a newer version of this package available.
See the version list below for details.
Install-Package SvgBuild.MsBuild -Version 0.0.1
dotnet add package SvgBuild.MsBuild --version 0.0.1
<PackageReference Include="SvgBuild.MsBuild" Version="0.0.1">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SvgBuild.MsBuild --version 0.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

SvgBuild Appveyor Build Travis Build

This is a .NET based tool set to save SVG to raster images. Includes a
terminal-based program and a MSBuild task.

Build

This program uses MSBuild (included in Visual
Studio
distribution on Windows or Mono on other
operation systems). To build the program, run the following script:

$ nuget restore
$ msbuild /p:Configuration=Release SvgBuild.sln

It will create the SvgBuild.Console/bin/Release/SvgBuild.Console.exe binary
file.

Usage

SvgBuild basically takes two parameters: input and output path. Input path
should lead to a valid SVG file, output path should lead to a valid place to
save the resulting image. Output image format will be determined by the output
file extension. The supported file extensions are:

  • .bmp
  • .gif
  • .ico
  • .jpeg, .jpg
  • .png
  • .tiff

The image will be rescaled to the new size, if specified. Otherwise, the size
of the original document will be used.

From Terminal

On Windows:

$ SvgBuild.Console <path to the input file> <path to the output file> [<width>x<height>]

On other operating systems:

$ mono SvgBuild.Console <path to the input file> <path to the output file>

From MSBuild

Install SvgBuild.MsBuild package into your project. Your NuGet client should
automatically generate the following in your project file:

<Import Project="..\packages\SvgBuild.MsBuild.0.0.1\build\SvgBuild.MsBuild.props"
        Condition="Exists('..\packages\SvgBuild.MsBuild.0.0.1\build\SvgBuild.MsBuild.props')" />

After that, you're able to run SVG processing tasks e.g. in the AfterBuild
target:

<Target Name="SvgBuildTasks" AfterTargets="AfterBuild">
  <SvgBuildTask InputPath="$(ProjectDir)..\SvgBuild.Tests\Resources\Image.svg"
                OutputPath="$(OutDir)Test.bmp"
                Width="30"
                Height="60" /> <!-- Width and Height are optional --> 
</Target>

Test

On Windows:

$ packages\xunit.runner.console.2.3.1\tools\net452\xunit.console.exe SvgBuild.Tests\bin\Release\SvgBuild.Tests.dll

On other operating systems:

$ mono packages/xunit.runner.console.2.3.1/tools/net452/xunit.console.exe SvgBuild.Tests/bin/Release/SvgBuild.Tests.dll

Pack

To pack the project before uploading it to NuGet, use the following command:

$ msbuild /p:Configuration=Release SvgBuild.sln
$ nuget pack SvgBuild.MsBuild/SvgBuild.MsBuild.csproj -Tool -Prop Platform=AnyCPU -Prop Configuration=Release

SvgBuild Appveyor Build Travis Build

This is a .NET based tool set to save SVG to raster images. Includes a
terminal-based program and a MSBuild task.

Build

This program uses MSBuild (included in Visual
Studio
distribution on Windows or Mono on other
operation systems). To build the program, run the following script:

$ nuget restore
$ msbuild /p:Configuration=Release SvgBuild.sln

It will create the SvgBuild.Console/bin/Release/SvgBuild.Console.exe binary
file.

Usage

SvgBuild basically takes two parameters: input and output path. Input path
should lead to a valid SVG file, output path should lead to a valid place to
save the resulting image. Output image format will be determined by the output
file extension. The supported file extensions are:

  • .bmp
  • .gif
  • .ico
  • .jpeg, .jpg
  • .png
  • .tiff

The image will be rescaled to the new size, if specified. Otherwise, the size
of the original document will be used.

From Terminal

On Windows:

$ SvgBuild.Console <path to the input file> <path to the output file> [<width>x<height>]

On other operating systems:

$ mono SvgBuild.Console <path to the input file> <path to the output file>

From MSBuild

Install SvgBuild.MsBuild package into your project. Your NuGet client should
automatically generate the following in your project file:

<Import Project="..\packages\SvgBuild.MsBuild.0.0.1\build\SvgBuild.MsBuild.props"
        Condition="Exists('..\packages\SvgBuild.MsBuild.0.0.1\build\SvgBuild.MsBuild.props')" />

After that, you're able to run SVG processing tasks e.g. in the AfterBuild
target:

<Target Name="SvgBuildTasks" AfterTargets="AfterBuild">
  <SvgBuildTask InputPath="$(ProjectDir)..\SvgBuild.Tests\Resources\Image.svg"
                OutputPath="$(OutDir)Test.bmp"
                Width="30"
                Height="60" /> <!-- Width and Height are optional --> 
</Target>

Test

On Windows:

$ packages\xunit.runner.console.2.3.1\tools\net452\xunit.console.exe SvgBuild.Tests\bin\Release\SvgBuild.Tests.dll

On other operating systems:

$ mono packages/xunit.runner.console.2.3.1/tools/net452/xunit.console.exe SvgBuild.Tests/bin/Release/SvgBuild.Tests.dll

Pack

To pack the project before uploading it to NuGet, use the following command:

$ msbuild /p:Configuration=Release SvgBuild.sln
$ nuget pack SvgBuild.MsBuild/SvgBuild.MsBuild.csproj -Tool -Prop Platform=AnyCPU -Prop Configuration=Release

Release Notes

Initial release.

Dependencies

This package has no dependencies.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.0 2,140 12/31/2017
0.0.1 437 11/26/2017