set "var=%cd%"
devenv "%var%"\example.sln /rebuild
here if we have solution example.sln at a path like and
c:\test\path withSpace\example.sln
and we assume that we run the batch file for the path
c:\test\path withSpace
I am getting the error:
The following files were specified on the command line:
c:\test\path withSpace
\example.sln
To solve this I changed:
devenv "%var%"\example.sln /rebuild
to
devenv "%var%\example.sln" /rebuild
Note the location of closing double quote