© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
133 replies
NeRooN

My NuGet packages are not created

Hello, I'm trying to create a NuGet package and create it directly in a shared folder.

The thing is that this library has multiple target frameworks, and when i create the NuGet it doesnt create the .nupkg file in the PublishDir folder. I've tried with only 1 target framework and it works, so it looks like targeting multiple frameworks is the problem here.

This is the config of the .csproj:

  <PropertyGroup>
    <TargetFrameworks>netcoreapp31;net60</TargetFrameworks>
    <LangVersion>7.1</LangVersion>
    <VersionPrefix>1.0.0</VersionPrefix>
    <!--<VersionSuffix>rc.1</VersionSuffix>-->
    <GeneratePackageOnBuild>True</GeneratePackageOnBuild>
  </PropertyGroup>
  <PropertyGroup>
    <TargetFrameworks>netcoreapp31;net60</TargetFrameworks>
    <LangVersion>7.1</LangVersion>
    <VersionPrefix>1.0.0</VersionPrefix>
    <!--<VersionSuffix>rc.1</VersionSuffix>-->
    <GeneratePackageOnBuild>True</GeneratePackageOnBuild>
  </PropertyGroup>


and the FolderProfile.pubxml:
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration>Release</Configuration>
    <Platform>Any CPU</Platform>
    <PublishDir>\\dev\NuGet</PublishDir>
    <PublishProtocol>FileSystem</PublishProtocol>
    <TargetFramework>net60</TargetFramework>
  </PropertyGroup>
</Project>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration>Release</Configuration>
    <Platform>Any CPU</Platform>
    <PublishDir>\\dev\NuGet</PublishDir>
    <PublishProtocol>FileSystem</PublishProtocol>
    <TargetFramework>net60</TargetFramework>
  </PropertyGroup>
</Project>


as i mentioned, if i change this line:
    <TargetFrameworks>netcoreapp31;net60</TargetFrameworks>
    <TargetFrameworks>netcoreapp31;net60</TargetFrameworks>

for this:
    <TargetFramework>net60</TargetFramework>
    <TargetFramework>net60</TargetFramework>


the nupkg file is created under \dev\NuGet

Any idea?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements
Next page

Similar Threads

Nuget packages
C#CC# / help
15mo ago
Visual studio - where are nuget packages published ?
C#CC# / help
3y ago
Help with NuGet Packages
C#CC# / help
2y ago
❔ Globally Update Nuget Packages
C#CC# / help
3y ago