-
Notifications
You must be signed in to change notification settings - Fork 253
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 throws exception 'authors required' during pack of a csproj ignoring placeholders and assemblyinfo attributes if the assembly name is changed #4234
Comments
I have exact the same issue. |
I downloaded nuget.exe 3.4.4 and it worked again so it seems the bug was introduced in 3.5 |
@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. |
@rohit21agrawal the nuget.exe in my project is named nuget.exe and it doesn't work. Im creating a repro project now |
please include the nuget.exe in your repro project as well. |
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. |
I am having problems recreating this issue but i don't want to attach the original project where it occures. |
I'm facing the same issue in my project: in the nuspec file I'm using However, NuGet v3.5 (and even the current NuGet/NuGet.Client@04f9b91 ) says
|
@thoemmi i would be more than happy to take a look if you could tell me the repro steps for your project.. |
I'm out of office currently, but will provide you with repro steps in a couple of days. |
It took me a while, but then I was able to reproduce it. It happens, when GitVersion writes a long [assembly: AssemblyInformationalVersion("0.5.1-wizard.1+7.Branch.feature/wizard.Sha.eb2021104d20c964ed7374c6c5e02c3b123f8e36")] I have attached a small demo for reproduction, you just have to call |
I tried to investigate the issue. My assumption was right, AssemblyMetadataExtractor.GetMetadata throws an However, this information never arrives at the user. Because the method throws an exception, it does not return a Some more information for the user would be appreciated. |
This related to this http://nuget.codeplex.com/discussions/262324 |
I'm getting the same issue, even with new projects straight from the Repro (using nuget 3.5):
Result:
Just for reference here's a Stackoverflow question regarding this issue. |
I just ran into this issue as well. I can confirm it has to do with the AssemblyInformationalVersion produced by GitVersion. On my local machine packaging works. The version generated locally is On the buildserver a different version is produced: The latter does not work due to the branch name "origin/develop". A checkout to develop resolved my issue because the forward slash is no longer present. |
I'm running Win 7 enterprise SP1 with VS2015 and VS2017 installed side by side. Targetting .Net 4.6.2 I cannot reproduce all of the above - this is happening to me with nuget versions v4.1 - NOT v3.5 I do notice that :
Attribute value is: Nuspec tag is: Any ideas? |
OK I've narrowed this down: |
I ran into this same problem and was able to fix it by making sure that the |
The same issue! |
+1 For example if change to According to this https://blog.nuget.org/20140924/supporting-semver-2.0.0.html NuGet supported Build Metadata, but even with such format got same "Authors is required" exception: |
Futher investigation shows that NuGet pack works fine according SemVer 2.0.0 specification. |
Same issue here! Create lib project in Csharp. I change version manually to 1.0.0 then nuget spec -Force and pack : Id is required. My AssemblyInfo is : using System.Reflection; // General Information about an assembly is controlled through the following // Setting ComVisible to false makes the types in this assembly not visible // The following GUID is for the ID of the typelib if this project is exposed to COM // Version information for an assembly consists of the following four values: |
I just ran into this issue and in my opinion its a problem in GitVersion. As i posted: GitVersion is not following the Semantic Versioning 2.0.0 specs. '/' or ':' aren't allowed metadata characters. They should replace these characters with '.' or '-'.
|
Same issue |
My Solution Ensure the the following AssemblyInfo properties are not empty strings. [assembly: AssemblyDescription("")]
[assembly: AssemblyCompany("")] This resolved the 'Authors is required' and 'Description is required' error. I guess these can be non empty. Update |
Run into this issue as well! Nuget version 5.2 |
is this bug gaining any traction? 2-year delay doesn't seem great to me. |
Is anyone able to repro this issue with |
At this point I'm treating this as a dup of #3146 but keeping this open as it has more engagement. |
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
|
I see the original thread is closed. Should I start a new one, or can this be reopened? |
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. |
The change for this particular issue is in 5.7, not 5.6. |
I'm using NuGet 5.7.0.6726 and this still has to be fixed |
@sintecnos-lucabiffi You might add your comment to the new thread so it's clear the issue exists in the latest build. |
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
Other suggested things
Placeholder were ignored.
The text was updated successfully, but these errors were encountered: