Skip to content
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 again throwing exceptions "authors is required" "description is required", ignoring csproj/nuspec replacement tokens #9954

Closed
Tracked by #6285
bladewolf55 opened this issue Aug 28, 2020 · 38 comments · Fixed by NuGet/NuGet.Client#4461

Comments

@bladewolf55
Copy link

bladewolf55 commented Aug 28, 2020

Maintainer edit

If you are still seeing this issue with the latest NuGet.exe version, please unblock the executable.

See: #9954 (comment)

Original report

For previous history on this problem, see issue #4234.

Using the exact same project and build:

NuGet Version 5.6.0.6591 does not display the Authors/Description error. However, version 5.7.0.6726 does.

I'm surprised this important issue doesn't seem to be regression tested. It's fixed, it comes back, it's fixed. . . .

5.6 output

nuget pack -verbosity detailed
NuGet Version: 5.6.0.6591
Attempting to build package from 'ClassLibrary1.csproj'.
MSBuild auto-detection: using msbuild version '16.7.0.37604' from 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin'. Use option -MSBuildVersion to force nuget to use a specific version of MSBuild.
Packing files from 'C:\Users\charl\Google Drive\Development\NuGet Testing\NuGet Dependency Resolution\Framework Major-Numbered\ClassLibrary1\ClassLibrary1\bin\Debug'.
Using 'ClassLibrary1.nuspec' for metadata.
Add file 'C:\Users\charl\Google Drive\Development\NuGet Testing\NuGet Dependency Resolution\Framework Major-Numbered\ClassLibrary1\ClassLibrary1\bin\Debug\ClassLibrary1.dll' to package as 'lib\net472\ClassLibrary1.dll'

Id: ClassLibrary1
Version: 1.0.0
Authors: C
Description: D
Dependencies:

Added file '[Content_Types].xml'.
Added file '_rels/.rels'.
Added file 'ClassLibrary1.nuspec'.
Added file 'lib/net472/ClassLibrary1.dll'.
Added file 'package/services/metadata/core-properties/0a9c65c5d99145c6af36a7c3d0d48724.psmdcp'.

Successfully created package 'C:\Users\charl\Google Drive\Development\NuGet Testing\NuGet Dependency Resolution\Framework Major-Numbered\ClassLibrary1\ClassLibrary1\ClassLibrary1.1.0.0.nupkg'.

5.7 output

nuget pack -verbosity detailed
NuGet Version: 5.7.0.6726
Attempting to build package from 'ClassLibrary1.csproj'.
MSBuild auto-detection: using msbuild version '16.7.0.37604' from 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin'. Use option -MSBuildVersion to force nuget to use a specific version of MSBuild.
Packing files from 'C:\Users\charl\Google Drive\Development\NuGet Testing\NuGet Dependency Resolution\Framework Major-Numbered\ClassLibrary1\ClassLibrary1\bin\Debug'.
Could not load file or assembly 'file:///C:\Program Files (x86)\NuGet CLI\nuget.exe' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
Using 'ClassLibrary1.nuspec' for metadata.
Authors is required.
Description is required.
System.Exception: Authors is required.
Description is required.
   at NuGet.Packaging.Manifest.Validate(Manifest manifest)
   at NuGet.Packaging.Manifest.ReadFrom(Stream stream, Func`2 propertyProvider, Boolean validateSchema)
   at NuGet.CommandLine.ProjectFactory.ProcessNuspec(PackageBuilder builder, String basePath)
   at NuGet.CommandLine.ProjectFactory.CreateBuilder(String basePath, NuGetVersion version, String suffix, Boolean buildIfNeeded, PackageBuilder builder)
   at NuGet.Commands.PackCommandRunner.BuildFromProjectFile(String path)
   at NuGet.Commands.PackCommandRunner.RunPackageBuild()
   at NuGet.CommandLine.PackCommand.ExecuteCommand()
   at NuGet.CommandLine.Command.ExecuteCommandAsync()
   at NuGet.CommandLine.Command.Execute()
   at NuGet.CommandLine.Program.MainCore(String workingDirectory, String[] args)
@bladewolf55 bladewolf55 changed the title NuGet again throws exceptions "authors is required" "description is required", ignoring csproj/nuspec replacement tokens NuGet again throwing exceptions "authors is required" "description is required", ignoring csproj/nuspec replacement tokens Aug 28, 2020
@kartheekp-ms kartheekp-ms added Functionality:Pack Product:NuGet.exe NuGet.exe RegressionDuringThisVersion A regression which broke since last RTM, and was fixed before the next RTM. Type:Bug labels Aug 28, 2020
@nkolev92
Copy link
Member

@bladewolf55 Can you please provide a repro?

The change for the issue you are mentioning was in 5.7, not 5.6

@nkolev92 nkolev92 added WaitingForCustomer Applied when a NuGet triage person needs more info from the OP and removed RegressionDuringThisVersion A regression which broke since last RTM, and was fixed before the next RTM. labels Aug 28, 2020
@kartheekp-ms
Copy link
Contributor

Thanks @nkolev92. I agree.
@bladewolf55 - I am unable to reproduce the issue. I created a Classlibrary (.NET Framework) project in VS 2019 16.7.2 and executed nuget pack command which produced following output with couple of NU5115 warnings for missing values Description and Author in .csproj file.

C:\{removed}>nuget-5.7.0.exe pack C:\{removed}\9954\ClassLibrary1 -verbosity detailed
NuGet Version: 5.7.0.6726
Attempting to build package from 'ClassLibrary1.csproj'.
MSBuild auto-detection: using msbuild version '16.7.0.37604' from 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin'. Use option -MSBuildVersion to force nuget to use a specific version of MSBuild.
Packing files from 'C:\{removed}\9954\ClassLibrary1\bin\Debug'.
Add file 'C:\{removed}\9954\ClassLibrary1\bin\Debug\ClassLibrary1.dll' to package as 'lib\net472\ClassLibrary1.dll'
WARNING: NU5115: Description was not specified. Using 'Description'.
WARNING: NU5115: Author was not specified. Using '{my user name}'.

Id: ClassLibrary1
Version: 1.0.0
Authors: {my user name}
Description: Description
Dependencies:

Added file '[Content_Types].xml'.
Added file '_rels/.rels'.
Added file 'ClassLibrary1.nuspec'.
Added file 'lib/net472/ClassLibrary1.dll'.
Added file 'package/services/metadata/core-properties/b09a89a5c5644d5894b9a221d63dfc4e.psmdcp'.

WARNING: NU5128: Some target frameworks declared in the dependencies group of the nuspec and the lib/ref folder do not have exact matches in the other location. Consult the list of actions below:
- Add a dependency group for .NETFramework4.7.2 to the nuspec
Successfully created package 'C:\{removed}\ClassLibrary1.1.0.0.nupkg'.

Can you please provide a repro?

@bladewolf55
Copy link
Author

bladewolf55 commented Aug 29, 2020

Of course. I should have provided that the first time.

Environment

  • Visual Studio 2019 16.7.2
  • Windows 10 Pro (latest stable release)
  • NuGet CLI 5.7.0.6726

Steps to Reproduce

  1. Create a .NET Framework Class Library (Framework 4.7.2)
  2. In the ClassLibrary1.csproj project folder, run nuget spec
  3. Reduce the resulting ClassLibrary1.nuspec file to the required properties
    <?xml version="1.0" encoding="utf-8"?>
    <package >
      <metadata>
        <id>$id$</id>
        <version>$version$</version>
        <authors>$author$</authors>
        <description>$description$</description>
      </metadata>
    </package>
  4. In Properties\AssemblyInfo.cs (or, in VS, ClassLibrary1 > Properties > Application > Assembly Information...) , add the values that are substituted for $description and $author:
    [assembly: AssemblyDescription("Desc")]
    [assembly: AssemblyConfiguration("")]
    [assembly: AssemblyCompany("Name")]
  5. Build the project or solution.
  6. In project folder, run nuget pack

Expected: Successful build of new package

Actual: Error that Author and Description are missing:

Attempting to build package from 'ClassLibrary1.csproj'.
MSBuild auto-detection: using msbuild version '16.7.0.37604' from 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin'.
Packing files from 'C:\Users\charl\Google Drive\Development\NuGet Testing\ClassLibrary1\ClassLibrary1\bin\Debug'.
Using 'ClassLibrary1.nuspec' for metadata.
Authors is required.
Description is required.

This error does not happen using nuget.exe 5.6x, as specified in the OP.

@zkat
Copy link
Contributor

zkat commented Aug 31, 2020

ping @rrelyea because hotseat. Can you confirm that this is an actual bug, or that a bugfix we did caused this to start (correctly) failing?

@rrelyea
Copy link
Contributor

rrelyea commented Aug 31, 2020

n.h.9954.zip

Attached my repro attempt based on your instructions.
extract zip file.
have nuget.5.6.exe and nuget.5.7.exe in your path (or adapt repro.cmd)
cd n.h.9954
run repro.cmd (i used this: "repro.cmd 1> out.txt 2>&1")

my output:

C:\temp\n.h.9954\n.h.9954>msbuild /p:Configuration=release /v:minimal 
Microsoft (R) Build Engine version 16.8.0-preview-20427-01+67225fa91 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

  n.h.9954 -> C:\temp\n.h.9954\n.h.9954\bin\Release\n.h.9954.dll

C:\temp\n.h.9954\n.h.9954>nuget.5.6 pack -verbosity detailed -prop configuration=release 
NuGet Version: 5.6.0.6591
Attempting to build package from 'n.h.9954.csproj'.
MSBuild auto-detection: using msbuild version '16.8.0.42701' from 'C:\Program Files (x86)\Microsoft Visual Studio\2019\IntPreview\MSBuild\Current\Bin'. Use option -MSBuildVersion to force nuget to use a specific version of MSBuild.
Packing files from 'C:\temp\n.h.9954\n.h.9954\bin\Release'.
Could not load file or assembly 'NuGet, Version=5.6.0.5, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Using 'n.h.9954.nuspec' for metadata.
Authors is required.
Description is required.
System.Exception: Authors is required.
Description is required.
   at NuGet.Packaging.Manifest.Validate(Manifest manifest)
   at NuGet.Packaging.Manifest.ReadFrom(Stream stream, Func`2 propertyProvider, Boolean validateSchema)
   at NuGet.CommandLine.ProjectFactory.ProcessNuspec(PackageBuilder builder, String basePath)
   at NuGet.CommandLine.ProjectFactory.CreateBuilder(String basePath, NuGetVersion version, String suffix, Boolean buildIfNeeded, PackageBuilder builder)
   at NuGet.Commands.PackCommandRunner.BuildFromProjectFile(String path)
   at NuGet.Commands.PackCommandRunner.BuildPackage()
   at NuGet.CommandLine.PackCommand.ExecuteCommand()
   at NuGet.CommandLine.Command.ExecuteCommandAsync()
   at NuGet.CommandLine.Command.Execute()
   at NuGet.CommandLine.Program.MainCore(String workingDirectory, String[] args)

C:\temp\n.h.9954\n.h.9954>nuget.5.7 pack -verbosity detailed -prop configuration=release 
NuGet Version: 5.7.0.6726
Attempting to build package from 'n.h.9954.csproj'.
MSBuild auto-detection: using msbuild version '16.8.0.42701' from 'C:\Program Files (x86)\Microsoft Visual Studio\2019\IntPreview\MSBuild\Current\Bin'. Use option -MSBuildVersion to force nuget to use a specific version of MSBuild.
Packing files from 'C:\temp\n.h.9954\n.h.9954\bin\Release'.
Using 'n.h.9954.nuspec' for metadata.
Add file 'C:\temp\n.h.9954\n.h.9954\bin\Release\n.h.9954.dll' to package as 'lib\net472\n.h.9954.dll'

Id: n.h.9954
Version: 1.0.0
Authors: Company Name
Description: My Description
Dependencies: 

Added file '[Content_Types].xml'.
Added file '_rels/.rels'.
Added file 'lib/net472/n.h.9954.dll'.
Added file 'n.h.9954.nuspec'.
Added file 'package/services/metadata/core-properties/abe8b54b7f0e448392dd98a32db193c5.psmdcp'.

WARNING: NU5128: Some target frameworks declared in the dependencies group of the nuspec and the lib/ref folder do not have exact matches in the other location. Consult the list of actions below:
- Add a dependency group for .NETFramework4.7.2 to the nuspec
Successfully created package 'C:\temp\n.h.9954\n.h.9954\n.h.9954.1.0.0.nupkg'.

so it appears that it was broken in 5.6 and is now fixed in 5.7.
What did we do differently?

@bladewolf55
Copy link
Author

Here's my output using your zip file and running the command "repro.cmd 1> out.txt 2>&1. You'll see it's different than your results. The only difference I see is the MSBuild version. But be sure to read after that, because I'm getting different behaviors depending on how I build and pack.


C:\Users\charl\Downloads\n.h.9954>msbuild /p:Configuration=release /v:minimal 
Microsoft (R) Build Engine version 16.7.0+b89cb5fde for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

  n.h.9954 -> C:\Users\charl\Downloads\n.h.9954\bin\Release\n.h.9954.dll

C:\Users\charl\Downloads\n.h.9954>nuget.5.6 pack -verbosity detailed -prop configuration=release 
NuGet Version: 5.6.0.6591
Attempting to build package from 'n.h.9954.csproj'.
MSBuild auto-detection: using msbuild version '16.7.0.37604' from 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin'. Use option -MSBuildVersion to force nuget to use a specific version of MSBuild.
Packing files from 'C:\Users\charl\Downloads\n.h.9954\bin\Release'.
Could not load file or assembly 'NuGet, Version=5.6.0.5, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
Using 'n.h.9954.nuspec' for metadata.
Authors is required.
Description is required.
System.Exception: Authors is required.
Description is required.
   at NuGet.Packaging.Manifest.Validate(Manifest manifest)
   at NuGet.Packaging.Manifest.ReadFrom(Stream stream, Func`2 propertyProvider, Boolean validateSchema)
   at NuGet.CommandLine.ProjectFactory.ProcessNuspec(PackageBuilder builder, String basePath)
   at NuGet.CommandLine.ProjectFactory.CreateBuilder(String basePath, NuGetVersion version, String suffix, Boolean buildIfNeeded, PackageBuilder builder)
   at NuGet.Commands.PackCommandRunner.BuildFromProjectFile(String path)
   at NuGet.Commands.PackCommandRunner.BuildPackage()
   at NuGet.CommandLine.PackCommand.ExecuteCommand()
   at NuGet.CommandLine.Command.ExecuteCommandAsync()
   at NuGet.CommandLine.Command.Execute()
   at NuGet.CommandLine.Program.MainCore(String workingDirectory, String[] args)

C:\Users\charl\Downloads\n.h.9954>nuget.5.7 pack -verbosity detailed -prop configuration=release 
NuGet Version: 5.7.0.6726
Attempting to build package from 'n.h.9954.csproj'.
MSBuild auto-detection: using msbuild version '16.7.0.37604' from 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin'. Use option -MSBuildVersion to force nuget to use a specific version of MSBuild.
Packing files from 'C:\Users\charl\Downloads\n.h.9954\bin\Release'.
Could not load file or assembly 'file:///C:\Users\charl\Downloads\n.h.9954\nuget.5.7.exe' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
Using 'n.h.9954.nuspec' for metadata.
Authors is required.
Description is required.
System.Exception: Authors is required.
Description is required.
   at NuGet.Packaging.Manifest.Validate(Manifest manifest)
   at NuGet.Packaging.Manifest.ReadFrom(Stream stream, Func`2 propertyProvider, Boolean validateSchema)
   at NuGet.CommandLine.ProjectFactory.ProcessNuspec(PackageBuilder builder, String basePath)
   at NuGet.CommandLine.ProjectFactory.CreateBuilder(String basePath, NuGetVersion version, String suffix, Boolean buildIfNeeded, PackageBuilder builder)
   at NuGet.Commands.PackCommandRunner.BuildFromProjectFile(String path)
   at NuGet.Commands.PackCommandRunner.RunPackageBuild()
   at NuGet.CommandLine.PackCommand.ExecuteCommand()
   at NuGet.CommandLine.Command.ExecuteCommandAsync()
   at NuGet.CommandLine.Command.Execute()
   at NuGet.CommandLine.Program.MainCore(String workingDirectory, String[] args)

So, here are a few other ways to build and release. In each case, I delete the bin/obj folders and .nupkg file to start. I put the nuget executables in the project folder.

Important: Ensure no other nuget.exe are on the Path

  1. Run msbuild /p:Configuration=release /v:minimal
  2. Run nuget.5.6 pack -verbosity detailed -prop configuration=release
    Get authors/description errors
  3. Delete bin/obj
  4. Run msbuild /p:Configuration=release /v:minimal
  5. Rename nuget.5.6.exe to nuget.exe
  6. Run nuget pack -verbosity detailed -prop configuration=release
    Pack succeeds

Same as above, but with nuget.5.6.exe

  • Using nuget.5.6 pack shows errors
  • Using nuget pack shows errors

  1. Copy nuget.exe v5.7 into same folder as nuget.5.7.exe (in other words, nuget.exe and nuget.5.7.exe are on the path.

  2. Run msbuild as above

  3. Run nuget pack nuget.5.7.exe as above.
    Pack succeeds

  4. Run nuget pack nuget.5.7.exe as above.
    Pack succeeds


However, using putting nuget.exe version 5.7 in the same folder doesn't succeed.


Conclusions

There are past reports of nuget behaving differently if it's renamed. I don't know if there are also reports of the renamed executed file picking up behavior from another nuget.exe in the path.

My reproduction is, I think, a common use case: the latest nuget.exe in the path.

As I see it right now, there are three bugs:

  1. The behavior of 5.6 changes depending on its name
  2. The behavior of 5.6 changes if the same version file named nuget.exe is in the path
  3. 5.7 fails in all cases as originally reported

I'm puzzled why I could never get 5.7 to succeed as you did. But then, you didn't truly reproduce my conditions; you mutated them. And we all know from X-Men what happens when there's mutation.

@zkat zkat assigned JonDouglas and unassigned rrelyea Sep 10, 2020
@zkat zkat added Priority:2 Issues for the current backlog. Triage:Investigate and removed WaitingForCustomer Applied when a NuGet triage person needs more info from the OP labels Sep 10, 2020
@bladewolf55
Copy link
Author

Thank you for shepherding this along. It's likely, in continuous integration environments, NuGet is automatically updated to its latest version. Unexpected behavior can cause significant problems and confusion. I don't want to see that happen and will help how I can.

@sintecnos-lucabiffi
Copy link

sintecnos-lucabiffi commented Oct 7, 2020

I'm using NuGet 5.7.0.6726 and this still has to be fixed. Reading this thread I'll give a try to the 5.6.something version.

EDIT: I did try with version 5.6.0.6591 and it works as OP has correctly reported

@ZachSand
Copy link

ZachSand commented Oct 8, 2020

I am also getting this issue. I upgraded my build server and installed the newest version of development tools, including NuGet Version: 5.7.0.6726 and now all of my previously passing builds fail due to the error.

Old build server has NuGet Version: 5.6.0.6591 and works fine. I'll be reverting back to this version until a fix is made.

@markoueis
Copy link

Upgraded from 5.5 to 5.8 and now have this issue when doing nuget pack

@nkolev92
Copy link
Member

nkolev92 commented Jan 6, 2021

Thanks for the update @lezmaka & @bladewolf55.

That's probably one of the reasons we haven't been able to repro it locally.

@cesharpcom
Copy link

cesharpcom commented Jan 6, 2021

@nkolev92

I also confirm that the issue is solved by unblocking the nuget.exe for versions higher then 5.6.

The funny thing is that the issue is not there for version 5.6 even when the exe is still blocked.
In any case unblocking it for 5.7 and higher solves the issue.

Also for troubleshooting hard to reproduce issues it's always the best approach do try to reproduce it on a freshly installed operating system and only install the things needed to reproduce the issue. By this it's not affected by any kind of company restrictions or previously installed software or settings from the past.

Let me say I learned the above the hard way :) but it's often the golden step in able to reproduce stuff that customers/users report.

@nkolev92
Copy link
Member

nkolev92 commented Jan 6, 2021

The funny thing is that the issue is not there for version 5.6 even when the exe is still blocked.

The only functional change is going from:

            return (T)domain.CreateInstanceAndUnwrap(typeof(T).Assembly.FullName, typeof(T).FullName);

to

            return (T)domain.CreateInstanceFromAndUnwrap(Assembly.GetExecutingAssembly().Location, typeof(T).FullName);

At this point I'm not sure how exactly this changes it, but all your info has helped get an actionable repro.

@bladewolf55
Copy link
Author

bladewolf55 commented Jan 6, 2021 via email

@sam-wheat
Copy link

sam-wheat commented Jan 28, 2021

I was able to solve this quickly - thanks to all who participated especially @lezmaka.
BTW in addition to version info, I suggest that you print the full directory path where the running .exe resides when nuget.exe alone is typed in the command line.

@rrelyea
Copy link
Contributor

rrelyea commented Mar 6, 2021

likely fix...in ProjectFactory::ExtractMetadata
add something like this after try block
catch (FileLoadException flex) when (flex.FileName.EndsWith("nuget.exe", StringComparison.OrdinalIgnoreCase))
{
var message = string.Format(
CultureInfo.InvariantCulture,
LocalizedResourceManager.GetString("Error_NuGetExeNeedsToBeUnblockedAfterDownloading"),
project.FullPath,
ex.Message);
throw new PackagingException(NuGetLogCode.NUXXXX, message, flex); // define new error code
}

@xformerfhs
Copy link

I can confirm that this bug is present in NuGet V5.9.1.11. If nuget.exe is "blocked" it does not find any meta data of the dll to be packed, uses 1.0.0 as the default version and throws errors regarding "authors" and "description". NuGet shows the following error message while building if it blocked (this is translated to English from the localized error message):

Could not load file or assembly "file:///[nuget-dir]\nuget.exe" or one of its dependencies Operation is not supported (Exception from HRESULT: 0x80131515)

@astrowalker
Copy link

astrowalker commented Aug 30, 2021

Same story here, but I also noticed strange thing -- I have project using netstandard 2.0 and 2.1 (maybe there are more differences, but this one is the most apparent). I was able to pack NS 2.0 project while when packing NS 2.1 project I got this error "Authors is required".

My project "setup" in both cases are identical. I have authors provided in .csproj, and then in .nuspec I have:

    <authors>$author$</authors>

@nkolev92
Copy link
Member

Anyone having issues that are not resolved by unblocking NuGet.exe?

#9954 (comment)

@astrowalker
Copy link

@nkolev92 Me. I was not aware of this unblocking, but nuget didn't raise any errors in regard of safety. In both cases (not unblocked, and unblocked) I have this "Authors is required error".

@tarockx
Copy link

tarockx commented Oct 14, 2021

I've been trying to make nuget.exe work for an hour now, but no luck, I always get the "Author is required / Description is required" error.
None of the fixes mentioned in this thread helped:

  • Made sure the file was named nuget.exe
  • Made sure I only had one in the PATH
  • Made sure .exe was unblocked
  • Tried several 5.x versions and the 6.x preview version

Did I miss something? Is this bug still being worked on?

@robbyxp1
Copy link

This took about 3 hours of my time. Unblocking it (5.11) fixes the issue. Make sure its called nuget.exe, right click on its properties, and at the bottom unblock it.

@Sc0tTyXL
Copy link

This took about 3 hours of my time. Unblocking it (5.11) fixes the issue. Make sure its called nuget.exe, right click on its properties, and at the bottom unblock it.

I can confirm that the issue exists on v5.11 and that Unblocking fixes the issue!

@dlech
Copy link

dlech commented Jan 18, 2022

If manual unblocking is a requirement that can't be worked around, it would be super-awesome if nuget would spit out an error message that explained how to fix the problem instead of any unrelated error.

@erdembayar erdembayar self-assigned this Feb 7, 2022
@erdembayar erdembayar added this to the Sprint 2022-02 milestone Feb 7, 2022
@npakudin
Copy link

npakudin commented Feb 8, 2022

Version 6.0.0.280 - for me problem exists

@erdembayar
Copy link
Contributor

Version 6.0.0.280 - for me problem exists

@npakudin
Please upvote this issue at top, we prioritize based on community upvote & engagement.
We're planning to add explicit message about need to unblock on Windows.

@robbyxp1
Copy link

robbyxp1 commented Feb 9, 2022

The real solution of course would be to wrap the program in a proper installer, and then it would not be marked as blocked ;-)

@luislhg
Copy link

luislhg commented Dec 28, 2022

I have nuget pack running this from an Azure Pipeline and thus my version is never set, always fixed in 1.0.0 because the $version$ is not read. How would I fix/unblock this on Azure/Cloud/Pipeline?

@mrkimpossible
Copy link

In case somebody stumbles on this issue, I just replaced the token $author$ to $authors$ in the nuspec file. I'm even using version 6.4.0.123 which is the latest at the time of this writing.

The tokenized nuspec file gets generated after running nuget spec in a folder where a .csproj, .vbproj, or .fsproj exists.

@alexhiggins732
Copy link

alexhiggins732 commented May 7, 2023

I had same error about Description being required. In my case even though the <Description> tag was set was set, another build property was setting <PackageDescription>.

Changing the <PackageDescription> tag to <Description> resolved the problem.

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

Successfully merging a pull request may close this issue.