0

I have a build script, either the "pre-build" or "post-build" script options available on a project in visual studio starting an external program that loads the C# class library I am writing, its basically just a path and some command line arguments. Once in a while i want to test build without running the pre-build or post-build script to see if i got any errors, is there any way to toggle it off or do i have to remove it manually?

Ive tried to change the post-build settings to run only on successfull builds and removing semicolons (;) after method calls but it still runs.

I also tried looking in the options for visual studio and searched stack overflow and the web with no success, please help me!

Thanks in advance!

5
  • Is this a project-specific build script, called from a pre- or post-build event in the project properties? Commented Mar 24, 2015 at 22:59
  • 3
    You're using the term "build script" in a way that makes it unclear what you're asking. Even just a csproj file can be regarded as a build script since it's a valid MSBuild file that can be used to build an assembly. I'd suggest eliminating the terms "build" and "build script" from your question entirely and replacing them with something more specific. That would go a long way toward clarifying what you're asking. Commented Mar 24, 2015 at 23:55
  • Ok, seems i lack a litte understanding of the subject here, updated the question to the best of my knowledge, i hope it helps! Commented Mar 25, 2015 at 8:09
  • Creating an additional build configuration could help Commented Mar 25, 2015 at 8:12
  • Why? What problem are you actually trying to solve? This sounds like you're doing something weird. Solution builds should always work on a clean checkout, this sounds like you're doing something hacky. Commented Mar 25, 2015 at 8:18

1 Answer 1

2

You can do this with build configurations, since build events are configuration-specific.

So clone your Debug configuration, name it Debug Without Events and remove the build events in that configuration. Then, while you're working as usual, you'll just build in Debug, and when you want to check without the events, switch to Debug Without Events and rebuild.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.