Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I view the metaproj files generated by Visual Studio when building an ASP.NET website?

I have a fairly large solution with a mix of assemblies and ASP.NET websites (the ones without a csproj file). I'm trying to customize the build from the command line, and so I need to understand what exactly MSBuild is doing.

When MSBuild builds .sln file, I see that it creates metaproj files (which I assume are MSBuild files). However, they never seem to appear on the file system. I assume that MSBuild keeps them hidden in some way. Is there a way that I can view these files?

like image 947
Erick T Avatar asked Apr 13 '16 19:04

Erick T


People also ask

How do I open ASPX project in Visual Studio?

Start Visual Studio, on the File menu select New, and then select Project. In the New Project dialog box, select Visual Basic or Visual C# as the programming language. In the Templates pane, select ASP.NET Empty Web Application, and name the project SofiaCarRentalWebApp. Click OK to create the solution and the project.

What is a Metaproj file?

It provides a lot of default properties and items. Also, it imports some predefined solution level targets (see https://docs.microsoft.com/en-us/visualstudio/msbuild/customize-your-build? view=vs-2019#customize-the-solution-build)

What is SLN file Visual Studio?

sln file. The . sln file contains text-based information the environment uses to find and load the name-value parameters for the persisted data and the project VSPackages it references. When a user opens a solution, the environment cycles through the preSolution , Project , and postSolution information in the .


2 Answers

use the following environment variable:

set MSBuildEmitSolution=1
like image 125
Shahyad Sharghi Avatar answered Sep 18 '22 20:09

Shahyad Sharghi


Some "under the hood" basics for Web Site projects that gets lost the way MS organizes their docs...

When MSBuild is executed on a .sln file it generates a .metaproj file based off of the "Project" section in the .sln file. It then executes aspnet_compiler.exe against the metaproj file.

like image 36
user1431356 Avatar answered Sep 20 '22 20:09

user1431356