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 3.4.3 release - getting Value cannot be null on package build #2648

Closed
chrisrestall opened this Issue Apr 23, 2016 · 13 comments

Comments

Projects
None yet
8 participants
@chrisrestall

chrisrestall commented Apr 23, 2016

As of todays release our packagebuilder stopped functioning. Looks like it auto updated nuget.exe to 3.4.3 and now we get errors with building a package from a nuspec file. Below is the log:

2016-04-22 16:20:34 [INFO] : NuGet Packager 2.0.3
2016-04-22 16:20:35 [INFO] : Updating NuGet...
2016-04-22 16:20:37 [INFO] : Checking for updates from https://www.nuget.org/api/v2/.
2016-04-22 16:20:37 [INFO] : Currently running NuGet.exe 3.4.3-rtm-0855.
2016-04-22 16:20:37 [INFO] : Updating NuGet.exe to 3.4.3.
2016-04-22 16:20:37 [INFO] : Update successful.
2016-04-22 16:20:37 [INFO] : Creating package...
2016-04-22 16:20:38 [INFO] : Attempting to build package from 'Package.nuspec'.
2016-04-22 16:20:38 [ERROR] : System.ArgumentNullException: Value cannot be null.
2016-04-22 16:20:38 [ERROR] : Parameter name: folderName
2016-04-22 16:20:38 [ERROR] : at NuGet.Frameworks.NuGetFramework.Parse(String folderName, IFrameworkNameProvider mappings)
2016-04-22 16:20:38 [ERROR] : at NuGet.Packaging.ManifestReader.<>c.b__7_2(NuGet.Packaging.<>f__AnonymousType52 <>h__TransparentIdentifier0) 2016-04-22 16:20:38 [ERROR] : at System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext()
2016-04-22 16:20:38 [ERROR] : at System.Collections.Generic.List1..ctor(IEnumerable1 collection)
2016-04-22 16:20:38 [ERROR] : at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) 2016-04-22 16:20:38 [ERROR] : at NuGet.Packaging.ManifestReader.ReadFrameworkAssemblies(XElement frameworkElement) 2016-04-22 16:20:38 [ERROR] : at NuGet.Packaging.ManifestReader.ReadMetadataValue(ManifestMetadata manifestMetadata, XElement element, HashSet1 allElements)
2016-04-22 16:20:38 [ERROR] : at NuGet.Packaging.ManifestReader.ReadMetadata(XElement xElement)
2016-04-22 16:20:38 [ERROR] : at NuGet.Packaging.ManifestReader.ReadManifest(XDocument document)
2016-04-22 16:20:38 [ERROR] : at NuGet.Packaging.Manifest.ReadFrom(Stream stream, Func2 propertyProvider, Boolean validateSchema) 2016-04-22 16:20:38 [ERROR] : at NuGet.Packaging.PackageBuilder.ReadManifest(Stream stream, String basePath, Func2 propertyProvider)
2016-04-22 16:20:38 [ERROR] : at NuGet.Packaging.PackageBuilder..ctor(String path, String basePath, Func`2 propertyProvider, Boolean includeEmptyDirectories)
2016-04-22 16:20:38 [ERROR] : at NuGet.CommandLine.PackCommand.CreatePackageBuilderFromNuspec(String path)
2016-04-22 16:20:38 [ERROR] : at NuGet.CommandLine.PackCommand.BuildFromNuspec(String path)
2016-04-22 16:20:38 [ERROR] : at NuGet.CommandLine.PackCommand.BuildPackage(String path)
2016-04-22 16:20:38 [ERROR] : at NuGet.CommandLine.PackCommand.ExecuteCommand()
2016-04-22 16:20:38 [ERROR] : at NuGet.CommandLine.Command.ExecuteCommandAsync()
2016-04-22 16:20:38 [ERROR] : at NuGet.CommandLine.Command.Execute()
2016-04-22 16:20:38 [ERROR] : at NuGet.CommandLine.Program.MainCore(String workingDirectory, String[] args)
2016-04-22 16:20:38 [INFO] : Exit Code: 1

@rrelyea rrelyea added this to the 3.4.4 milestone Apr 23, 2016

@rrelyea rrelyea added the Type:Bug label Apr 23, 2016

@yishaigalatzer

This comment has been minimized.

Show comment
Hide comment
@yishaigalatzer

yishaigalatzer Apr 23, 2016

Can you please share the package/nuspec or a simple repro so we can verify the scenario?

yishaigalatzer commented Apr 23, 2016

Can you please share the package/nuspec or a simple repro so we can verify the scenario?

@chrisrestall

This comment has been minimized.

Show comment
Hide comment
@chrisrestall

chrisrestall Apr 23, 2016

yes, we are using the nugetpackage.ps1 which checks for updates of nuget and handles the packaging. The line:

$packageTask = Create-Process .\NuGet.exe ("pack Package.nuspec -Verbosity Detailed")

is what kicks things off for packaging.

Our attached Package.nuspec is pretty standard.
package.nuspec.txt

I thought it might be the pathing in the but I've tried putting in the full path and other variations as well to no avail. If I revert to the nuget3.4.3-rtm, and comment out the update check in the script, it works.
Thanks

chrisrestall commented Apr 23, 2016

yes, we are using the nugetpackage.ps1 which checks for updates of nuget and handles the packaging. The line:

$packageTask = Create-Process .\NuGet.exe ("pack Package.nuspec -Verbosity Detailed")

is what kicks things off for packaging.

Our attached Package.nuspec is pretty standard.
package.nuspec.txt

I thought it might be the pathing in the but I've tried putting in the full path and other variations as well to no avail. If I revert to the nuget3.4.3-rtm, and comment out the update check in the script, it works.
Thanks

@chrisrestall

This comment has been minimized.

Show comment
Hide comment
@chrisrestall

chrisrestall Apr 23, 2016

I pulled down the latest nuget code but was unable to load it or compile. I'm looking through nuget3.4.3 release which did load, but wouldn't compile and walked the stack from the log. From what I can tell, the issue is in NugetPackaging.ManifestReader.ReadFrameworkAssemblies.

In the linq query, it calls into an extension method, "GetOptionalAttributeValue("targetFramework") and passes that to NuGetFramework.Parse(folderName,mappings)..

Since I am not specifying the optional attribute, "targetFramework", in my nuspec for each frameworkAssembly in frameworkAssemblies, the extension method returns null for the path. The first thing parse() does is throw an ArgumentNullException when no foldername is passed in.

chrisrestall commented Apr 23, 2016

I pulled down the latest nuget code but was unable to load it or compile. I'm looking through nuget3.4.3 release which did load, but wouldn't compile and walked the stack from the log. From what I can tell, the issue is in NugetPackaging.ManifestReader.ReadFrameworkAssemblies.

In the linq query, it calls into an extension method, "GetOptionalAttributeValue("targetFramework") and passes that to NuGetFramework.Parse(folderName,mappings)..

Since I am not specifying the optional attribute, "targetFramework", in my nuspec for each frameworkAssembly in frameworkAssemblies, the extension method returns null for the path. The first thing parse() does is throw an ArgumentNullException when no foldername is passed in.

@yishaigalatzer

This comment has been minimized.

Show comment
Hide comment
@yishaigalatzer

yishaigalatzer Apr 23, 2016

Thanks, first take the 3.4.3 branch. Second compile from command line.

Will get a fix out on Monday

yishaigalatzer commented Apr 23, 2016

Thanks, first take the 3.4.3 branch. Second compile from command line.

Will get a fix out on Monday

@rrelyea

This comment has been minimized.

Show comment
Hide comment
@rrelyea
Contributor

rrelyea commented Apr 28, 2016

@rrelyea

This comment has been minimized.

Show comment
Hide comment
@rrelyea

rrelyea Apr 28, 2016

Contributor

@chrisrestall - can you please help verify that this has fixed this issue?

  1. download not yet final version 3.4.4. of nuget.commandline.nupkg from https://www.myget.org/F/nugetbuild/api/v2/package/NuGet.CommandLine/3.4.4-rtm-870
  2. rename the .nupkg to .zip
  3. Grab nuget.exe from inside the zip file in the tools directory.
  4. Try this version of nuget.exe to verify that it has fixed your issue.
  5. Tell us how it went
Contributor

rrelyea commented Apr 28, 2016

@chrisrestall - can you please help verify that this has fixed this issue?

  1. download not yet final version 3.4.4. of nuget.commandline.nupkg from https://www.myget.org/F/nugetbuild/api/v2/package/NuGet.CommandLine/3.4.4-rtm-870
  2. rename the .nupkg to .zip
  3. Grab nuget.exe from inside the zip file in the tools directory.
  4. Try this version of nuget.exe to verify that it has fixed your issue.
  5. Tell us how it went
@chrisrestall

This comment has been minimized.

Show comment
Hide comment
@chrisrestall

chrisrestall Apr 29, 2016

I commented out the auto updater line in the ps script and used the rtm-exe. No issues. Thanks for jumpi9ng on this so quickly!
Date: Thu, 28 Apr 2016 16:34:48 -0700
From: notifications@github.com
To: Home@noreply.github.com
CC: mitre7@hotmail.com; mention@noreply.github.com
Subject: Re: [NuGet/Home] nuget 3.4.3 release - getting Value cannot be null on package build (#2648)

@chrisrestall - can you please help verify that this has fixed this issue?

download not yet final version 3.4.4. of nuget.commandline.nupkg from https://www.myget.org/F/nugetbuild/api/v2/package/NuGet.CommandLine/3.4.4-rtm-870

rename the .nupkg to .zip
Grab nuget.exe from inside the zip file in the tools directory.
Try this version of nuget.exe to verify that it has fixed your issue.
Tell us how it went


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub

chrisrestall commented Apr 29, 2016

I commented out the auto updater line in the ps script and used the rtm-exe. No issues. Thanks for jumpi9ng on this so quickly!
Date: Thu, 28 Apr 2016 16:34:48 -0700
From: notifications@github.com
To: Home@noreply.github.com
CC: mitre7@hotmail.com; mention@noreply.github.com
Subject: Re: [NuGet/Home] nuget 3.4.3 release - getting Value cannot be null on package build (#2648)

@chrisrestall - can you please help verify that this has fixed this issue?

download not yet final version 3.4.4. of nuget.commandline.nupkg from https://www.myget.org/F/nugetbuild/api/v2/package/NuGet.CommandLine/3.4.4-rtm-870

rename the .nupkg to .zip
Grab nuget.exe from inside the zip file in the tools directory.
Try this version of nuget.exe to verify that it has fixed your issue.
Tell us how it went


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub

@yishaigalatzer yishaigalatzer assigned alpaix and unassigned toddm Apr 29, 2016

@yishaigalatzer

This comment has been minimized.

Show comment
Hide comment
@yishaigalatzer

yishaigalatzer Apr 29, 2016

@toddm Please include commit hashes on the issue, reopening for validation

yishaigalatzer commented Apr 29, 2016

@toddm Please include commit hashes on the issue, reopening for validation

@toddm

This comment has been minimized.

Show comment
Hide comment
@alpaix

This comment has been minimized.

Show comment
Hide comment
@alpaix

alpaix Apr 29, 2016

Verified using customer's .nuspec with 3.4.4.870 build. Closing...

alpaix commented Apr 29, 2016

Verified using customer's .nuspec with 3.4.4.870 build. Closing...

@alexmg

This comment has been minimized.

Show comment
Hide comment
@alexmg

alexmg May 5, 2016

We have a failing AppVeyor PR build over on autofac/Autofac.Wcf#5 caused by this same issue. Do you have an ETA for the 3.4.4 release? Looks like it's close to RTM based on the version number on your MyGet feed. 😃

alexmg commented May 5, 2016

We have a failing AppVeyor PR build over on autofac/Autofac.Wcf#5 caused by this same issue. Do you have an ETA for the 3.4.4 release? Looks like it's close to RTM based on the version number on your MyGet feed. 😃

@mauroservienti

This comment has been minimized.

Show comment
Hide comment
@mauroservienti

mauroservienti May 26, 2016

Is 3.4.4 released? Most of our AppVeyor builds are still failing with no apparent reason and it seems connected to this.

mauroservienti commented May 26, 2016

Is 3.4.4 released? Most of our AppVeyor builds are still failing with no apparent reason and it seems connected to this.

BeeWarloc added a commit to Pomona/Pomona that referenced this issue May 26, 2016

@toddm

This comment has been minimized.

Show comment
Hide comment
@toddm

toddm May 26, 2016

3.4.4-rc has been released. The final version not quite yet. You can find the rc here: https://dist.nuget.org/index.html

toddm commented May 26, 2016

3.4.4-rc has been released. The final version not quite yet. You can find the rc here: https://dist.nuget.org/index.html

@zhili1208 zhili1208 modified the milestones: 3.5 Beta2, 3.4.4 Jun 22, 2016

fpellet added a commit to fpellet/convertToNuGet that referenced this issue Oct 25, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment