0
votes

I'm trying to build a deploy package from a Publish Profile using msbuild. I use the command from https://stackoverflow.com/a/15079260/492336:

msbuild.exe MyProject.csproj /p:DeployOnBuild=true;PublishProfile=MyProfile

But I am getting this error:

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.Web.Publishing.targets(3683,5): error MSB4044: The "CheckPathAttributes" task was not given a value for the required parameter "Path". [c:\Workspace\MyProject\MyProject.csproj]

How should I go about fixing it?

1

1 Answers

0
votes

The reason seems to be related to this line inside my *.pubxml file:

<DesktopBuildPackageLocation>$(SolutionDir)/WebSite1.zip</DesktopBuildPackageLocation>

It works from VisualStudio because $(SolutionDir) is defined there, but it obviously is not defined when I execute msbuild from the command line (maybe it would be defined if I used the solution instead of the csproj file).

Edit: Changing it to $(ProjectDir)/WebSite1.zip works as well.