I have a Solution with a bunch of Web Projects and i want my build server to automatically create packages for each project. I am able to to get (nearly) everything working. The
I had the same problem, found this question, and came up with a slightly less hacky solution:
Just add /P:Framework40Dir=c:\windows\microsoft.net\framework\v4.0.30319
as an additional MSBuild parameter.
No need to edit .targets files or set anything else. Worked for me, so I just do:
msbuild MyWebProject.csproj /T:Package /P:PublishProfile=MyProfile /P:Framework40Dir=(as above)
I use it to build a Web Deploy package into a subfolder of my choosing - without the profile, it goes to obj/debug/package
. Who uses obj
? Blergh :)