I want to package my VS2010 web application project ready for deployment with msdeploy. On development machine I can do this using:
MSBuild.exe "C:\path\to\WebApp.csproj" /target:package
But on my build server I get this error:
error MSB4057: The target "package" does not exist in the project.
What am I missing on the build server?
If there are no initial targets, default targets, or command-line targets, then MSBuild runs the first target it encounters in the project file or any imported project files.
PackagePath : Path where the file should be output in the package.
A target element can have both Inputs and Outputs attributes, indicating what items the target expects as input, and what items it produces as output. If all output items are up-to-date, MSBuild skips the target, which significantly improves the build speed. This is called an incremental build of the target.
At the command line, type MSBuild.exe <SolutionName>. sln , where <SolutionName> corresponds to the file name of the solution that contains the target that you want to execute. Specify the target after the -target: switch in the format <ProjectName>:<TargetName>.
I just got this working without installing VS2010 by following these steps on the build server:
This seems to work for me
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With