Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
27 views

Visual Studio Build Event in referenced project

I have two projects: Project B is referenced by root project A. Project B have some text files in the Files subfolder I want to copy to the output folder bin/debug. I setup the post build event in ...
Helic's user avatar
  • 927
0 votes
0 answers
32 views

Visual Studio Debugger reintroduces install dir files that PostBuildEvent deleted

My C# project references three files from a third-party SDK. By default, these files are written to the target build folder when I compile. But I don't want them there (for complicated and irrelevant ...
Phoeniceus Agelaius's user avatar
0 votes
1 answer
32 views

I'm unable to find a way to conditionally copy files based on platform in a post build event in Visual Studio 2022

I have a .NET 6 WPF application with 52 projects. For one of the projects, I need a post-build event to copy files from one directory if the Platform is "Any CPU" and from another directory ...
Jeff Huckins's user avatar
0 votes
0 answers
65 views

Azure Devops SelfHosted Agent MSBuild post build launching exe from incorrect path

We are setting up CI via Azure Dev Ops pipelines. As a proof of concept I am using the VSBuild step on a self hosted build agent. I hoped this would most closely mirror how we are currently building ...
Kevin's user avatar
  • 56
0 votes
1 answer
41 views

pipeline is not able to build after adding the postbuild

Jenkins build error logs: started by user mydemo03 org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: 14: Expected a stage @ line 14, column 9. ...
Prudhvi Chowdary's user avatar
-1 votes
1 answer
185 views

The behaviour of $(TargetPath) during .NET8 compilation for getting target exe

When I use $(TargetPath) in my PostBuildEvent for a .NET8 console project for the purpose of using signtool I find that it refers to the file .dll file and not the file .exe. It makes sense to sign ...
Andrew Truckle's user avatar
1 vote
1 answer
620 views

How do I generate the swagger file, swagger CLI isn't supported with .net 8

Since swagger CLI (swashbuckle.aspnetcore.cli v6.5.0) isn't supported with .net 8 (yet), how do I generate the swagger file (Open API specifications file) in post build event in .net 8 project? I've ...
Shashank Shukla's user avatar
5 votes
0 answers
2k views

Error: "MSB3073 The command "dotnet swagger tofile --output swagger_v1.json bin\Debug\net6.0\TestSwaggerGenWithDotnetSix.dll v1" exited with code 1."

I want to generate the swagger file (OpenAPI specification json file) post building my API. I've added this <Target> XML script in my .csproj file to generate the swagger file but I get the ...
Shashank Shukla's user avatar
0 votes
1 answer
128 views

What is the right way to move references around in my output folder?

My solution contains a few default Plugin projects which our build into <OutputPath>..\bin\Debug\Plugins\$(MSBuildProjectName)</OutputPath> Doing that all referencec assemblies end up in ...
Piglet's user avatar
  • 28.6k
0 votes
2 answers
216 views

How to get the compiler version in a post-build event?

I would like to add the version of the compiler to an auto-generated release notes file. Currently, this is what I have: echo "compiler version:" >>Release_Note.txt MSBuild.exe -...
Dominique's user avatar
  • 17.3k
0 votes
1 answer
138 views

Why can't I see the commit hash of my application in a post-build event?

When I go to the build directory of my application, and I ask for the commit hash, everything is working fine: Prompt>git log -1 --format=format:"%H" ...
Dominique's user avatar
  • 17.3k
0 votes
1 answer
313 views

Getting Version Number in GitHub Actions for a .Net Maui App

I am attempting to build a Github Action that will publish my .Net Maui app (among other things). So far, I'm only targeting a Windows Desktop deployment of my app. For context, I've defined the ...
jobrien9's user avatar
  • 147
0 votes
1 answer
821 views

Multiple post-build events in Visual Studio 2022

There are plenty of sites where it the possibility is described to add multiple post-build events in Visual Studio (also version 2022): just add newlines. Apparently, it's not that simple: I am ...
Dominique's user avatar
  • 17.3k
0 votes
1 answer
864 views

Getting 'exited with code 9009' when trying to copy files via post build event - VS 2017

I want to copy a set of files from my project folder to the output folder using the post-build event. If the folder Settings does not exist, want to create it. I have tried the below code. SET path=$(...
spc's user avatar
  • 141
0 votes
2 answers
605 views

How to make an error in a Visual Studio post-build event make Visual Studio consider the build as failed?

I was using Visual Studio 2015 when I noticed this issue, but I want a solution that will also work in 2017, 2019, and 2022 (and hopefully future versions as well) I have a project with a post build ...
Bwmat's user avatar
  • 4,514
0 votes
1 answer
68 views

PostPublish.bat file works when called using Command Prompt, Throwing error when called as a Post Publish Event

I created a batch file to obfuscate a dll. When I run that dll using command prompt it is obfuscating dll & giving desired output. When I configure the same batch file to be run after publish of ...
Sumit Rao's user avatar
0 votes
0 answers
46 views

Trigger another jenkins Pipeline B after success of jenkins pipeline A

I am using Scripted pipeline. I want to trigger pipeline B after the success of Pipeline A, so I added this bit of code to do that stage('Invoke Another Pipeline'){ steps { ...
ApPrashant's user avatar
0 votes
0 answers
143 views

Why does the post-build event not cd?

I put this on the post-build event: cd echo "hello" cd bin\Release The result doesn't cd to bin\Release: 1>D:\QC supplements\Code\LOS Installer 1>"hello" Do you know why ...
Ooker's user avatar
  • 2,698
0 votes
1 answer
676 views

Azure DevOps Deployment : E: Could not open lock file /var/lib/dpkg/lock on Azure Cloud

I need to install a pre-built environment for my application to be deployed, with a bash script that i add to parameters. #!/bin/bash apt-get install build-essential python3-dev python3-pip python3-...
Moun's user avatar
  • 315
0 votes
0 answers
53 views

Can I make one postbuildevent occur after another in a csproj?

I'm trying to make one postbuildevent to go, and then after that finishes, then do the other postbuildevent, don't know if this is possible. I really had no idea how to do this and I couldn't find any ...
Jonyboylovespie's user avatar
0 votes
1 answer
118 views

.NET Copy files to a specified directory where part of the path is generic user

Inside my .csproj I have added some post build event which copies the built files and copies them to some directory: <Target Name="CopyDLLs" AfterTargets="Build"> <...
axcelenator's user avatar
  • 1,527
0 votes
1 answer
127 views

Escape @ Sign Inside ECHO Command In Batch Script (Called Within VS Post-Build Event)

I simply want to display the @ sign inside text that is output by an ECHO command in a CMD batch script that's invoked by a Visual Studio post-build event. How can I do that? My one-line post-build ...
ShieldOfSalvation's user avatar
0 votes
1 answer
173 views

Create CSV file with post build event C#

I have some dictionary: Dictionary<int, string> myDict = new Dictionary<int, string>; Dictionary holds: 1,mike 2,john .... I want to create a CSV file from the dictionary with post build ...
axcelenator's user avatar
  • 1,527
0 votes
1 answer
176 views

How to dump console message to Visual Studio build output window during post build event script execution

I have a python script which will be run as a Visual Studio post build event. That script will run around 1 minute or even longer. The python script itself will print some messages to console to ...
user19570697's user avatar
0 votes
1 answer
766 views

How to test if a folder exists in a post build event?

In a database project in Visual Studio 2022, I would like to copy files only if the target folder exists. Assume the target folder is called c:\files I did something like: if exist "c:\files\&...
Tony_Henrich's user avatar
  • 43.7k
0 votes
1 answer
654 views

Run NuGet add in Visual Studio 2022 post build event

I've created a local NuGet feed for some testing. In an attempt to automate the process, I've tried to create a post-build event to execute the 'NuGet add' for the package. The NuGet add fails with: ...
rrirower's user avatar
  • 4,570
0 votes
0 answers
104 views

How can i assign the return value of a power shell script to a variable while being used in a post build event

I have a Powershell script that reads the Assembly version from a dll, I want to store this return value in a variable, I am running the ps1 script from a post-build event: When i execute the script: ...
DonMiguelSanchez's user avatar
0 votes
1 answer
675 views

Read Assembly Version in a Post Build Event in Visual Studio 2022 targeting Netstandard2 .0

I have a project in netstandard 2.0 and I use post build events to create a nuget package and to push it automatically to my feed, that was working on .NetFramework. I know that with netstandard and ...
DonMiguelSanchez's user avatar
0 votes
1 answer
763 views

Wix Toolset how to copy to folder with version in path

I'm using Wix toolset v 3.11 in VS2019 to create a setup for our application. In order to ease maintenance, I need to copy the installer files to a folder with the version in its path. Basically what ...
Marcomattia Mocellin's user avatar
2 votes
0 answers
347 views

msbuild command to only publish and skip rebuilding

My requirement is to publish the project code to a folder. I have configured the below command in the Post build event. When I build the project the post build event is executing which is rebuilding ...
Sandeep Reddy Pinniti's user avatar
2 votes
1 answer
143 views

Passing space only property from Visual Studio project build to Inno Setup compiler

In my Inno Setup script, I have a variable called BuildString defined like below. #ifndef BuildString #define BuildString " - No Config" But in my VS project post-build event, I will have ...
Scott Tan's user avatar
  • 101
1 vote
1 answer
385 views

Post-Build Event, Copy command not correct?

I am trying to do the following: set strSolutionDir= "$(SolutionDir).." SET SeaProjectPATH= %strSolutionDir%\$(ProjectName)\bin SET SeaMainMenuPATH= %strSolutionDir%\seamainmenu\bin ...
Alexander's user avatar
0 votes
2 answers
1k views

dotnet publish fails intermittently because DLL is in use, even after recycling the app pool

I am working on an ASP.NET Core 3.1 web app project and I noticed that the one-click web deploy (for which I have a folder profile setup) does not work because the DLLs in my website folder are in use ...
Paul's user avatar
  • 1,405
0 votes
1 answer
720 views

Where do we edit AfterBuild target in Visual Studio

Today, I came to know about AfterBuild target when I was trying to build a GitHub project. I had hard time figuring out a failing command which was getting fired after the build. I was not sure from ...
RBT's user avatar
  • 25.6k
3 votes
0 answers
329 views

How to make XCOPY in Visual Studio Post Build Event Command Line support both Linux and Windows?

How to make XCOPY in Visual Studio Post Build Event Command Line support both Linux and Windows? I have a post build event command line in my C# project and can works well on windows, but always ...
CuteLeon's user avatar
1 vote
1 answer
1k views

Visual Studio 2019 Windows SDK executable path macro has multiple paths

I'm trying to use $(WindowsSDK_ExecutablePath_x64) in my C++ project post build events to copy some files. However, it contains two paths instead of one. I can't seem to be able to find how to use the ...
rashmatash's user avatar
  • 1,819
2 votes
0 answers
39 views

Nuget package files reappear after post build event

I have a nuget package which is like <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <metadata> <id>Nuget1</id> <version>1.4.21&...
Abhijith's user avatar
1 vote
1 answer
969 views

Post-Build Event using robocopy suddently stopped working

I have a problem with my post-build event using robocopy. The code used to work a couple of days ago and now it is not working in any of my projects. Below, the code I use for my post-built events for ...
Oscar Ramirez's user avatar
0 votes
1 answer
504 views

VS Post Build Event for build logs

How to copy the build logs (including build time ) using the post-build events to a log file from Visual studio
Deepak Suresh's user avatar
2 votes
1 answer
2k views

How to set a post build command to VS project from cmake?

I need to set this post-build event in cmake how to do this? I am using below command in my vs project, but I need to add it during CMake build in Cmakelists.txt xcopy /y /d "$(TargetPath)" &...
kobi89's user avatar
  • 162
1 vote
0 answers
775 views

Fail a build when the post-build event of a referenced project fails

I have a winforms app (PostBuildApp) that has a project reference to another project (PostBuildLib) inside the same solution. Both projects have a post-build event. When the post-build event of the ...
Icarus's user avatar
  • 11
0 votes
1 answer
79 views

Error accessing files in jenkins postbuild action

summary reports are located here:\pc1\tests\Env\Getreport.html \pc1\tests\Env\Getreport.xml file:////Users/jenkins/Documents/Reports Sending email to: [email protected] Sending email for trigger: ...
GPs's user avatar
  • 85
0 votes
1 answer
334 views

Run a post-signing script in Xcode 12

Xcode 12 performs a binary signing after all steps of the build have ended, including any custom post-build steps. However I need to run a script to be performed after signing (e.g. for copying the ...
gil_mo's user avatar
  • 605
0 votes
0 answers
218 views

VS2019 move post build event to post publish event?

I'm having a hard time finding a way to only rename a file when publishing an application (using Visual Studio 2019). I had no issue doing this with a post-build event, but that actually changes the ...
Xorcist's user avatar
  • 3,261
0 votes
1 answer
851 views

Post Build event that zip files with timestamp in name

I'm trying to make a post-build event that zip release files with a timestamp as a part of folder name. I am creating zip file like this: if $(ConfigurationName) == Release (powershell Compress-...
Sebk's user avatar
  • 5
6 votes
1 answer
1k views

how to write cross platform postbuild event in dotnet core

I need some help writing a post build event that would work cross platform. The following in my csproj file will work on windows but not Unix. Thanks. <Target Name="PostBuild" ...
Kevin Tran's user avatar
0 votes
1 answer
298 views

C# Visual Studio TargetPlatform macro

We´ve got some thrid party c++ dll´s which are either x64 or x86. Now we want to write a post build script, which copies the x86 dll´s into target directory, if the targetplatform is x86 or the other ...
Felix Arnold's user avatar
2 votes
1 answer
2k views

Azure Pipelines post-build event copy command failure

I am getting copy errors when my Azure Pipeline is doing a build on projects where a post-build event is present which copies the built .dll into a folder elsewhere in the solution. The solution in ...
Jordan's user avatar
  • 169
0 votes
0 answers
85 views

Blacklist post build event gacutil in azure pipeline

Is there a way in Azure pipeline to blacklist a certain post build event like gacutil? I want the pipeline to fail when the Build solution task sees "e.g. :\Program Files (x86)\Microsoft SDKs\...
Motivizer's user avatar
0 votes
0 answers
261 views

How to do REST api call on build event

I am working on .net standard library. I have two requirements Note : client project means - c# project which consumes my library. Call a REST api on pre or post build event of client project. Based ...
Noorul's user avatar
  • 913

1
2 3 4 5
11