I have a c# .Net 4.0 project created with VS2010 and now being accessed with VS2012.
I\'m trying to publish only the needed files from this website to a destination
Actually I merged all your answers to my own solution how to solve the above problem:
The result is like that:
msbuild /t:restore /t:build /p:WebPublishMethod=FileSystem /p:publishUrl=C:\builds\MyProject\ /p:DeleteExistingFiles=True /p:LastUsedPlatform="Any CPU" /p:Configuration=Release