NuGet / Home

Repo for NuGet Client issues
Other
1.49k stars 250 forks source link

pack returns "WARNING: Author was not specified. Using '[user_name]." #6246

Open alex-piccione opened 6 years ago

alex-piccione commented 6 years ago

nuget.exe version 4.4.1.4656

Nuget.exe command: nuget pack "..\my.library.csproj" -verbosity detailed -Properties Configuration=Debug;Author="My name";Authors="My name" -Suffix %suffix% -IncludeReferencedProjects

Nuspec file:

<?xml version="1.0"?>
<package >
  <metadata>
    <id>my.library</id>
    <version>$version$</version>
    <author>my author</author>
    <authors>$authors$</authors>
    <owners>my author</owners>
    <title>monei.Core</title>
    <description>my description.</description>    
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <copyright>Copyright 2016</copyright>
    <dependencies></dependencies>
  </metadata>
</package>

AssemblyInfo.cs file contains: [assembly: AssemblyCompany("My author")]

If I use Configuration=Release; the warning is not shown. (nuget pack "..\my.library.csproj" -Properties Configuration=Release;authors=%author% -Suffix %suffix% -IncludeReferencedProjects )

Why I continue to receive that warning in Debug mode?

Regards

jainaashish commented 6 years ago

@rohit21agrawal any quick thought?

rohit21agrawal commented 6 years ago

@alex75it any chance you can attach a repro project?

marco-cordeiro commented 6 years ago

I was testing this I get the exact same behaviour. If I build the package in Debug mode it just ignores the attribute and issues a warning saying Author is not specified. Even if this wasn't intended, personally I find it useful as it alerts me if someone tries to create a package in Debug mode.

alex-piccione-spin commented 6 years ago

Sorry... I can't provide any example to reproduce the error at the moment.