title: Pushing a DotnetCliTool console project to nuget lists it's project dependencies as package dependencies
body: <p>I have solution with following projects.</p>
  
  <blockquote>
    <p>MyAppNameSpace.Cli [This is the CLI app which is pushed as DotnetCliTool tonuget] </p>
    
    <p>MyAppNameSpace.Core [This project is referenced by the CLI tool] </p>
    
    <p>MyAppNameSpace.Common [Common Project shared in the solution] </p>
    
    <p>MyAppNameSpace.Vsix [Visual studio extension]</p>
  </blockquote>
  
  <p>What I am trying to achieve is to push the CLI project as a DotnetCliTool to nuget. I have followed whats mention <a href="https://docs.microsoft.com/en-us/dotnet/core/tools/extensibility#how-to-extend-cli-tools" rel="nofollow noreferrer">here</a>. I could not find any sample of dotnet cli tool projects with references to another project in a solution.</p>
  
  <p>The problem is when I do a <code>nuget push</code> after doing <code>dotnet pack</code>. The package is succesfully pushed to nuget but its project dependencies are listed as package dependencies. So when I reference this tool as a DotnetClitToolReference in any project it starts looking for those dependent projects on Nuget which obviously do not exist.</p>
  
  <p>This is my csproj for the CLI project</p>
  
  <pre><code>&lt;Project Sdk="Microsoft.NET.Sdk"&gt;
    &lt;PropertyGroup&gt;
      &lt;OutputType&gt;Exe&lt;/OutputType&gt;
      &lt;TargetFramework&gt;netcoreapp2.0&lt;/TargetFramework&gt;
      &lt;AssemblyName&gt;dotnet-nmg&lt;/AssemblyName&gt;
      &lt;Authors&gt;Nabin Karki Thapa&lt;/Authors&gt;
      &lt;Version&gt;1.0.2&lt;/Version&gt;
      &lt;Description&gt;
        The CLI tool for NModelsGenerator, a visual studio extension to create POCO classes from Database Tables and Views.
      &lt;/Description&gt;
      &lt;DebugType&gt;portable&lt;/DebugType&gt;
      &lt;Copyright&gt;Nabin Karki Thapa&lt;/Copyright&gt;
      &lt;PackageTags&gt;dotnet cli tool&lt;/PackageTags&gt;
      &lt;PackageType&gt;DotnetCliTool&lt;/PackageType&gt;
      &lt;GeneratePackageOnBuild&gt;True&lt;/GeneratePackageOnBuild&gt;
      &lt;PackageProjectUrl&gt;https://github.com/nabinked/NModelsGenerator&lt;/PackageProjectUrl&gt;
      &lt;PackageLicenseUrl&gt;https://github.com/nabinked/NModelsGenerator/blob/master/LICENSE&lt;/PackageLicenseUrl&gt;
      &lt;RepositoryUrl&gt;https://github.com/nabinked/NModelsGenerator&lt;/RepositoryUrl&gt;
      &lt;RepositoryType&gt;git&lt;/RepositoryType&gt;
      &lt;PackageReleaseNotes&gt;More information is available at https://github.com/nabinked/NModelsGenerator &lt;/PackageReleaseNotes&gt;
    &lt;/PropertyGroup&gt;
  
    &lt;ItemGroup&gt;
      &lt;PackageReference Include="Microsoft.Extensions.CommandLineUtils" Version="1.1.1" /&gt;
    &lt;/ItemGroup&gt;
  
    &lt;ItemGroup&gt;
      &lt;ProjectReference Include="..\NModelsGenerator.Common\NModelsGenerator.Common.csproj" /&gt;
      &lt;ProjectReference Include="..\NModelsGenerator.Core\NModelsGenerator.Core.csproj" /&gt;
    &lt;/ItemGroup&gt;
  
    &lt;Target Name="PostcompileScript" AfterTargets="Pack" Condition=" '$(IsCrossTargetingBuild)' != 'true' "&gt;
      &lt;Exec Command="call nugetpush $(Configuration) $(MSBuildProjectDirectory)/bin/$(Configuration)/$(AssemblyName).$(Version).nupkg" /&gt;
    &lt;/Target&gt;
  &lt;/Project&gt;
  </code></pre>
  
  <p>What am I doing wrong ? There is very little documentation available online on this topic. Any help is highly appreciated. </p>