我有一个建立asp.net网站的DevOps管道创建。我可以在我的计算机上构建站点,但当我使用Pipeline时,它会给出错误:
Error CS0246: The type or namespace name 'Azure' could not be found (are you missing a using directive or an assembly reference?
我从NuGet安装了三个Azure包,根据NuGet恢复任务,安装它们(和其他包)没有错误
SYSTEMVSSCONNECTION exists true
SYSTEMVSSCONNECTION exists true
[command]C:\Windows\system32\chcp.com 65001
Active code page: 65001
Detected NuGet version 4.4.1.4656 / 4.4.1
SYSTEMVSSCONNECTION exists true
[command]C:\hostedtoolcache\windows\NuGet\4.4.1\x64\nuget.exe sources Add -NonInteractive -Name NuGetOrg -Source https://api.nuget.org/v3/index.json -ConfigFile D:\a\1\Nuget\tempNuGet_108.config
Package Source with Name: NuGetOrg added successfully.
[command]C:\hostedtoolcache\windows\NuGet\4.4.1\x64\nuget.exe restore D:\a\1\s\EncryptionDecryptionLib\EncryptionDecryptionLib.sln -Verbosity Detailed -NonInteractive -ConfigFile D:\a\1\Nuget\tempNuGet_108.config
NuGet Version: 4.4.1.4656
MSBuild auto-detection: using msbuild version '15.9.21.664' from 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\bin'. Use option -MSBuildVersion to force nuget to use a specific version of MSBuild.
MSBuild P2P timeout [ms]: 120000
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\bin\msbuild.exe "C:\Users\VssAdministrator\AppData\Local\Temp\NuGetScratch\5rlwkrkr.ltc.nugetinputs.targets" /t:GenerateRestoreGraphFile /nologo /nr:false /v:q /p:NuGetRestoreTargets="C:\Users\VssAdministrator\AppData\Local\Temp\NuGetScratch\lluddamt.xwo.nugetrestore.targets" /p:RestoreTaskAssemblyFile="C:\hostedtoolcache\windows\NuGet\4.4.1\x64\nuget.exe" /p:RestoreSolutionDirectory="D:\a\1\s\EncryptionDecryptionLib" /p:RestoreConfigFile="D:\a\1\Nuget\tempNuGet_108.config" /p:SolutionDir="D:\a\1\s\EncryptionDecryptionLib"
Nothing to do. None of the projects in this solution specify any packages for NuGet to restore.
[command]C:\hostedtoolcache\windows\NuGet\4.4.1\x64\nuget.exe restore D:\a\1\s\LabCode.sln -Verbosity Detailed -NonInteractive -ConfigFile D:\a\1\Nuget\tempNuGet_108.config
NuGet Version: 4.4.1.4656
MSBuild auto-detection: using msbuild version '15.9.21.664' from 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\bin'. Use option -MSBuildVersion to force nuget to use a specific version of MSBuild.
WARNING: Project file D:\a\1\s\LabCode\ cannot be found.
Nothing to do. None of the projects in this solution specify any packages for NuGet to restore.
[command]C:\hostedtoolcache\windows\NuGet\4.4.1\x64\nuget.exe restore D:\a\1\s\LabCode\LabCode.sln -Verbosity Detailed -NonInteractive -ConfigFile D:\a\1\Nuget\tempNuGet_108.config
NuGet Version: 4.4.1.4656
MSBuild auto-detection: using msbuild version '15.9.21.664' from 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\bin'. Use option -MSBuildVersion to force nuget to use a specific version of MSBuild.
MSBuild P2P timeout [ms]: 120000
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\bin\msbuild.exe "C:\Users\VssAdministrator\AppData\Local\Temp\NuGetScratch\pljrnr0g.jqu.nugetinputs.targets" /t:GenerateRestoreGraphFile /nologo /nr:false /v:q /p:NuGetRestoreTargets="C:\Users\VssAdministrator\AppData\Local\Temp\NuGetScratch\hlbc31tk.hzh.nugetrestore.targets" /p:RestoreTaskAssemblyFile="C:\hostedtoolcache\windows\NuGet\4.4.1\x64\nuget.exe" /p:RestoreSolutionDirectory="D:\a\1\s\LabCode" /p:RestoreConfigFile="D:\a\1\Nuget\tempNuGet_108.config" /p:SolutionDir="D:\a\1\s\LabCode"
Restoring NuGet package Azure.Core.1.15.0.
Restoring NuGet package Azure.Identity.1.5.0-beta.1.
Restoring NuGet package Azure.Security.KeyVault.Keys.4.2.0-beta.6.
Restoring NuGet package Azure.Security.KeyVault.Secrets.4.2.0-beta.5.
Restoring NuGet package EPPlus.5.6.3.
Restoring NuGet package Microsoft.Bcl.AsyncInterfaces.1.0.0.
Restoring NuGet package Microsoft.Identity.Client.4.30.1.
Restoring NuGet package Microsoft.Identity.Client.Extensions.Msal.2.18.4.
Restoring NuGet package Microsoft.IO.RecyclableMemoryStream.1.4.1.
Restoring NuGet package Microsoft.NETCore.Platforms.1.1.0.
Restoring NuGet package Microsoft.ReportViewer.Common.10.0.40219.1.
Restoring NuGet package Microsoft.ReportViewer.WebForms.10.0.40219.1.
Restoring NuGet package NETStandard.Library.2.0.0.
Restoring NuGet package System.Buffers.4.5.1.
Restoring NuGet package System.Diagnostics.DiagnosticSource.4.6.0.
Restoring NuGet package System.Memory.4.5.4.
GET https://api.nuget.org/v3-flatcontainer/azure.identity/1.5.0-beta.1/azure.identity.1.5.0-beta.1.nupkg
GET https://api.nuget.org/v3-flatcontainer/azure.security.keyvault.secrets/4.2.0-beta.5/azure.security.keyvault.secrets.4.2.0-beta.5.nupkg
GET https://api.nuget.org/v3-flatcontainer/epplus/5.6.3/epplus.5.6.3.nupkg
GET https://api.nuget.org/v3-flatcontainer/azure.core/1.15.0/azure.core.1.15.0.nupkg
GET https://api.nuget.org/v3-flatcontainer/microsoft.bcl.asyncinterfaces/1.0.0/microsoft.bcl.asyncinterfaces.1.0.0.nupkg
GET https://api.nuget.org/v3-flatcontainer/microsoft.identity.client/4.30.1/microsoft.identity.client.4.30.1.nupkg
GET https://api.nuget.org/v3-flatcontainer/microsoft.identity.client.extensions.msal/2.18.4/microsoft.identity.client.extensions.msal.2.18.4.nupkg
GET https://api.nuget.org/v3-flatcontainer/microsoft.io.recyclablememorystream/1.4.1/microsoft.io.recyclablememorystream.1.4.1.nupkg
GET https://api.nuget.org/v3-flatcontainer/microsoft.netcore.platforms/1.1.0/microsoft.netcore.platforms.1.1.0.nupkg
GET https://api.nuget.org/v3-flatcontainer/microsoft.reportviewer.common/10.0.40219.1/microsoft.reportviewer.common.10.0.40219.1.nupkg
GET https://api.nuget.org/v3-flatcontainer/microsoft.reportviewer.webforms/10.0.40219.1/microsoft.reportviewer.webforms.10.0.40219.1.nupkg
GET https://api.nuget.org/v3-flatcontainer/netstandard.library/2.0.0/netstandard.library.2.0.0.nupkg
GET https://api.nuget.org/v3-flatcontainer/system.buffers/4.5.1/system.buffers.4.5.1.nupkg
GET https://api.nuget.org/v3-flatcontainer/system.diagnostics.diagnosticsource/4.6.0/system.diagnostics.diagnosticsource.4.6.0.nupkg
GET https://api.nuget.org/v3-flatcontainer/system.memory/4.5.4/system.memory.4.5.4.nupkg
GET https://api.nuget.org/v3-flatcontainer/azure.security.keyvault.keys/4.2.0-beta.6/azure.security.keyvault.keys.4.2.0-beta.6.nupkg
OK https://api.nuget.org/v3-flatcontainer/azure.security.keyvault.secrets/4.2.0-beta.5/azure.security.keyvault.secrets.4.2.0-beta.5.nupkg 13ms
Acquiring lock for the installation of Azure.Security.KeyVault.Secrets 4.2.0-beta.5
Acquired lock for the installation of Azure.Security.KeyVault.Secrets 4.2.0-beta.5
Installing Azure.Security.KeyVault.Secrets 4.2.0-beta.5.
OK https://api.nuget.org/v3-flatcontainer/epplus/5.6.3/epplus.5.6.3.nupkg 55ms
OK https://api.nuget.org/v3-flatcontainer/microsoft.netcore.platforms/1.1.0/microsoft.netcore.platforms.1.1.0.nupkg 52ms
Acquiring lock for the installation of Microsoft.NETCore.Platforms 1.1.0
Acquiring lock for the installation of EPPlus 5.6.3
Acquired lock for the installation of EPPlus 5.6.3
Installing EPPlus 5.6.3.
OK https://api.nuget.org/v3-flatcontainer/microsoft.bcl.asyncinterfaces/1.0.0/microsoft.bcl.asyncinterfaces.1.0.0.nupkg 54ms
Acquiring lock for the installation of Microsoft.Bcl.AsyncInterfaces 1.0.0
OK https://api.nuget.org/v3-flatcontainer/system.memory/4.5.4/system.memory.4.5.4.nupkg 53ms
Acquiring lock for the installation of System.Memory 4.5.4
Acquired lock for the installation of Microsoft.NETCore.Platforms 1.1.0
Installing Microsoft.NETCore.Platforms 1.1.0.
Acquired lock for the installation of System.Memory 4.5.4
Installing System.Memory 4.5.4.
OK https://api.nuget.org/v3-flatcontainer/microsoft.io.recyclablememorystream/1.4.1/microsoft.io.recyclablememorystream.1.4.1.nupkg 55ms
Acquiring lock for the installation of Microsoft.IO.RecyclableMemoryStream 1.4.1
OK https://api.nuget.org/v3-flatcontainer/azure.identity/1.5.0-beta.1/azure.identity.1.5.0-beta.1.nupkg 59ms
Acquiring lock for the installation of Azure.Identity 1.5.0-beta.1
Acquired lock for the installation of Microsoft.IO.RecyclableMemoryStream 1.4.1
Installing Microsoft.IO.RecyclableMemoryStream 1.4.1.
OK https://api.nuget.org/v3-flatcontainer/microsoft.identity.client.extensions.msal/2.18.4/microsoft.identity.client.extensions.msal.2.18.4.nupkg 56ms
Acquiring lock for the installation of Microsoft.Identity.Client.Extensions.Msal 2.18.4
Acquired lock for the installation of Microsoft.Bcl.AsyncInterfaces 1.0.0
Installing Microsoft.Bcl.AsyncInterfaces 1.0.0.
Acquired lock for the installation of Azure.Identity 1.5.0-beta.1
Installing Azure.Identity 1.5.0-beta.1.
Acquired lock for the installation of Microsoft.Identity.Client.Extensions.Msal 2.18.4
Installing Microsoft.Identity.Client.Extensions.Msal 2.18.4.
OK https://api.nuget.org/v3-flatcontainer/azure.core/1.15.0/azure.core.1.15.0.nupkg 59ms
Acquiring lock for the installation of Azure.Core 1.15.0
Acquired lock for the installation of Azure.Core 1.15.0
Installing Azure.Core 1.15.0.
OK https://api.nuget.org/v3-flatcontainer/azure.security.keyvault.keys/4.2.0-beta.6/azure.security.keyvault.keys.4.2.0-beta.6.nupkg 67ms
Acquiring lock for the installation of Azure.Security.KeyVault.Keys 4.2.0-beta.6
Acquired lock for the installation of Azure.Security.KeyVault.Keys 4.2.0-beta.6
Installing Azure.Security.KeyVault.Keys 4.2.0-beta.6.
OK https://api.nuget.org/v3-flatcontainer/microsoft.reportviewer.webforms/10.0.40219.1/microsoft.reportviewer.webforms.10.0.40219.1.nupkg 76ms
Acquiring lock for the installation of Microsoft.ReportViewer.WebForms 10.0.40219.1
Acquired lock for the installation of Microsoft.ReportViewer.WebForms 10.0.40219.1
Installing Microsoft.ReportViewer.WebForms 10.0.40219.1.
OK https://api.nuget.org/v3-flatcontainer/netstandard.library/2.0.0/netstandard.library.2.0.0.nupkg 89ms
Acquiring lock for the installation of NETStandard.Library 2.0.0
Acquired lock for the installation of NETStandard.Library 2.0.0
Installing NETStandard.Library 2.0.0.
OK https://api.nuget.org/v3-flatcontainer/microsoft.reportviewer.common/10.0.40219.1/microsoft.reportviewer.common.10.0.40219.1.nupkg 99ms
Acquiring lock for the installation of Microsoft.ReportViewer.Common 10.0.40219.1
Acquired lock for the installation of Microsoft.ReportViewer.Common 10.0.40219.1
Installing Microsoft.ReportViewer.Common 10.0.40219.1.
OK https://api.nuget.org/v3-flatcontainer/system.buffers/4.5.1/system.buffers.4.5.1.nupkg 113ms
Acquiring lock for the installation of System.Buffers 4.5.1
OK https://api.nuget.org/v3-flatcontainer/system.diagnostics.diagnosticsource/4.6.0/system.diagnostics.diagnosticsource.4.6.0.nupkg 120ms
Acquiring lock for the installation of System.Diagnostics.DiagnosticSource 4.6.0
Acquired lock for the installation of System.Buffers 4.5.1
Installing System.Buffers 4.5.1.
Acquired lock for the installation of System.Diagnostics.DiagnosticSource 4.6.0
Installing System.Diagnostics.DiagnosticSource 4.6.0.
OK https://api.nuget.org/v3-flatcontainer/microsoft.identity.client/4.30.1/microsoft.identity.client.4.30.1.nupkg 2052ms
Acquiring lock for the installation of Microsoft.Identity.Client 4.30.1
Acquired lock for the installation of Microsoft.Identity.Client 4.30.1
Installing Microsoft.Identity.Client 4.30.1.
Completed installation of Microsoft.NETCore.Platforms 1.1.0
Adding package 'Microsoft.NETCore.Platforms.1.1.0' to folder 'D:\a\1\s\LabCode\packages'
Added package 'Microsoft.NETCore.Platforms.1.1.0' to folder 'D:\a\1\s\LabCode\packages'
Added package 'Microsoft.NETCore.Platforms.1.1.0' to folder 'D:\a\1\s\LabCode\packages' from source 'https://api.nuget.org/v3/index.json'
Restoring NuGet package System.Memory.Data.1.0.2.
GET https://api.nuget.org/v3-flatcontainer/system.memory.data/1.0.2/system.memory.data.1.0.2.nupkg
Completed installation of Azure.Security.KeyVault.Secrets 4.2.0-beta.5
Completed installation of Azure.Security.KeyVault.Keys 4.2.0-beta.6
OK https://api.nuget.org/v3-flatcontainer/system.memory.data/1.0.2/system.memory.data.1.0.2.nupkg 8ms
Acquiring lock for the installation of System.Memory.Data 1.0.2
Adding package 'Azure.Security.KeyVault.Secrets.4.2.0-beta.5' to folder 'D:\a\1\s\LabCode\packages'
Added package 'Azure.Security.KeyVault.Secrets.4.2.0-beta.5' to folder 'D:\a\1\s\LabCode\packages'
Added package 'Azure.Security.KeyVault.Secrets.4.2.0-beta.5' to folder 'D:\a\1\s\LabCode\packages' from source 'https://api.nuget.org/v3/index.json'
Restoring NuGet package System.Numerics.Vectors.4.5.0.
Acquired lock for the installation of System.Memory.Data 1.0.2
Installing System.Memory.Data 1.0.2.
GET https://api.nuget.org/v3-flatcontainer/system.numerics.vectors/4.5.0/system.numerics.vectors.4.5.0.nupkg
Adding package 'Azure.Security.KeyVault.Keys.4.2.0-beta.6' to folder 'D:\a\1\s\LabCode\packages'
Added package 'Azure.Security.KeyVault.Keys.4.2.0-beta.6' to folder 'D:\a\1\s\LabCode\packages'
Added package 'Azure.Security.KeyVault.Keys.4.2.0-beta.6' to folder 'D:\a\1\s\LabCode\packages' from source 'https://api.nuget.org/v3/index.json'
Restoring NuGet package System.Runtime.CompilerServices.Unsafe.4.6.0.
GET https://api.nuget.org/v3-flatcontainer/system.runtime.compilerservices.unsafe/4.6.0/system.runtime.compilerservices.unsafe.4.6.0.nupkg
Completed installation of Microsoft.Identity.Client.Extensions.Msal 2.18.4
Adding package 'Microsoft.Identity.Client.Extensions.Msal.2.18.4' to folder 'D:\a\1\s\LabCode\packages'
Added package 'Microsoft.Identity.Client.Extensions.Msal.2.18.4' to folder 'D:\a\1\s\LabCode\packages'
Added package 'Microsoft.Identity.Client.Extensions.Msal.2.18.4' to folder 'D:\a\1\s\LabCode\packages' from source 'https://api.nuget.org/v3/index.json'
Restoring NuGet package System.Security.Cryptography.ProtectedData.4.5.0.
GET https://api.nuget.org/v3-flatcontainer/system.security.cryptography.protecteddata/4.5.0/system.security.cryptography.protecteddata.4.5.0.nupkg
OK https://api.nuget.org/v3-flatcontainer/system.security.cryptography.protecteddata/4.5.0/system.security.cryptography.protecteddata.4.5.0.nupkg 7ms
Acquiring lock for the installation of System.Security.Cryptography.ProtectedData 4.5.0
Acquired lock for the installation of System.Security.Cryptography.ProtectedData 4.5.0
Installing System.Security.Cryptography.ProtectedData 4.5.0.
Completed installation of Azure.Identity 1.5.0-beta.1
Adding package 'Azure.Identity.1.5.0-beta.1' to folder 'D:\a\1\s\LabCode\packages'
Added package 'Azure.Identity.1.5.0-beta.1' to folder 'D:\a\1\s\LabCode\packages'
Added package 'Azure.Identity.1.5.0-beta.1' to folder 'D:\a\1\s\LabCode\packages' from source 'https://api.nuget.org/v3/index.json'
Restoring NuGet package System.Text.Encodings.Web.4.7.2.
GET https://api.nuget.org/v3-flatcontainer/system.text.encodings.web/4.7.2/system.text.encodings.web.4.7.2.nupkg
Completed installation of Microsoft.Bcl.AsyncInterfaces 1.0.0
Adding package 'Microsoft.Bcl.AsyncInterfaces.1.0.0' to folder 'D:\a\1\s\LabCode\packages'
Added package 'Microsoft.Bcl.AsyncInterfaces.1.0.0' to folder 'D:\a\1\s\LabCode\packages'
Added package 'Microsoft.Bcl.AsyncInterfaces.1.0.0' to folder 'D:\a\1\s\LabCode\packages' from source 'https://api.nuget.org/v3/index.json'
Restoring NuGet package System.Text.Json.4.6.0.
GET https://api.nuget.org/v3-flatcontainer/system.text.json/4.6.0/system.text.json.4.6.0.nupkg
OK https://api.nuget.org/v3-flatcontainer/system.numerics.vectors/4.5.0/system.numerics.vectors.4.5.0.nupkg 811ms
OK https://api.nuget.org/v3-flatcontainer/system.text.encodings.web/4.7.2/system.text.encodings.web.4.7.2.nupkg 677ms
Acquiring lock for the installation of System.Text.Encodings.Web 4.7.2
Acquiring lock for the installation of System.Numerics.Vectors 4.5.0
OK https://api.nuget.org/v3-flatcontainer/system.runtime.compilerservices.unsafe/4.6.0/system.runtime.compilerservices.unsafe.4.6.0.nupkg 807ms
Acquiring lock for the installation of System.Runtime.CompilerServices.Unsafe 4.6.0
OK https://api.nuget.org/v3-flatcontainer/system.text.json/4.6.0/system.text.json.4.6.0.nupkg 670ms
Acquiring lock for the installation of System.Text.Json 4.6.0
Acquired lock for the installation of System.Text.Encodings.Web 4.7.2
Installing System.Text.Encodings.Web 4.7.2.
Acquired lock for the installation of System.Numerics.Vectors 4.5.0
Installing System.Numerics.Vectors 4.5.0.
Acquired lock for the installation of System.Text.Json 4.6.0
Installing System.Text.Json 4.6.0.
Acquired lock for the installation of System.Runtime.CompilerServices.Unsafe 4.6.0
Installing System.Runtime.CompilerServices.Unsafe 4.6.0.
OK https://api.nuget.org/v3-flatcontainer/system.threading.tasks.extensions/4.5.2/system.threading.tasks.extensions.4.5.2.nupkg 9ms
Acquiring lock for the installation of System.Threading.Tasks.Extensions 4.5.2
Completed installation of Microsoft.IO.RecyclableMemoryStream 1.4.1
Completed installation of System.Memory 4.5.4
Completed installation of Azure.Core 1.15.0
Adding package 'Azure.Core.1.15.0' to folder 'D:\a\1\s\LabCode\packages'
Added package 'Azure.Core.1.15.0' to folder 'D:\a\1\s\LabCode\packages'
Added package 'Azure.Core.1.15.0' to folder 'D:\a\1\s\LabCode\packages' from source 'https://api.nuget.org/v3/index.json'
Completed installation of System.Diagnostics.DiagnosticSource 4.6.0
Adding package 'System.Diagnostics.DiagnosticSource.4.6.0' to folder 'D:\a\1\s\LabCode\packages'
Added package 'System.Diagnostics.DiagnosticSource.4.6.0' to folder 'D:\a\1\s\LabCode\packages'
Added package 'System.Diagnostics.DiagnosticSource.4.6.0' to folder 'D:\a\1\s\LabCode\packages' from source 'https://api.nuget.org/v3/index.json'
Completed installation of System.Runtime.CompilerServices.Unsafe 4.6.0
Adding package 'System.Runtime.CompilerServices.Unsafe.4.6.0' to folder 'D:\a\1\s\LabCode\packages'
Completed installation of System.Text.Encodings.Web 4.7.2
Adding package 'System.Text.Encodings.Web.4.7.2' to folder 'D:\a\1\s\LabCode\packages'
Added package 'System.Runtime.CompilerServices.Unsafe.4.6.0' to folder 'D:\a\1\s\LabCode\packages'
Added package 'System.Runtime.CompilerServices.Unsafe.4.6.0' to folder 'D:\a\1\s\LabCode\packages' from source 'https://api.nuget.org/v3/index.json'
Added package 'System.Text.Encodings.Web.4.7.2' to folder 'D:\a\1\s\LabCode\packages'
Added package 'System.Text.Encodings.Web.4.7.2' to folder 'D:\a\1\s\LabCode\packages' from source 'https://api.nuget.org/v3/index.json'
Completed installation of System.Threading.Tasks.Extensions 4.5.2
Adding package 'System.Threading.Tasks.Extensions.4.5.2' to folder 'D:\a\1\s\LabCode\packages'
Added package 'System.Threading.Tasks.Extensions.4.5.2' to folder 'D:\a\1\s\LabCode\packages'
Added package 'System.Threading.Tasks.Extensions.4.5.2' to folder 'D:\a\1\s\LabCode\packages' from source 'https://api.nuget.org/v3/index.json'
Completed installation of System.Text.Json 4.6.0
Adding package 'System.Text.Json.4.6.0' to folder 'D:\a\1\s\LabCode\packages'
Added package 'System.Text.Json.4.6.0' to folder 'D:\a\1\s\LabCode\packages'
Added package 'System.Text.Json.4.6.0' to folder 'D:\a\1\s\LabCode\packages' from source 'https://api.nuget.org/v3/index.json'
Completed installation of System.Security.Cryptography.ProtectedData 4.5.0
Completed installation of Microsoft.ReportViewer.WebForms 10.0.40219.1
Adding package 'System.Security.Cryptography.ProtectedData.4.5.0' to folder 'D:\a\1\s\LabCode\packages'
Adding package 'Microsoft.ReportViewer.WebForms.10.0.40219.1' to folder 'D:\a\1\s\LabCode\packages'
Added package 'Microsoft.ReportViewer.WebForms.10.0.40219.1' to folder 'D:\a\1\s\LabCode\packages'
Added package 'Microsoft.ReportViewer.WebForms.10.0.40219.1' to folder 'D:\a\1\s\LabCode\packages' from source 'https://api.nuget.org/v3/index.json'
Added package 'System.Security.Cryptography.ProtectedData.4.5.0' to folder 'D:\a\1\s\LabCode\packages'
Added package 'System.Security.Cryptography.ProtectedData.4.5.0' to folder 'D:\a\1\s\LabCode\packages' from source 'https://api.nuget.org/v3/index.json'
Completed installation of System.ValueTuple 4.5.0
Adding package 'System.ValueTuple.4.5.0' to folder 'D:\a\1\s\LabCode\packages'
Added package 'System.ValueTuple.4.5.0' to folder 'D:\a\1\s\LabCode\packages'
Added package 'System.ValueTuple.4.5.0' to folder 'D:\a\1\s\LabCode\packages' from source 'https://api.nuget.org/v3/index.json'
Completed installation of System.Numerics.Vectors 4.5.0
Adding package 'System.Numerics.Vectors.4.5.0' to folder 'D:\a\1\s\LabCode\packages'
Added package 'System.Numerics.Vectors.4.5.0' to folder 'D:\a\1\s\LabCode\packages'
Added package 'System.Numerics.Vectors.4.5.0' to folder 'D:\a\1\s\LabCode\packages' from source 'https://api.nuget.org/v3/index.json'
Completed installation of Microsoft.ReportViewer.Common 10.0.40219.1
Adding package 'Microsoft.ReportViewer.Common.10.0.40219.1' to folder 'D:\a\1\s\LabCode\packages'
Added package 'Microsoft.ReportViewer.Common.10.0.40219.1' to folder 'D:\a\1\s\LabCode\packages'
Added package 'Microsoft.ReportViewer.Common.10.0.40219.1' to folder 'D:\a\1\s\LabCode\packages' from source 'https://api.nuget.org/v3/index.json'
Completed installation of NETStandard.Library 2.0.0
Adding package 'NETStandard.Library.2.0.0' to folder 'D:\a\1\s\LabCode\packages'
Added package 'NETStandard.Library.2.0.0' to folder 'D:\a\1\s\LabCode\packages'
Added package 'NETStandard.Library.2.0.0' to folder 'D:\a\1\s\LabCode\packages' from source 'https://api.nuget.org/v3/index.json'
Completed installation of Microsoft.Identity.Client 4.30.1
Adding package 'Microsoft.Identity.Client.4.30.1' to folder 'D:\a\1\s\LabCode\packages'
Added package 'Microsoft.Identity.Client.4.30.1' to folder 'D:\a\1\s\LabCode\packages'
Added package 'Microsoft.Identity.Client.4.30.1' to folder 'D:\a\1\s\LabCode\packages' from source 'https://api.nuget.org/v3/index.json'
Completed installation of EPPlus 5.6.3
Adding package 'EPPlus.5.6.3' to folder 'D:\a\1\s\LabCode\packages'
Added package 'EPPlus.5.6.3' to folder 'D:\a\1\s\LabCode\packages'
Added package 'EPPlus.5.6.3' to folder 'D:\a\1\s\LabCode\packages' from source 'https://api.nuget.org/v3/index.json'
NuGet Config files used:
D:\a\1\Nuget\tempNuGet_108.config
Feeds used:
https://api.nuget.org/v3/index.json
Installed:
24 package(s) to packages.config projects
Finishing: NuGet restore
正在将所有nuGet包还原到d:\a\1\s\LabCode\packages文件夹
然后,当msbuild运行时,它会给出以下带有错误的输出:
##[section]Starting: Build solution
==============================================================================
Task : Visual Studio build
Description : Build with MSBuild and set the Visual Studio version property
Version : 1.187.0
Author : Microsoft Corporation
Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/build/visual-studio-build
==============================================================================
##[command]"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\msbuild.exe" "D:\a\1\s\LabCode.sln" /nologo /nr:false /dl:CentralLogger,"D:\a\_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.187.0\ps_modules\MSBuildHelpers\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll";"RootDetailId=bd1b54f4-cf00-4079-a811-339152db6b3e|SolutionDir=D:\a\1\s"*ForwardingLogger,"D:\a\_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.187.0\ps_modules\MSBuildHelpers\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll" /p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="D:\a\1\a\\" /p:platform="any cpu" /p:configuration="debug" /p:VisualStudioVersion="15.0" /p:_MSDeployUserAgent="VSTS_811f008f-007e-4c35-a27e-d88722b3949b_build_8_0"
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
Build started 6/14/2021 3:03:22 PM.
Project "D:\a\1\s\LabCode.sln" on node 1 (default targets).
ValidateSolutionConfiguration:
Building solution configuration "debug|any cpu".
##[warning]D:\a\1\s\LabCode.metaproj(0,0): Warning MSB3030: Could not copy the file "D:\a\1\s\packages\EPPlus.5.6.3\lib\net40\EPPlus.dll" because it was not found.
Project "D:\a\1\s\LabCode.sln" (1) is building "D:\a\1\s\LabCode.metaproj" (2) on node 1 (default targets).
D:\a\1\s\LabCode.metaproj : warning MSB3030: Could not copy the file "D:\a\1\s\packages\EPPlus.5.6.3\lib\net40\EPPlus.dll" because it was not found.
The previous error was converted to a warning because the task was called with ContinueOnError=true.
Build continuing because "ContinueOnError" on the task "Copy" is set to "true".
C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe -v /localhost_59094 -p LabCode\ -u -f -d PrecompiledWeb\localhost_59094\
##[error]LabCode\App_Code\Util.cs(6,0): Error CS0246: The type or namespace name 'Azure' could not be found (are you missing a using directive or an assembly reference?)
d:\a\1\s\LabCode\App_Code\Util.cs(6): error CS0246: The type or namespace name 'Azure' could not be found (are you missing a using directive or an assembly reference?) [D:\a\1\s\LabCode.metaproj]
##[error]LabCode\App_Code\Util.cs(7,0): Error CS0246: The type or namespace name 'Azure' could not be found (are you missing a using directive or an assembly reference?)
d:\a\1\s\LabCode\App_Code\Util.cs(7): error CS0246: The type or namespace name 'Azure' could not be found (are you missing a using directive or an assembly reference?) [D:\a\1\s\LabCode.metaproj]
Done Building Project "D:\a\1\s\LabCode.metaproj" (default targets) -- FAILED.
Done Building Project "D:\a\1\s\LabCode.sln" (default targets) -- FAILED.
Build FAILED.
"D:\a\1\s\LabCode.sln" (default target) (1) ->
"D:\a\1\s\LabCode.metaproj" (default target) (2) ->
(Build target) ->
D:\a\1\s\LabCode.metaproj : warning MSB3030: Could not copy the file "D:\a\1\s\packages\EPPlus.5.6.3\lib\net40\EPPlus.dll" because it was not found.
"D:\a\1\s\LabCode.sln" (default target) (1) ->
"D:\a\1\s\LabCode.metaproj" (default target) (2) ->
(Build target) ->
d:\a\1\s\LabCode\App_Code\Util.cs(6): error CS0246: The type or namespace name 'Azure' could not be found (are you missing a using directive or an assembly reference?) [D:\a\1\s\LabCode.metaproj]
d:\a\1\s\LabCode\App_Code\Util.cs(7): error CS0246: The type or namespace name 'Azure' could not be found (are you missing a using directive or an assembly reference?) [D:\a\1\s\LabCode.metaproj]
1 Warning(s)
2 Error(s)
Time Elapsed 00:00:19.77
##[error]Process 'msbuild.exe' exited with code '1'.
##[section]Finishing: Build solution
因此,即使NuGet任务成功完成并恢复了Azure包,它也无法找到它们(EPPlus无法被找到,然后它会给出关于Azure丢失引用的错误)
发布于 2021-06-15 17:39:01
nuget.exe版本的4.4.1
版本太旧,在恢复过程中不可避免地会出现一些不明确的问题。
我建议您可以尝试使用最新的nuget版本5.9.1来恢复nuget包。此外,不要忘记不要使用本地nuget缓存。
如下所示:
5.x
指的是最新的nuget.exe版本。
并选中此选项。
https://stackoverflow.com/questions/67973617
复制相似问题