Using Pre-Build Event

Topics: For MSBee Users
Aug 16, 2006 at 10:58 PM
migrated from power toy forums
originally posted by sontek

I'm trying to use the following as a pre-build event
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\MSBuild.exe "$(ProjectPath)" /p:TargetFX11=true /p:CustomAfterMicrosoftCommonTargets="%ProgramFiles%\MSBuild\MSBee\MSBuildExtras.Fx11.CSharp.targets"

but it locks up my whole computer and I can't cancel the build, It seems to launch into an infinite loop.. Is there a way to do this? I want to produce both 2.0 and 1.1 assemblies on build
Aug 16, 2006 at 10:58 PM
originally posted by Bertan Aygun - MSFT

You should condition your prebuild event so it only runs when TargetFX1_1 parameter is not true. Otherwise when MSBuild is launched as prebuild event it will again try to launch another instance of MSBuild as a prebuild event entering in to an infinite loop.