Create .csproj with MSBuild without a project reference

When writing an MSBuild file from scratch, is it possible to directly create .csproj files without reference to the solution in which they are included? Introductory manuals like this one often explain how to compile individual .cs files or build .csproj directly from the command line.

For example, on the MSBuild command line without a .sln link:

msbuild helloworld.csproj /t:Build /verbosity:detailed

Or a.csproj is given .sln:

<MSBuild
  Projects="mysolution.sln"
  Targets="My_Project_File"
  Properties="Configuration=$(Configuration);Platform=$(Platform)"
  ContinueOnError="false" />

I did not find links to create .csproj in the MSBuild file without .sln. Is there a way and I just missed something?

+4
source share
1 answer

There is nothing wrong with creating csproj files without a solution:

<MSBuild Projects="my_project.csproj" Targets="Build" />

, Visual Studio, , , msbuild script, , , .

+3

Source: https://habr.com/ru/post/1539232/


All Articles