I have a requirement where I need to package my console app developed with net472 into a nuget which can be easily run using cli command. I was able to find a resource dealing with this https://blog.maartenballiauw.be/post/2017/04/10/extending-dotnet-cli-with-custom-tools.html, however, this is working a expected for .NET Core but not for .NET Framework. Adding the mentioned changes to the property group in csproj file doesn't result in build failure but it is also not generating a nuget.
CSPROJ Changes:
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{A46B7A20-4DB8-478D-88D3-031FC5403E3B}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>NugetBotPoc</RootNamespace>
<AssemblyName>NugetBotPoc</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
<PackageId>Taskless.NugetBotPoc</PackageId>
<PackageVersion>1.0.0</PackageVersion>
<AssemblyName>dotnet-NugetBotPoc</AssemblyName>
<PackageType>DotnetCliTool</PackageType>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PackageId>Taskless.NugetBotPoc</PackageId>
<PackageVersion>1.0.0</PackageVersion>
<AssemblyName>dotnet-NugetBotPoc</AssemblyName>
<PackageType>DotnetCliTool</PackageType>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PackageId>Taskless.NugetBotPoc</PackageId>
<PackageVersion>1.0.0</PackageVersion>
<AssemblyName>dotnet-NugetBotPoc</AssemblyName>
<PackageType>DotnetCliTool</PackageType>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
</PropertyGroup>
It would be really great if I could get some help on this and even if this is possible with .NET Framework.