TFS Build Server cannot get publish profile to work: “Can't find the valid AspnetCompilerPath”

前端 未结 1 954
[愿得一人]
[愿得一人] 2021-02-15 21:09

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

1条回答
  •  [愿得一人]
    2021-02-15 21:58

    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 :)

    0 讨论(0)
提交回复
热议问题