Azure devops Nuget Pack.nuspec文件Azure管道不';t获取csproj组件属性。但同一个项目可以在本地打包

Azure devops Nuget Pack.nuspec文件Azure管道不';t获取csproj组件属性。但同一个项目可以在本地打包,azure-devops,nuget,azure-pipelines,azure-pipelines-build-task,nuspec,Azure Devops,Nuget,Azure Pipelines,Azure Pipelines Build Task,Nuspec,以下是我在管道Nuget Pack任务中看到的内容 我尝试使用***.nuspec文件来实现Nuget Pack 此项目可以在本地使用nuget pack打包而不会出现问题 由于某些原因,它不会在csproj程序集文件中拾取属性值 程序集文件中有什么 管道里有什么 解决了。使用nuspec打包时,不会拾取程序集值。它只有在使用csproj文件上的包时才会被拾取 我所做的是指定包中的所有csproj文件 MSdn using System.Reflection; using System.Runt

以下是我在管道Nuget Pack任务中看到的内容

我尝试使用
***.nuspec
文件来实现Nuget Pack

此项目可以在本地使用nuget pack打包而不会出现问题

由于某些原因,它不会在csproj程序集文件中拾取属性值

程序集文件中有什么 管道里有什么
解决了。使用nuspec打包时,不会拾取程序集值。它只有在使用csproj文件上的包时才会被拾取

我所做的是指定包中的所有csproj文件

MSdn

using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("SOMECOMPANY.Mapping")]
[assembly: AssemblyDescription("SOMECOMPANY Mapping")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("SOMECOMPANY")]
[assembly: AssemblyProduct("SOMECOMPANY.Mapping")]
[assembly: AssemblyCopyright("Copyright ©  2018")]
[assembly: AssemblyTrademark("SOMECOMPANY")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: Guid("9c3a7a3b-964b-4d85-b543-8bcc55fc6589")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
##[section]Starting: NuGet pack
==============================================================================
Task         : NuGet
Description  : Restore, pack, or push NuGet packages, or run a NuGet command. Supports NuGet.org and authenticated feeds like Azure Artifacts and MyGet. Uses NuGet.exe and works with .NET Framework apps. For .NET Core and .NET Standard apps, use the .NET Core task.
Version      : 2.156.0
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/package/nuget
==============================================================================

[command]C:\windows\system32\chcp.com 65001
Active code page: 65001
##[warning]The automatic package versioning and include referenced projects options do not work together. Referenced projects will not inherit the custom version provided by the automatic versioning settings.
Attempting to pack file: d:\a\1\s\src\SOMECOMPANY.Core\SOMECOMPANY.Mapping\SOMECOMPANY.Mapping.nuspec
[command]C:\hostedtoolcache\windows\NuGet\4.1.0\x64\nuget.exe pack d:\a\1\s\src\SOMECOMPANY.Core\SOMECOMPANY.Mapping\SOMECOMPANY.Mapping.nuspec -NonInteractive -OutputDirectory d:\a\1\a -IncludeReferencedProjects -Symbols -version 1.0.0-CI-20190824-170629 -Verbosity Detailed
System.Exception: Id is required.
NuGet Version: 4.1.0.2450
**Authors is required.
Attempting to build package from 'SOMECOMPANY.Mapping.nuspec'.
Description is required.**
   at NuGet.Packaging.Manifest.Validate(Manifest manifest)
   at NuGet.Packaging.Manifest.ReadFrom(Stream stream, Func`2 propertyProvider, Boolean validateSchema)
   at NuGet.Packaging.PackageBuilder.ReadManifest(Stream stream, String basePath, Func`2 propertyProvider)
   at NuGet.Packaging.PackageBuilder..ctor(String path, String basePath, Func`2 propertyProvider, Boolean includeEmptyDirectories)
   at NuGet.Commands.PackCommandRunner.CreatePackageBuilderFromNuspec(String path)
   at NuGet.Commands.PackCommandRunner.BuildFromNuspec(String path)
   at NuGet.CommandLine.PackCommand.ExecuteCommand()
   at NuGet.CommandLine.Command.ExecuteCommandAsync()
   at NuGet.CommandLine.Command.Execute()
   at NuGet.CommandLine.Program.MainCore(String workingDirectory, String[] args)

**##[error]The nuget command failed with exit code(1) and error(System.Exception:** **Id is required.
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.Packaging.PackageBuilder.ReadManifest(Stream stream, String basePath, Func`2 propertyProvider)
   at NuGet.Packaging.PackageBuilder..ctor(String path, String basePath, Func`2 propertyProvider, Boolean includeEmptyDirectories)
   at NuGet.Commands.PackCommandRunner.CreatePackageBuilderFromNuspec(String path)
   at NuGet.Commands.PackCommandRunner.BuildFromNuspec(String path)
   at NuGet.CommandLine.PackCommand.ExecuteCommand()
   at NuGet.CommandLine.Command.ExecuteCommandAsync()
   at NuGet.CommandLine.Command.Execute()
   at NuGet.CommandLine.Program.MainCore(String workingDirectory, String[] args))
##[error]An error occurred while trying to pack the files.
##[section]Finishing: NuGet pack