Questions tagged [pre-build-event]

An event to run scripts, macros or other actions before compilation.

Build events can be used to run scripts, macros, or other custom actions as a part of the compilation process.

Post-build events occur before compilation. These actions (if specified) are executed just before compilation.

How to specify build event - MSDN

190 questions
1
vote
1 answer

.rc to .o conversion in pre-build codeblocks, permission to access file denied

I am a newbie who has been trying to venture into some winapi coding with C++ in CodeBlocks. I am struggling with adding an icon to the exe file. After creating .rc file and a header for it #include #include #include…
Stanislaw T
  • 420
  • 1
  • 6
  • 20
1
vote
1 answer

how to convert string into an integer in a batch file ?

I have this piece of batch file : @echo off set xx=7 echo the version is %xx% I wand to use it in a pre-build event in VS2010 - as an integer : MY_INT = $(xx) but it's value is a string , how can I convert the string value into an integer value…
user1386966
  • 3,302
  • 13
  • 43
  • 72
1
vote
1 answer

Equivalent to VCPostBuildEventTool for C# project in visual studio 2010

I am writing an add-in for visual studio, which creates a test project for a production code project. It should support C, C++ and C# projects. for C/C++ projects I can progarmatically set the post and pre-build events using …
1
vote
0 answers

When does a c# pre-build event happen?

The question of getting the compilation date/time of a program sometimes crops up here. I had an idea for how to do this. So I write a tiny console application which produces a CompileInfo.cs file containing the current date/time... public class…
Clive Tooth
  • 163
  • 9
1
vote
1 answer

Expand list of files in argument for pre-build event

I'm trying to run a pre-build event which passes all the JavaScript files in a directory to MS's Ajax Minifier. Unfortunately, this tool excepts file names as individual arguments (it cannot parse "*.js"). I have quite a few JavaScript files and I…
1
vote
2 answers

How to access resources when running app in Visual Studio?

in my application, I use various resources. I specified pre-build events to copy my resources to output directory. My directory structure looks like this: /Debug/Models/ /Debug/Shaders/ /Debug/Textures/ /Debug/sfero.exe /Debug/... I want to access…
Martin
  • 1,877
  • 5
  • 21
  • 37
0
votes
1 answer

Pre-build in Visual Studio 2010

Does there probable run a C# function at Pre-build event and replace the function call to constant value? For example: class A{ A(){ var aVar = B.Func1("a"); } } class B{ static String Func1(String str){ //Do some things …
user554712
  • 211
  • 1
  • 3
  • 8
0
votes
1 answer

Add custom resource to Silverlight application with pre-build event

I want to add source code of my silverlight project to resource as flat text files (for use in run-time with Application.GetResourceStream()). How I can do it without pre-build event of my project?
AndreyAkinshin
  • 18,603
  • 29
  • 96
  • 155
0
votes
1 answer

WebBrowserControl + JS minification: Manipulate resources-properties with js code for minification puproses in Visual Studio's pre-build events

Background: Got a C# project which involves a block of javascript that gets programmatically injected in the web pages displayed by a webbrowser control. However, it is desirable to minify this block of javascript and have it embedded/written-into…
XDS
  • 3,786
  • 2
  • 36
  • 56
0
votes
0 answers

Generating designer.cs code class for a DBML file using Pre build event in Visual Studio 2022

Question: I have a DBML file located within a Data\Linq folder in my Visual Studio 2022 project. I'm aiming to automatically generate the designer.cs code class for this DBML file using the Pre build event feature. Could someone provide step-by-step…
0
votes
0 answers

Commands from bat file is missing

I am having a tough time running a set of prebuild tasks. I am getting an error indicating that the commands are not found. I am not sure where to start. The project contains a bat file with the following commands taskkill /f /fi "imagename eq…
0
votes
1 answer

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 version number of the Windows app's package in the…
0
votes
1 answer

pre build event with if condition

I'm looking to do this: if "$(TargetDir.Contains('BeamCutSoft_E'))" == true xcopy /E /Y "$(ProjectDir)LibsEssential" "$(TargetDir)" else xcopy /E /Y "$(ProjectDir)LibsPremium" "$(TargetDir)" but I get the error : The command "if "False" ==…
Astro
  • 9
  • 1
  • 4
0
votes
1 answer

Upserting using Coda Pre-built Function in Pipedream

I am using the variable path below to upsert a data to Coda. {{steps.trigger.event.body.actions[0].name}} The code above returns an example output below: CO-DEN - IBC 2021 What I really want to insert is only ‘CO-DEN’, the first word from the…
alyssaeliyah
  • 2,214
  • 6
  • 33
  • 80
0
votes
0 answers

Visual Studio Pre-build event can't activate conda environment

I have some python scripts to execute before building. I have a batch file activating the environment and call the script. It runs fine on my laptop both in windows cmd and VS prebuild. But when I exported enviroment.yml and shared it with…