Msbuild batch - if any build fails than skip the last one
You probably want to localize any environment changes.

You should initialize your variables to a known state at the beginning, otherwise you could get the wrong result.

You have a lot of redundant code that can be eliminated by using a CALLed subroutine

You can use the || operator to conditionally execute code if the previous command failed. I find it simpler than using IF ERRORLEVEL.

You can save a bit of typing by storing code in a variable to be used as a simple macro.

@echo off
setlocal
set "failed32="
set "failed64="
set "build=call :build"

%build% Win        32 my-proj1
%build% X          64 my-proj1
%build% ManagedWin 32 my-proj1
%build% ManagedX   64 my-proj1
%build% Win        32 my-proj2
%build% X          64 my-proj2
%build% Win        32 my-proj3
%build% Win        32 my-proj4
%build% Win        32 my-proj5

if not defined failed32 msbuild /target:setup32 my-last.proj

%build% X          64 my-proj3
%build% X          64 my-proj4
%build% X          64 my-proj5

if not defined failed64 msbuild /target:setup64 my-last.proj
exit /b


:build  target  size  proj
msbuild /target:%1%2 %3.proj || set failed%%2=1
exit /b