-
Notifications
You must be signed in to change notification settings - Fork 258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nuget.exe fails to pack NETCore project #4491
Comments
Let's discuss options here. |
We already know this doesn't work. This is planned for 4.0.1 |
Yes dotnet pack or msbuild /t:pack |
let's take a nuget.exe fix for rtm. Get it reviewed, tested and then merge - no shiproom needed. perhaps something like:
|
My main concern here is preventing the crash and improving the user experience. If it works or not is a different issue. |
We should really look at the user experience here before shipping 4.0.0 RTM. |
I have a F# "legacy" fsproj file referencing a project that targets net461 using the new csproj format. I am also getting this error. Using dotnet pack or msbuild /t:pack does not work, as it will work only on the new project. Does this mean I have to run dotnet pack on one project and nuget pack on the other one? ( requires me manually enumerating the project files of each type in my build script). |
@petertiedemann currently, yes. That is what you would need to do. I worked around this by adding a Pack target to my legacy projects that ran an Exec with nuget.exe pack to pack the project, then it was possible to run Pack on all projects without manually splitting them up. |
The workaround of manually packing different project types does not work if you have a legacy project referencing a non-legacy project. |
We are now on version 4.1.0, how does this relate to the milestone of 4.0.2 this issue is still assigned to? |
I noticed this was removed from the milestone and added to the backlog. Does this mean that packing SDK projects with the NuGet CLI is deprecated and we shouldn't expect it to work anytime soon? |
Related to #5979 We have added a reference to NuGet.Build.Tasks.Pack in a .NET 4.6.1 project. If we configure the TargetFramework property in csproj an error occurs:
But if we set the TargetFramework property through the command line works fine: Thanks in advance |
Scenario: Creating a nuget package from a csproj, targeting 4.6.2 with package references.
C:\Users<XXX>.nuget\packages\nuget.build.tasks.pack\5.0.2\build\NuGet.Build.Tasks.Pack.targets(216,15): error MSB4064: |
related to #4254 |
Use dotnet task with pack option. That worked for me with multiple platform project. |
Guys, I just got bitten by this and spent a DAY figuring it out. Why bother adding support for the new-format csproj if you aren't bloody well going to add support for the things inside that file, like It's been two and a half years, for crying out loud and this isn't fixed, so it's pretty obvious it isn't going to be fixed. Meanwhile the current behaviour of generating an apparently-working NuGet package that has no dependencies listed is not only not helpful, it's actively harmful. Pull your thumbs out and do what #7778 suggests. Right now you are just wasting developers' time. |
We are now actively investigating implementing #7778. We currently don't plan to add the ability to pack SDK style projects to nuget.exe. |
This is really very depressing, since we have already a lot of automation scripts built upon "nuget pack". After converting a project from "packages.confg" to "PackageReference", we now have to add referenced package one by one manually; that is really pain, especially the missing of dependency will only be known when we run a project. I really donot think this patching needs two years, as the dependencies are listed under the project references in our very eyes. |
doesnt this #4491 (comment) imply this issue should be closed as wont fix? |
Using nuget.exe 4.0.0 build 2266
Steps
nuget.exe pack <path to csproj>
Expected
Package will be created
Actual
The text was updated successfully, but these errors were encountered: