1 <Project Sdk="Microsoft.NET.Sdk" DefaultTargets="BuildDepsJson">
\r
3 ***********************************************************************************************
\r
6 WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
\r
7 created a backup copy. Incorrect changes to this file will make it
\r
8 impossible to load or build your projects from the command-line or the IDE.
\r
10 Copyright (c) .NET Foundation. All rights reserved.
\r
11 ***********************************************************************************************
\r
15 This project is built by the .NET CLI in order to create .deps.json files for .NET CLI tools.
\r
16 Properties to be passed in by the .NET CLI:
\r
17 - ProjectAssetsFile: Full path to the project.assets.json file for the tool under the NuGet .tools folder
\r
18 - ToolName: The simple name of the tool DLL, for example, "dotnet-mytool"
\r
19 - AdditionalImport: The full path to the .props file from the platform package which will be imported, which
\r
20 should include the PackageConflictPlatformManifests file.
\r
21 This is a workaround until NuGet can generate .props and .targets files for imports from packages referenced
\r
22 by tools, which is tracked by https://github.com/NuGet/Home/issues/5037.
\r
25 <Import Project="$(AdditionalImport)"
\r
26 Condition=" '$(AdditionalImport)' != '' And Exists($(AdditionalImport))" />
\r
29 <ToolFolder>$([System.IO.Path]::GetDirectoryName($(ProjectAssetsFile)))</ToolFolder>
\r
30 <ProjectDepsFilePath Condition="'$(ProjectDepsFilePath)' == ''">$(ToolFolder)\$(ToolName).deps.json</ProjectDepsFilePath>
\r
32 <OutputType>Exe</OutputType>
\r
33 <IncludeMainProjectInDepsFile>false</IncludeMainProjectInDepsFile>
\r
36 <Target Name="BuildDepsJson" DependsOnTargets="$(ResolvePackageDependenciesForBuildDependsOn);GenerateBuildDependencyFile" />
\r
38 <Target Name="DontRestore" BeforeTargets="Restore">
\r
39 <Error Text="This project should not be restored" />
\r