Swallow.MSBuild.Node
0.1.0
dotnet add package Swallow.MSBuild.Node --version 0.1.0
NuGet\Install-Package Swallow.MSBuild.Node -Version 0.1.0
<PackageReference Include="Swallow.MSBuild.Node" Version="0.1.0" />
<PackageVersion Include="Swallow.MSBuild.Node" Version="0.1.0" />
<PackageReference Include="Swallow.MSBuild.Node" />
paket add Swallow.MSBuild.Node --version 0.1.0
#r "nuget: Swallow.MSBuild.Node, 0.1.0"
#:package Swallow.MSBuild.Node@0.1.0
#addin nuget:?package=Swallow.MSBuild.Node&version=0.1.0
#tool nuget:?package=Swallow.MSBuild.Node&version=0.1.0
Swallow.MSBuild.Node
An MSBuild adapter to run npm run build in dotnet build and include the
resulting files as static assets.
Installation
Add a package reference to Swallow.MSBuild.Node, but be sure to include the
assets only for building:
<PackageReference Include="Swallow.MSBuild.Node" Version="0.1.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>build</IncludeAssets>
</PackageReference>
After that, once you've got a package.json in the root of your project, MSBuild
will...
- Run
npm installon adotnet restore(if needed) - Run
npm run buildon adotnet build(if needed) - Run
npm run cleanon adotnet clean
If the build or clean scrpt is not defined, it will just not run anything.
All scripts will be executed with $OUT_DIR set to the target directory; if you
write to any file, be sure to pass that environment variable to any tooling.
Otherwise, the resulting output will not be included as static asset.
Configuring
Swallow.MSBuild.Node can be configured in a number of ways. Shown is the default
value for every property:
<PropertyGroup>
<FrontendCompilePatterns>*.js;*.jsx;*.ts;*.tsx</FrontendCompilePatterns>
<ExcludeWwwRoot>true</ExcludeWwwRoot>
<FrontendCompileExcludes Condition="$(ExcludeWwwRoot) == 'true'">wwwroot/**/*</FrontendCompileExcludes>
<FrontendRootPath>$(MSBuildProjectDirectory)/</FrontendRootPath>
<BuildToolPath>npm</BuildToolPath>
<BuildScriptName>build</BuildScriptName>
<CleanScriptName>clean</CleanScriptName>
</PropertyGroup>
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 |
|---|---|---|
| 0.1.0 | 30 | 4/12/2026 |