post-build-event

In Visual Studio 2013, how do I minify Javascript and CSS in the post-build step

我只是一个虾纸丫 提交于 2019-12-03 12:41:09
问题 In Visual Studio 2013, how do I minify Javascript and CSS in the post-build step? I'd like to have every single css and js file compress into a .min.js, or .min.css in the same folder. I don't want to check in the minified files, but rather just have them generated post-build. 回答1: With Microsoft Ajax Minifier you could create powershell script to create minified versions of all files in given folder and add it to Post-build events. Example for js files(it will be similar for css): Get

Using Resource Hacker for changing the icon after the build

半腔热情 提交于 2019-12-03 12:10:29
问题 This question is written in several places (like here and here). In the second question there is a comment that says to use ResHacker.exe -addoverwrite "Project.exe", "Project.exe", "ProgramIcon.ico", ICONGROUP, MAINICON, 0 I also tried using -modify instead of -addoverwrite ResHacker.exe -modify "Project.exe", "Project.exe", "ProgramIcon.ico", ICONGROUP, MAINICON, 0 but the result is the same. The icon is changed: if I right click on the exe file and check the properties I see that the icon

Visual Studio Post Build Event MT.exe command fails with code 9009

試著忘記壹切 提交于 2019-12-03 11:04:59
Hi I am running following command from my post build event: C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\mt.exe -manifest "$(ProjectDir)$(TargetName).exe.manifest" -updateresource:"$(TargetDir)$(TargetName).exe;#1" It is failing with Exited with code 9009... I don't understand why this happens; any suggestions? jqa Try adding quotes around the mt.exe path, e.g.: "C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\mt.exe" Also, make sure that path is valid. Hope this helps. I've been beating my head against code 9009 all day and a full quoted path seem to make it work. Nathan Wheeler Exit

Run batch script before Debugging

南楼画角 提交于 2019-12-03 06:41:20
I want to run a batch script every time before starting program for debugging. For the build events, such functionality is realized using pre-build event, post-build event. For actual debugging, I could not find any pre-Debug, post-Debug events. How to realize this scenario? I am using VS2008, .net framework 3.5, c# application. I am opposed to idea of creating some extra lines of code within the application that would fire-up external batch file. Reddog I realise you wished to avoid additional code, but in your Main function you could use Debugger.IsAttached() to kick off your work for you.

Can I copy multiple named files on the Windows command line using a single “copy” command?

蓝咒 提交于 2019-12-03 04:11:45
问题 I'd like to copy several known files to another directory as a part of a post-build event, but don't want to have lines and lines of "copy [file] [destination] [switches]" in my build event. If possible, I'd like to list out the files I'd like to copy using a similar format: "copy [file 1] [file 2] [file 3] [etc...] [destination] [switches]". However, Windows doesn't seem to like this type of format. Any ideas? Thanks! 回答1: You can use 'for' either in a batch file or directly from the command

In Visual Studio 2013, how do I minify Javascript and CSS in the post-build step

蓝咒 提交于 2019-12-03 03:45:19
In Visual Studio 2013, how do I minify Javascript and CSS in the post-build step? I'd like to have every single css and js file compress into a .min.js, or .min.css in the same folder. I don't want to check in the minified files, but rather just have them generated post-build. With Microsoft Ajax Minifier you could create powershell script to create minified versions of all files in given folder and add it to Post-build events. Example for js files(it will be similar for css): Get-ChildItem *.js -Exclude *.min.js | Foreach-Object{ $file = [io.fileinfo]$_.Name ajaxmin $file.Name -out "$($file

How do I start a background task from a VisualStudio post-build event?

懵懂的女人 提交于 2019-12-03 03:33:37
I'm trying to start an instance of grunt watch whenever a particular project is run from VisualStudio. I have a single page-app written in ember, and compiled with grunt, which connects to a backend written with WebAPI. I'm trying to reduce friction so it's possible to Start Debugging (F5) in VS and have it get everything up and going. If I add a post-build event to compile the app with grunt, it works fine: node node_modules\grunt-cli\bin\grunt dev --no-color grunt watch never terminates, so the VisualStudio build appears to hang until you terminate the node.exe process (which is mostly

Using Resource Hacker for changing the icon after the build

旧时模样 提交于 2019-12-03 03:25:40
This question is written in several places (like here and here ). In the second question there is a comment that says to use ResHacker.exe -addoverwrite "Project.exe", "Project.exe", "ProgramIcon.ico", ICONGROUP, MAINICON, 0 I also tried using -modify instead of -addoverwrite ResHacker.exe -modify "Project.exe", "Project.exe", "ProgramIcon.ico", ICONGROUP, MAINICON, 0 but the result is the same. The icon is changed: if I right click on the exe file and check the properties I see that the icon has been changed, but in Windows Explorer I still see the old icon. If I open it with Resource Hacker

XCopy will not copy in visual studio

元气小坏坏 提交于 2019-12-02 11:34:36
问题 I'll copy a exe into another folder with a post build event from visual studio. This should happens every build. I haven't any errors, the exe output is in a custom folder, but it will not copy into another folder, why? The build output from visual studio is only: Build successfully. 0 files copied . With this script, I've changed the output folder: $(SolutionDir)..\..\build\$(ProjectName)\ . And with this, I'll try to copy the result into another folder: xcopy "$(SolutionDir)..\..\build\$

MSBuild AfterBuild Step

假如想象 提交于 2019-12-02 10:02:56
I have added the following code to a VisualC++ 2010 .vcxproj file just inside the first <project> tag: <PropertyGroup> <PilotStationDirectory>\..\..\PilotStation\PilotStationApp\$(Configuration)</PilotStationDirectory> </PropertyGroup> <ItemGroup> <MySourceFiles Include="$(TargetName).dll;$(TargetName).lib;$(TargetName).pdb" /> </ItemGroup> <Target Name="AfterBuild"> <MakeDir Directories="$(PilotStationDirectory)" /> <Copy SourceFiles="@(MySourceFiles)" DestinationFolder="$(PilotStationDirectory)" /> <Message Text="###I AM HERE###" /> </Target> I have set the "MSBuild project build output/log