An open API service indexing awesome lists of open source software.

https://github.com/guitarrapc/swaptasks

MSBuild Task to provide SwapFile and clean up folder on publish.
https://github.com/guitarrapc/swaptasks

dotnet msbuild visual-studio

Last synced: about 2 months ago
JSON representation

MSBuild Task to provide SwapFile and clean up folder on publish.

Awesome Lists containing this project

README

          

[![Build status](https://ci.appveyor.com/api/projects/status/lvqx1aaipttqtcaq?svg=true)](https://ci.appveyor.com/project/guitarrapc/swaptasks)
[![NuGet status](https://img.shields.io/nuget/v/SwapTasks.svg)](https://www.nuget.org/packages/SwapTasks)

## SwapTasks

MSBuild Custom Tasks for .NETCore

## Install

You can install by [NuGet](https://www.nuget.org/packages/SwapTasks).

```powershell
PM> Install-Package SwapTasks
```

## Supported Platform

- .NETStandard 2.0
- .NET Framework (FullClr)

## Current Tasks

### SwapFile

#### Description

Swap file with source and destination.

#### Example

```xml



```

#### Equivalent

```xml


Trigger build parameter missing! Skipping $(SwapFileName).$(SwapExtension) swap task.
$([System.IO.Path]::Combine($(SwapDestinationDir), $(SwapFileName).$(SwapExtension)))



Detected Trigger parameter, Copy $(SwapFileName).$(Trigger).$(SwapExtension) to $(SwapFileName).$(SwapExtension)
$(MSBuildThisFileDirectory)$(SwapFileName).$(Trigger).$(SwapExtension)



Development
Detected Trigger parameter, $(SwapFileName).$(Trigger).$(SwapExtension) missing! Copy $(SwapFileName).$(Fallback).$(SwapExtension) to $(SwapFileName).$(SwapExtension)
$(MSBuildThisFileDirectory)$(SwapFileName).$(Fallback).$(SwapExtension)



Missing Trigger parameter! Copy $(SwapFileName).$(Configuration).$(SwapExtension) to $(SwapFileName).$(SwapExtension)
$(MSBuildThisFileDirectory)$(SwapFileName).$(Configuration).$(SwapExtension)






```

### CleanPublishArtifact

clean publish directory for `dotnet publish`.

#### Example

```xml



```

#### Equivalent

```xml



Clean up publish path before new publish execute.
$([System.IO.Path]::Combine($(MSBuildThisFileDirectory),$(PublishDir)))





```

## Related

- > [Shipping a cross-platform MSBuild task in a NuGet package - Nate McMaster](http://www.natemcmaster.com/blog/2017/07/05/msbuild-task-in-nuget/)
- > [natemcmaster/msbuild-tasks - Github](https://github.com/natemcmaster/msbuild-tasks)
- > [MSBuild custom task and assembly locks - mnaoumov.NET](https://mnaoumov.wordpress.com/2015/07/13/msbuild-custom-task-and-assembly-locks/)

## LICENSE

The MIT License (MIT)