Invoke-Build | Build Automation in PowerShell | Continous Integration library
kandi X-RAY | Invoke-Build Summary
kandi X-RAY | Invoke-Build Summary
Build Automation in PowerShell
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Invoke-Build
Invoke-Build Key Features
Invoke-Build Examples and Code Snippets
Community Discussions
Trending Discussions on Invoke-Build
QUESTION
I have a .net solution that I can build with msbuild
and successfully generate a deploy package with a PublishProfile.pubxml
transform for deploying to a single web server.
I need to take that build and generate deploy packages for different environments, which are set up as transforms using various .pubxml
profile files.
I know I could build each profile separately, and it'd be negligible risk of injecting a change into a build, but it's time and space that aren't necessary to consume. I would only end up keeping one of them anyway, and just copying the unique web.config
s from each transform into their own deploy package's folder (sorry if this isn't clear, happy to clarify).
I'm looking for something like this pseudocode, which I know is syntactically incorrect but should get the point across:
...ANSWER
Answered 2021-Mar-15 at 20:17I realized I wasn't really asking the right question. When I started searching for msbuild transform posts, I found a way to do what I need.
I landed on updating the .csproj files of the apps I'm building with an AfterBuild
target.
There are 4 transforms required, each with their own .config file as the transform source. I was fortunate that these files had already been created by the application developer.
This is the code I ended up with, placed at the end of the .csproj file, inside the tag. To reduce repetition of paths and filenames, I created
configDir
and xformFile
properties. I like this pattern because it's easily scalable and generic!
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Invoke-Build
Incremental tasks with effectively processed inputs and outputs.
Persistent builds which can be resumed after interruptions.
Parallel builds in separate workspaces with common stats.
Batch invocation of tests composed as tasks.
Ability to define new classes of tasks.
Invoke-Build is published as PSGallery module InvokeBuild. You can install it by one of these commands:.
Invoke-Build is also published as nuget.org/packages/Invoke-Build.
nuget.org/packages/ib provides Invoke-Build as the dotnet tool ib which may be installed as global or local.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page