build.proj (27 lines of code) (raw):

<Project DefaultTargets="FullBuild" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" > <PropertyGroup> <SolutionFile></SolutionFile> </PropertyGroup> <!-- <Target Name="FullBuild" DependsOnTargets="Compile;Nuget;Test45;Test" /> --> <Target Name="FullBuild" DependsOnTargets="Compile;Test;Nuget" /> <Target Name = "Compile"> <Exec Command="dotnet restore AWS.Logger.sln"/> <Exec Command="dotnet msbuild AWS.Logger.sln /p:Configuration=Release /p:AWSKeyFile=$(CustomSnkFileLocation)"/> </Target> <Target Name = "Nuget" DependsOnTargets="Compile;Test"> <!-- You could use the MSBuild Copy task here to move the compiled code into a structure that fits your desired package format --> <Exec Command="if exist Deployment rmdir /S/Q Deployment"/> <Exec Command="mkdir Deployment"/> <Exec Command="dotnet msbuild /t:pack .\src\AWS.Logger.Core /p:Configuration=Release /p:PackageOutputPath=..\..\Deployment" ContinueOnError="WarnAndContinue"/> <Exec Command="dotnet msbuild /t:pack .\src\AWS.Logger.AspNetCore /p:Configuration=Release /p:PackageOutputPath=..\..\Deployment" ContinueOnError="WarnAndContinue"/> <Exec Command="dotnet msbuild /t:pack .\src\AWS.Logger.Log4net /p:Configuration=Release /p:PackageOutputPath=..\..\Deployment" ContinueOnError="WarnAndContinue"/> <Exec Command="dotnet msbuild /t:pack .\src\NLog.AWS.Logger /p:Configuration=Release /p:PackageOutputPath=..\..\Deployment" ContinueOnError="WarnAndContinue"/> <Exec Command="dotnet msbuild /t:pack .\src\AWS.Logger.SeriLog /p:Configuration=Release /p:PackageOutputPath=..\..\Deployment" ContinueOnError="WarnAndContinue"/> </Target> <Target Name = "Test" DependsOnTargets="Compile"> <Exec Command="dotnet test .\test\AWS.Logger.NLog.Tests\AWS.Logger.NLog.Tests.csproj"/> <Exec Command="dotnet test .\test\AWS.Logger.AspNetCore.Tests\AWS.Logger.AspNetCore.Tests.csproj"/> <Exec Command="dotnet test .\test\AWS.Logger.NLog.FilterTests\AWS.Logger.NLog.FilterTests.csproj"/> <Exec Command="dotnet test .\test\AWS.Logger.Log4Net.Tests\AWS.Logger.Log4Net.Tests.csproj"/> <Exec Command="dotnet test .\test\AWS.Logger.Log4Net.FilterTests\AWS.Logger.Log4Net.FilterTests.csproj"/> <Exec Command="dotnet test .\test\AWS.Logger.SeriLog.Tests\AWS.Logger.SeriLog.Tests.csproj"/> </Target> </Project>