I am trying to use Powershell to achive post build in Visual studio. I want to copy the appropriate dlls to the appropriate directories after the build based on the platform to which the assembly is targetted (i.e. x86 or x64). Does anyone know how to achieve this?
A:
Richard
2009-02-23 11:34:30
+2
A:
You can use something like the following in the post-build event:
Powershell -File "$(SolutionDir)PostBuild.ps1" $(PlatformName)
The platform name can then be found in $args[0] inside the script (PostBuild.ps1).
Han
2009-02-23 11:43:59
is this the only way you can use msbuild's properties (by setting parameters for the script)? aren't all msbuild properties available via the $env variable (or similar) somehow? (it seems not, but isn't there any other/easier way instead of giving each msbuild property in to the script via parameter?)
toebens
2010-03-26 10:30:10
+1
A:
Why not use Visual Studio's own custom build step? Seems odd to reinvent the wheel.
Alex
2009-02-24 20:51:12