Repository navigation
Closed
NuGet/NuGet.Client
#3334Labels
Category:Quality WeekIssues that should be considered for quality weekIssues that should be considered for quality weekFunctionality:PackPriority:2Issues for the current backlog.Issues for the current backlog.Type:Bug
Milestone
Description
Details about Problem
NuGet Version: 3.5.0.1938
On Windows 10
Ignores Placeholder during pack: nuget.exe pack "NugetBug.csproj" -Properties Configuration=Release -Verbosity detailed -Symbols -Version "2.0.0"
Worked before? If so, with which NuGet version
2.8 (and 3.4.x)
Detailed repro steps so we can see the same problem
- Use https://github.com/mawl/NugetBug
- msbuild /p:Configuration=Release
With 2.8:
C:\projects\csharp\NugetBug\NugetBug>nuget.exe pack "NugetBug.csproj" -Properties Configuration=Release -Verbosity detailed -Symbols -Version "2.0.0"
Es wird versucht, das Paket aus "NugetBug.csproj" zu erstellen.
Paketerstellung der Dateien aus "C:\projects\csharp\NugetBug\NugetBug\bin\Release".
"NugetBug.nuspec" wird für Metadaten verwendet.
Datei "C:\projects\csharp\NugetBug\NugetBug\bin\Release\NugetBug.dll" dem Paket als "lib\net452\NugetBug.dll" hinzufügen
Id: NugetBug
Version: 2.0.0
Authors: Company
Description: Description
Dependencies: None
Die Datei "lib\net452\NugetBug.dll" wurde hinzugefügt.
Das Paket "C:\projects\csharp\NugetBug\NugetBug\NugetBug.2.0.0.nupkg" wurde erfolgreich erstellt.
Es wird versucht, das Symbolpaket für "NugetBug.csproj" zu erstellen.
Paketerstellung der Dateien aus "C:\projects\csharp\NugetBug\NugetBug\bin\Release".
"NugetBug.nuspec" wird für Metadaten verwendet.
Datei "C:\projects\csharp\NugetBug\NugetBug\bin\Release\NugetBug.dll" dem Paket als "lib\net452\NugetBug.dll" hinzufügen
Datei "C:\projects\csharp\NugetBug\NugetBug\bin\Release\NugetBug.pdb" dem Paket als "lib\net452\NugetBug.pdb" hinzufügen
Datei "C:\projects\csharp\NugetBug\NugetBug\Class1.cs" dem Paket als "src\Class1.cs" hinzufügen
Datei "C:\projects\csharp\NugetBug\NugetBug\Properties\AssemblyInfo.cs" dem Paket als "src\Properties\AssemblyInfo.cs" hinzufügen
Id: NugetBug
Version: 2.0.0
Authors: Company
Description: Description
Dependencies: None
Die Datei "lib\net452\NugetBug.dll" wurde hinzugefügt.
Die Datei "lib\net452\NugetBug.pdb" wurde hinzugefügt.
Die Datei "src\Class1.cs" wurde hinzugefügt.
Die Datei "src\Properties\AssemblyInfo.cs" wurde hinzugefügt.
Das Paket "C:\projects\csharp\NugetBug\NugetBug\NugetBug.2.0.0.symbols.nupkg" wurde erfolgreich erstellt.
With 3.5.x
C:\projects\csharp\NugetBug\NugetBug>c:\tmp\nuget-3.5.exe pack "NugetBug.csproj" -Properties Configuration=Release -Verbosity detailed -Symbols -Version "2.0.0"
NuGet Version: 3.5.0.1938
Es wird versucht, das Paket aus "NugetBug.csproj" zu erstellen.
MSBuild auto-detection: using msbuild version '14.0' from 'C:\Program Files (x86)\MSBuild\14.0\bin'. Use option -MSBuildVersion to force nuget to use a specific version of MSBuild.
Paketerstellung der Dateien aus "C:\projects\csharp\NugetBug\NugetBug\bin\Release".
"NugetBug.nuspec" wird für Metadaten verwendet.
System.Exception: Authors is required.
Description is required.
bei NuGet.Packaging.Manifest.Validate(Manifest manifest)
bei NuGet.Packaging.Manifest.ReadFrom(Stream stream, Func`2 propertyProvider, Boolean validateSchema)
bei NuGet.CommandLine.ProjectFactory.ProcessNuspec(PackageBuilder builder, String basePath)
bei NuGet.CommandLine.ProjectFactory.CreateBuilder(String basePath, NuGetVersion version, String suffix, Boolean buildIfNeeded)
bei NuGet.Commands.PackCommandRunner.BuildFromProjectFile(String path)
bei NuGet.Commands.PackCommandRunner.BuildPackage(String path)
bei NuGet.Commands.PackCommandRunner.BuildPackage()
bei NuGet.CommandLine.PackCommand.ExecuteCommand()
bei NuGet.CommandLine.Command.ExecuteCommandAsync()
bei NuGet.CommandLine.Command.Execute()
bei NuGet.CommandLine.Program.MainCore(String workingDirectory, String[] args)
...
Other suggested things
Placeholder were ignored.
Reacted by Thomas Freudenberg, Wouter de Vries, Liwen Guo, Iiro Surakka, novabe, Renatto Machado, Jeremy Jao, Andrew Busch, John and Dmitry Anshilevich
Metadata
Metadata
Assignees
Labels
Category:Quality WeekIssues that should be considered for quality weekIssues that should be considered for quality weekFunctionality:PackPriority:2Issues for the current backlog.Issues for the current backlog.Type:Bug
Activity
[-]nuget cli 3.5.0 throws exception during pack of a csproj (using placeholders)[/-][+]nuget cli 3.5.0 throws exception authors required during pack of a csproj ignoring placeholders and assemblyinfo attributes[/+][-]nuget cli 3.5.0 throws exception authors required during pack of a csproj ignoring placeholders and assemblyinfo attributes[/-][+]nuget cli 3.5.0 throws exception 'authors required' during pack of a csproj ignoring placeholders and assemblyinfo attributes[/+]JohannesDrexler commentedon Jan 20, 2017
I have exact the same issue.
JohannesDrexler commentedon Jan 20, 2017
I downloaded nuget.exe 3.4.4 and it worked again so it seems the bug was introduced in 3.5
rohit21agrawal commentedon Jan 20, 2017
@JohannesDrexler @mawl This is actually a different bug : #3146
If you change the name of your nuget-3.5.exe to nuget.exe, it should work for you.
JohannesDrexler commentedon Jan 20, 2017
@rohit21agrawal the nuget.exe in my project is named nuget.exe and it doesn't work. Im creating a repro project now
rohit21agrawal commentedon Jan 20, 2017
please include the nuget.exe in your repro project as well.
rohit21agrawal commentedon Jan 20, 2017
the repro project provided by @mawl actually works well with nuget.exe 3.5.0 RTM (build 1938). Attaching the project with its build result and the nuget.exe used.
NugetBug.zip
JohannesDrexler commentedon Jan 20, 2017
I am having problems recreating this issue but i don't want to attach the original project where it occures.
In the project where it occured the "Author" and "Description" were included as a shared AssemblyInfo.cs that was included as "LinkedFile" in the project
thoemmi commentedon Jan 31, 2017
I'm facing the same issue in my project: in the nuspec file I'm using
$author$and$description$, which -- according to the documentation -- should be replaced with the content of the assembly attributesAssemblyCompanyandAssemblyDescriptionrespectively.However, NuGet v3.5 (and even the current NuGet/NuGet.Client@04f9b91 ) says
rohit21agrawal commentedon Jan 31, 2017
@thoemmi i would be more than happy to take a look if you could tell me the repro steps for your project..
38 remaining items
[-]nuget cli 3.5.0 throws exception 'authors required' during pack of a csproj ignoring placeholders and assemblyinfo attributes if the assembly name is changed[/-][+]nuget cli throws exception 'authors required' during pack of a csproj ignoring placeholders and assemblyinfo attributes if the assembly name is changed[/+][-]nuget cli throws exception 'authors required' during pack of a csproj ignoring placeholders and assemblyinfo attributes if the assembly name is changed[/-][+]NuGet.exe throws exception 'authors required' during pack of a csproj ignoring placeholders and assemblyinfo attributes if the assembly name is changed[/+]bladewolf55 commentedon Aug 28, 2020
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.
5.6 output
5.7 output
bladewolf55 commentedon Aug 28, 2020
I see the original thread is closed. Should I start a new one, or can this be reopened?
zivkan commentedon Aug 28, 2020
I think it's better to start a new thread. This thread was closed when a PR was merged, meaning this issue is linked to our release notes.
nkolev92 commentedon Aug 28, 2020
@bladewolf55
The change for this particular issue is in 5.7, not 5.6.
sintecnos-lucabiffi commentedon Oct 7, 2020
I'm using NuGet 5.7.0.6726 and this still has to be fixed
bladewolf55 commentedon Oct 7, 2020
@sintecnos-lucabiffi You might add your comment to the new thread so it's clear the issue exists in the latest build.
#9954