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.
- Host: GitHub
- URL: https://github.com/guitarrapc/swaptasks
- Owner: guitarrapc
- License: mit
- Created: 2018-02-18T19:56:09.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-06-09T20:13:10.000Z (about 6 years ago)
- Last Synced: 2024-05-01T22:18:51.866Z (about 2 years ago)
- Topics: dotnet, msbuild, visual-studio
- Language: C#
- Homepage:
- Size: 28.3 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
[](https://ci.appveyor.com/project/guitarrapc/swaptasks)
[](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)