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:
and the FolderProfile.pubxml:
as i mentioned, if i change this line:
for this:
the nupkg file is created under \dev\NuGet
Any idea?
60 Replies
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
no, i just right click the project > publish
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
yes
in publish all
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
as i mentioned, if i change this line:
for this:
the nupkg is generated in the folder
its a class of libraries or smth like that
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
not sure the translation
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
but if i set it to " <TargetFramework>net60</TargetFramework>" even with the "60" instead of "6.0", its working
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
i just do this, and it should generate the nuget package
if i target only 1 framework:
the nupkg is generated in the folder
if i reference multiple frameworks, it only gets generated in /bin/release
look. tebe has told you several times. the proper value to go into
TargetFramework
and TargetFrameworks
is net6.0
.
the best way to get a nuget package is to do dotnet pack
from the command line. if you do this, then the package should be generated in the expected location.
note, you cannot use the dotnet
build system to put it into a shared folder for consumption. you have to build it, and then use nuget install
to put it into the shared location. otherwise, it will not end up in the proper subfolder of the shared location.
also, why are you trying to support netcoreapp3.1
? it is long out of support.Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
TeBeCo
library:
then to set the feed from the consumer code you can choose EITHER
* via a something.props:
* via
nuget.config
Quoted by
<@689473681302224947> from #My NuGet packages are not created (click here)
React with ❌ to remove this embed.
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
yeah, i know he told me, i just said that net60 is working fine as long as i taget only 1 framework. Also as i can see and understand i should avoid using "Publish", instead i need to dotnet pack?
the idea on the suffix version is to have some release candidates until we close the version so its the 1.0.0, then start again with 1.1-rc.1 and so on
<PackageOutputPath>$(SolutionDir)artifacts</PackageOutputPath>
also what does this "artifacts" mean?
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
the own solution dir i assume xD but i want to create it in another dir
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
i already set to "6.0"
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
should this work?
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
ok, it created this:
is it ok? or it should have some other dlls? like this:
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
idk
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
oh ok
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
instead of:
<PackageOutputPath>$(SolutionDir)artifacts</PackageOutputPath>
can i do:
and automate the package name somehow?
so i can copy paste it to another projects?
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
dont need that, it worked with only 2 \\
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
it generated the nupkg with just
\\dev\NuGet
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
okay
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
gitlab, we are still waiting for a place to put them
but we need to start working with nuget asap
so its a temporal solution
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
thing here is: when i compile my project it will create the nupkg, i assume thats why you set it to debug and set the current time as suffix
but what happen if i want to compile in release and i dont change the version first?
it will just override it and that can cause troubles, right?
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
i just realised ovber "Publish" there's a "pack":
so i can just:
and manually pack it
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
i prefer to keep it false, so i can be sure that when i want to package it, i must change the version first in release to rc.x+1
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
okay, ty so much
last question. Is it the same for framework 4.7.2? can i do the same in the same way? i just notices the "Publish" or the "Pack" options dont appear in the conetxt menu
it's in spanish but no "Publicar" or "Paquete" option appear:
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
i tried but some things didnt worked when using int 472 project idk, they are not even new things, the code is just a copy paste
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
only thing that changed was a visualbasic reference that could be changed to "\t"
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
its release x64, not sure how to check if windows only
oh, no its not
only database access to check something
and some loggers
will try to reupgrade to 2.0 next day, today im done
so really thanks and sorry if im too silly, trying to learn from what i know and seems that i know wrong things!
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View