Web Project Packages with MSBuild

I have a solution with 5 web projects and want them to be packaged, so I run msbuild mysolution.sln /t:Packageafter creating it and get the following:

C: \ mysolution.sln.metaproj: error MSB4057: target "package" does not exist in the project.

If I pack each of the projects one by one, everything is in order. This is stupid and unnatural, I do not want to have 5 extra steps in my CI process. What is so special about Packagethat MSBuild cannot execute it as normal Buildor Clean? And what is * .sln.metaproj?

+3
source share
2 answers

.sln.metaproj MSBuild, . , MSBuild. tarets Build, Clean .., Package. MSBuild, . :

<Project ...>
   <ItemGroup>
      <Project Include="Project1.csproj" />
      <Project Include="Project2.csproj" />
      <Project Include="Project3.csproj" />
      <Project Include="Project4.csproj" />
      <Project Include="Project5.csproj" />
   </ItemGroup>
   <Target Name="Package">
      <MSBuild
         Projects="@(Project)"
         Targets="Package"
         Properties="Configuration=$(Configuration);Platform=$(Platform);..."
         />
   </Target>
   ...etc. for Build, Clean etc.
</Project>

"makefile project", "Package All", , MSBuild msbuild, . makefile .

FYI, , MSBuildEmitSolution "1" , .

+5

TeamCity build /p:IsPackaging=true

0

All Articles