Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is full documentation about the csproj format for .net core?

Is there a full documentation about the csproj format for .net core projects?

I was looking for a way to copy files before building. After some searching I found a solution, but I can't find the documentation for this. Does it overwrite files? Are there extra options, ...

  <Target Name="CopyMyFiles" BeforeTargets="Build">     <Copy SourceFiles="../../someFile.js" DestinationFolder="dest/" />   </Target> 

I found the additions for .net core here, but there is nothing about copy.
Does that mean copy is somehting from msbuild?
The target element is documented here But I don't find anything about copy. Is there a list of possible tasks somewhere?

like image 539
roeland Avatar asked Jul 14 '17 06:07

roeland


People also ask

What is Csproj file in asp net core?

csproj file tells dotnet how to build the ASP.NET application. It's one of the most important files in an ASP.NET project. An ASP.NET project can depend on third-party libraries developed by other developers. Usually, these libraries are installed as Nuget packages using Nuget package manager.

How do I view Csproj file?

How to open a CSPROJ file. CSPROJ files are are meant to be opened and edited in Microsoft Visual Studio (Windows, Mac) as part of Visual Studio projects. However, because CSPROJ files are XML files, you can open and edit them in any text or source code editor.

Where are the Nuget dependencies defined in .NET core application project or solution?

csproj file with dependencies (NuGet package references) listed in the PackageReference section of this file. For some types of projects, dependencies are still kept in that separate packages. config file.

What is a Csproj file extension?

What is a CSProj file? Files with CSPROJ extension represent a C# project file that contains the list of files included in a project along with the references to system assemblies.


1 Answers

The documentation for the tasks included in MSBuild is here, with a page specifically on the copy task. Sadly, there are many features of the .NET SDK that aren't documented and probably only useful in special scenarios. I find myself looking at the source code of MSBuild, the .NET MSBuild SDK and the Web Sdk quite often to see how it is built and what can be done using it - e.g. while researching this answer.

like image 135
Martin Ullrich Avatar answered Oct 12 '22 08:10

Martin Ullrich