Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6005883
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T01:27:38+00:00 2026-05-23T01:27:38+00:00

I have a solution with 5 web projects and want them packaged so i

  • 0

I have a solution with 5 web projects and want them packaged so i run msbuild mysolution.sln /t:Package after building it and get this:

C:\mysolution.sln.metaproj : error
MSB4057: The target “Package” does not
exist in the project.

If i package each of the projects one by one all is fine. That’s stupid and unnatural, i don’t want to have 5 additional steps in my CI process. What’s so special about Package target that MSBuild cannot execute it like regular Build or Clean? And what is *.sln.metaproj?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T01:27:39+00:00Added an answer on May 23, 2026 at 1:27 am

    The .sln.metaproj file is auto-generated by MSBuild while it attempts to build the solution file. This file is created because solution files are not MSBuild projects. In this generated file are autocreated the standard tarets Build, Clean etc, but not Package. Your best bet may be to switch from using the solution file to using an MSBuild file that references the projects. It could look something like this:

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

    You could also add a stub “makefile project” named something like “Package All” to your solution that calls MSBuild directly on an msbuild project like the one above above. Building this makefile project would perform the package step.

    FYI, to see the generated metaproj, set an environment variable named MSBuildEmitSolution to the value ‘1’ and run a build, the temporary file will be preserved.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have 3 projects in my VS solution. One of them is a Web
I have several web application projects in one solution. When I start debugging one
I have a solution with 3 projects.One of UI (contains web pages) and one
I have a solution that contains two projects. One project is an ASP.NET Web
I have a VS solution that contains 6 library projects and 1 web folder
I have two projects in my solution   1- asp.net web project.   2-
I have a visual studio 2008 solution with multiple c# library projects, a Web
I have a solution with two web applications/projects. Both start up on F5 but
In my solution I have several library projects. I want that each library project
I have a solution called StoreExample It has one web project - StoreExample.Web It

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.