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?
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.
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)
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 .
use the following environment variable:
set MSBuildEmitSolution=1
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.
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