我有一个ASP.NET Core 2.2应用程序,当前正在AWS的CodeBuild中运行。我正在使用带有最新Microsoft SDK的Docker容器。我有一些单元测试要在管道中进行之前进行验证(连续集成)。
我在运行dotnet test
时陷入困境:我遇到了Microsoft.Extensions.Identity.Stores - Could not resolve this reference.
错误。 (请参阅下面的日志)。
这应该是一个简单的修复程序,因为它只需要安装上述软件包,但是我找不到如何安装它或如何强制依赖项来安装它。
我尝试了很多东西:
dotnet clean
dotnet restore
,我什至尝试手动添加它(但是随后出现另一个错误,即dotnet add不支持添加该类型的程序包)。 我还尝试搜索NuGet软件包管理器在哪里找到所有依赖项,因此我可以潜在地生成NuGet.config文件并隐式包括所提及的依赖项。但是我没有钉牢这个位置(如果存在的话)。
有什么想法吗?
这是完整的日志(失败是最后几行):
[Container] 2018/12/15 16:26:13 Waiting for agent ping
[Container] 2018/12/15 16:26:15 Waiting for DOWNLOAD_SOURCE
[Container] 2018/12/15 16:26:23 Phase is DOWNLOAD_SOURCE
[Container] 2018/12/15 16:26:23 CODEBUILD_SRC_DIR=/codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb
[Container] 2018/12/15 16:26:23 YAML location is /codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/buildspec.yml
[Container] 2018/12/15 16:26:23 Processing environment variables
[Container] 2018/12/15 16:26:23 Moving to directory /codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb
[Container] 2018/12/15 16:26:23 Registering with agent
[Container] 2018/12/15 16:26:23 Phases found in YAML: 2
[Container] 2018/12/15 16:26:23 PRE_BUILD: 1 commands
[Container] 2018/12/15 16:26:23 BUILD: 1 commands
[Container] 2018/12/15 16:26:23 Phase complete: DOWNLOAD_SOURCE Success: true
[Container] 2018/12/15 16:26:23 Phase context status code: Message:
[Container] 2018/12/15 16:26:23 Entering phase INSTALL
[Container] 2018/12/15 16:26:23 Phase complete: INSTALL Success: true
[Container] 2018/12/15 16:26:23 Phase context status code: Message:
[Container] 2018/12/15 16:26:23 Entering phase PRE_BUILD
[Container] 2018/12/15 16:26:23 Running command dotnet restore EducacionDanielWeb.sln
Restoring packages for /codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/Common/Common.csproj...
Restoring packages for /codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/EFRepository/EduPlaTools.Persistence.csproj...
Installing Microsoft.Extensions.Configuration.Abstractions 2.1.1.
Installing Microsoft.Extensions.Configuration 2.1.1.
Installing Microsoft.Extensions.Primitives 2.1.1.
Installing Microsoft.Extensions.Caching.Abstractions 2.0.0.
Installing Microsoft.Extensions.Options 2.0.0.
Installing Microsoft.Extensions.Logging.Abstractions 2.0.0.
Installing Microsoft.Extensions.DependencyInjection.Abstractions 2.0.0.
Installing System.Runtime.CompilerServices.Unsafe 4.4.0.
Installing Microsoft.Extensions.Configuration.Binder 2.1.1.
Installing Microsoft.Extensions.Logging.Abstractions 2.1.1.
Installing Microsoft.Extensions.Options 2.1.1.
Installing Microsoft.Extensions.Caching.Abstractions 2.1.1.
Installing Microsoft.Extensions.DependencyInjection.Abstractions 2.1.1.
Installing Microsoft.Extensions.Caching.Memory 2.0.0.
Installing Microsoft.Extensions.Logging 2.0.0.
Installing System.ComponentModel.Annotations 4.4.0.
Installing System.Security.Cryptography.Cng 4.4.0.
Installing System.Configuration.ConfigurationManager 4.5.0.
Installing Microsoft.EntityFrameworkCore.Proxies 2.2.0.
Installing AWSSDK.EC2 3.3.76.1.
Installing AWSSDK.DynamoDBv2 3.3.15.3.
Installing Pomelo.EntityFrameworkCore.MySql 2.1.4.
Installing System.Security.Cryptography.ProtectedData 4.5.0.
Installing Castle.Core 4.2.1.
Installing AWSSDK.Core 3.3.29.14.
Installing Microsoft.Extensions.DependencyInjection 2.0.0.
Installing AWSSDK.Core 3.3.29.15.
Installing System.Collections.Immutable 1.4.0.
Installing Remotion.Linq 2.1.1.
Installing System.Diagnostics.DiagnosticSource 4.4.1.
Installing Microsoft.Extensions.Primitives 2.0.0.
Installing Microsoft.Extensions.Logging 2.1.1.
Installing AutoMapper 8.0.0.
Installing Microsoft.Extensions.Caching.Memory 2.1.1.
Installing System.Interactive.Async 3.1.1.
Installing Z.EntityFramework.Plus.EFCore 1.8.18.
Installing Pomelo.JsonObject 2.0.0.
Installing MySqlConnector 0.47.1.
Installing Microsoft.EntityFrameworkCore.Relational 2.1.4.
Installing System.Diagnostics.TraceSource 4.3.0.
Installing Microsoft.Extensions.DependencyInjection 2.1.1.
Installing System.Diagnostics.DiagnosticSource 4.5.1.
Installing System.Threading.Thread 4.0.0.
Installing System.Net.Requests 4.0.11.
Installing Microsoft.EntityFrameworkCore.Analyzers 2.1.4.
Installing Microsoft.EntityFrameworkCore.Relational 2.0.0.
Installing Microsoft.EntityFrameworkCore.Abstractions 2.1.4.
Installing Microsoft.EntityFrameworkCore 2.0.0.
Installing Microsoft.EntityFrameworkCore 2.1.4.
Installing System.Net.WebHeaderCollection 4.0.1.
Installing Microsoft.CSharp 4.4.0.
Installing Microsoft.Extensions.Configuration.Abstractions 2.0.0.
Installing System.Buffers 4.4.0.
Installing System.Memory 4.5.0.
Installing System.Numerics.Vectors 4.4.0.
Generating MSBuild file /codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/EFRepository/obj/EduPlaTools.Persistence.csproj.nuget.g.props.
Generating MSBuild file /codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/Common/obj/Common.csproj.nuget.g.props.
Generating MSBuild file /codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/EFRepository/obj/EduPlaTools.Persistence.csproj.nuget.g.targets.
Generating MSBuild file /codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/Common/obj/Common.csproj.nuget.g.targets.
Restore completed in 5.66 sec for /codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/EFRepository/EduPlaTools.Persistence.csproj.
Restore completed in 5.66 sec for /codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/Common/Common.csproj.
Restoring packages for /codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/EduPlaTools.Commands/EduPlaTools.Commands.csproj...
Restoring packages for /codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/EduPlaTools.Data.Common/EduPlaTools.Data.Common.csproj...
Installing MediatR 6.0.0.
Generating MSBuild file /codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/EduPlaTools.Commands/obj/EduPlaTools.Commands.csproj.nuget.g.props.
Generating MSBuild file /codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/EduPlaTools.Commands/obj/EduPlaTools.Commands.csproj.nuget.g.targets.
Restore completed in 246.25 ms for /codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/EduPlaTools.Commands/EduPlaTools.Commands.csproj.
Restoring packages for /codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/EduPlaTools.Domain/EduPlaTools.Domain.csproj...
Generating MSBuild file /codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/EduPlaTools.Data.Common/obj/EduPlaTools.Data.Common.csproj.nuget.g.props.
Generating MSBuild file /codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/EduPlaTools.Data.Common/obj/EduPlaTools.Data.Common.csproj.nuget.g.targets.
Restore completed in 293.33 ms for /codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/EduPlaTools.Data.Common/EduPlaTools.Data.Common.csproj.
Restoring packages for /codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/EduPlaTools.General.UnitTest/EduPlaTools.General.UnitTest.csproj...
Generating MSBuild file /codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/EduPlaTools.Domain/obj/EduPlaTools.Domain.csproj.nuget.g.props.
Generating MSBuild file /codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/EduPlaTools.Domain/obj/EduPlaTools.Domain.csproj.nuget.g.targets.
Restore completed in 53.04 ms for /codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/EduPlaTools.Domain/EduPlaTools.Domain.csproj.
Restoring packages for /codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/EduPlaTools.Query.UnitTest/EduPlaTools.Query.UnitTest.csproj...
Installing System.Collections.Specialized 4.0.1.
Installing System.Collections.NonGeneric 4.0.1.
Installing System.ComponentModel.Primitives 4.1.0.
Installing System.ComponentModel 4.0.1.
Installing System.Xml.XPath 4.0.1.
Installing Microsoft.Win32.Registry 4.0.0.
Installing System.Threading.ThreadPool 4.0.10.
Installing System.Collections.Immutable 1.2.0.
Installing System.ComponentModel.TypeConverter 4.1.0.
Installing System.Xml.XPath.XmlDocument 4.0.1.
Installing System.Diagnostics.Process 4.1.0.
Installing System.ComponentModel.EventBasedAsync 4.0.11.
Installing System.Diagnostics.TraceSource 4.0.0.
Installing System.Reflection.Metadata 1.3.0.
Installing System.Diagnostics.TextWriterTraceListener 4.0.0.
Installing System.Runtime.Loader 4.0.0.
Installing xunit.runner.visualstudio 2.4.1.
Installing Microsoft.DotNet.PlatformAbstractions 1.0.3.
Installing xunit.abstractions 2.0.3.
Installing xunit 2.4.1.
Installing Microsoft.NET.Test.Sdk 15.9.0.
Installing Shouldly 3.0.2.
Installing Microsoft.TestPlatform.ObjectModel 15.9.0.
Installing xunit.assert 2.4.1.
Installing xunit.analyzers 0.10.0.
Installing xunit.core 2.4.1.
Installing Microsoft.CodeCoverage 15.9.0.
Installing Microsoft.TestPlatform.TestHost 15.9.0.
Installing xunit.extensibility.execution 2.4.1.
Installing xunit.extensibility.core 2.4.1.
Installing Microsoft.Extensions.DependencyModel 1.0.3.
Installing Microsoft.AspNetCore.Cryptography.Internal 2.1.1.
Installing Microsoft.AspNetCore.DataProtection.Abstractions 2.1.1.
Installing Microsoft.AspNetCore.Authorization 2.1.1.
Installing Microsoft.AspNetCore.Authentication.Abstractions 2.1.1.
Installing Microsoft.AspNetCore.Routing.Abstractions 2.1.1.
Installing Microsoft.AspNetCore.DataProtection.Abstractions 2.1.0.
Installing Microsoft.AspNetCore.Cryptography.Internal 2.1.0.
Installing Microsoft.AspNetCore.Authentication.Abstractions 2.1.0.
Installing AutoMapper.Extensions.Microsoft.DependencyInjection 6.0.0.
Installing MediatR.Extensions.Microsoft.DependencyInjection 6.0.1.
Installing AWSSDK.SecretsManager 3.3.2.30.
Installing Newtonsoft.Json 12.0.1.
Installing Microsoft.AspNetCore.Authorization 2.1.0.
Installing Microsoft.AspNetCore.Hosting.Server.Abstractions 2.1.0.
Installing Microsoft.Extensions.Hosting.Abstractions 2.1.0.
Installing Microsoft.AspNetCore.Http.Features 2.1.0.
Installing Microsoft.Net.Http.Headers 2.1.0.
Installing Microsoft.AspNetCore.DataProtection 2.1.1.
Installing Microsoft.Extensions.ObjectPool 2.1.1.
Installing Microsoft.AspNetCore.WebUtilities 2.1.1.
Installing bootstrap 4.1.3.
Installing Sendgrid 9.10.0.
Installing AWSSDK.Extensions.NETCore.Setup 3.3.6.
Installing Microsoft.VisualStudio.Azure.Containers.Tools.Targets 1.1.1.
Installing BenchmarkDotNet.Core 0.10.14.
Installing AWS.Logger.AspNetCore 1.4.1.
Installing Localization.AspNetCore.TagHelpers 0.5.0.
Installing FluentValidation.AspNetCore 8.1.1.
Installing ElectronNET.API 0.0.10.
Installing popper.js 1.14.0.
Installing jQuery 3.0.0.
Installing Microsoft.AspNetCore.Http.Abstractions 1.1.2.
Installing Microsoft.Extensions.Logging.Abstractions 1.0.0.
Installing Microsoft.Extensions.DependencyInjection.Abstractions 1.0.2.
Installing Microsoft.Extensions.Configuration.Abstractions 1.0.2.
Installing AWSSDK.Core 3.3.13.3.
Installing System.Xml.XPath.XmlDocument 4.3.0.
Installing Microsoft.DotNet.PlatformAbstractions 1.1.1.
Installing Microsoft.DotNet.InternalAbstractions 1.0.0.
Installing Microsoft.Extensions.Configuration.Abstractions 1.0.0.
Installing AWS.Logger.Core 1.3.1.
Installing Microsoft.AspNetCore.Razor.Runtime 2.1.2.
Installing Microsoft.AspNetCore.Mvc.Localization 2.1.3.
Installing Microsoft.AspNetCore.Authorization.Policy 2.1.1.
Installing FluentValidation 8.1.1.
Installing Microsoft.AspNetCore.Mvc 2.1.0.
Installing Microsoft.AspNetCore.Hosting.Abstractions 2.1.1.
Installing SocketIoClientDotNet 1.0.5.
Installing Microsoft.Extensions.Primitives 1.1.1.
Installing Microsoft.AspNetCore.Http.Features 1.1.2.
Installing Microsoft.Extensions.Primitives 1.0.1.
Installing System.Linq.Expressions 4.1.1.
Installing Microsoft.Extensions.Primitives 1.0.0.
Installing AWSSDK.CloudWatchLogs 3.3.4.
Installing Microsoft.AspNetCore.Html.Abstractions 2.1.1.
Installing Microsoft.AspNetCore.Razor 2.1.2.
Installing Microsoft.Extensions.Localization 2.1.1.
Installing Microsoft.AspNetCore.Localization 2.1.1.
Installing Microsoft.AspNetCore.Authentication.Core 2.1.1.
Installing Microsoft.AspNetCore.Mvc.Razor 2.1.3.
Installing System.ComponentModel.Annotations 4.4.1.
Installing Microsoft.Extensions.DependencyInjection 2.1.0.
Installing Microsoft.Extensions.Caching.Memory 2.1.0.
Installing Microsoft.AspNetCore.Mvc.Razor.Extensions 2.1.0.
Installing Microsoft.AspNetCore.Mvc.Localization 2.1.0.
Installing Microsoft.AspNetCore.Mvc.TagHelpers 2.1.0.
Installing Microsoft.AspNetCore.Mvc.RazorPages 2.1.0.
Installing Microsoft.AspNetCore.Mvc.Cors 2.1.0.
Installing Microsoft.AspNetCore.Mvc.Abstractions 2.1.3.
Installing Microsoft.AspNetCore.Mvc.ViewFeatures 2.1.0.
Installing Microsoft.AspNetCore.Mvc.Formatters.Json 2.1.0.
Installing Microsoft.AspNetCore.Mvc.DataAnnotations 2.1.0.
Installing Microsoft.AspNetCore.Mvc.ApiExplorer 2.1.0.
Installing Microsoft.AspNetCore.Razor.Design 2.1.0.
Installing Microsoft.AspNetCore.Http.Abstractions 2.1.1.
Installing Microsoft.AspNetCore.Hosting.Server.Abstractions 2.1.1.
Installing Microsoft.Extensions.Hosting.Abstractions 2.1.1.
Installing WebSocket4Net 0.15.1.
Installing Microsoft.AspNetCore.Routing 2.1.1.
Installing SuperSocket.ClientEngine.Core 0.9.0.
Installing EngineIoClientDotNet 1.0.5.
Installing System.Runtime.CompilerServices.Unsafe 4.3.0.
Installing AWSSDK.Core 3.3.17.
Installing System.Net.WebSockets 4.3.0.
Installing Microsoft.Extensions.Localization.Abstractions 2.1.1.
Installing Microsoft.AspNetCore.Http.Extensions 2.1.1.
Installing Microsoft.AspNetCore.Http 2.1.1.
Installing Microsoft.AspNetCore.Mvc.Razor.Extensions 2.1.1.
Installing Microsoft.CodeAnalysis.Razor 2.1.1.
Installing Microsoft.Extensions.FileProviders.Composite 2.1.1.
Installing Microsoft.AspNetCore.Mvc.ViewFeatures 2.1.3.
Installing Microsoft.Extensions.DependencyInjection.Abstractions 2.1.0.
Installing Microsoft.AspNetCore.ResponseCaching.Abstractions 2.1.1.
Installing Microsoft.Extensions.Caching.Abstractions 2.1.0.
Installing Microsoft.Extensions.Options 2.1.0.
Installing Microsoft.AspNetCore.Razor.Language 2.1.0.
Installing Microsoft.CodeAnalysis.Razor 2.1.0.
Installing Microsoft.Extensions.Localization 2.1.0.
Installing Microsoft.AspNetCore.Localization 2.1.0.
Installing Microsoft.AspNetCore.Mvc.Razor 2.1.0.
Installing Microsoft.Extensions.Primitives 2.1.0.
Installing Microsoft.Extensions.FileSystemGlobbing 2.1.0.
Installing Microsoft.AspNetCore.Razor.Runtime 2.1.0.
Installing Microsoft.AspNetCore.JsonPatch 2.1.1.
Installing Microsoft.AspNetCore.Routing.Abstractions 2.1.0.
Installing System.Net.WebHeaderCollection 4.3.0.
Installing Microsoft.AspNetCore.Mvc.Core 2.1.0.
Installing Microsoft.AspNetCore.Cors 2.1.0.
Installing Microsoft.AspNetCore.Html.Abstractions 2.1.0.
Installing Microsoft.Extensions.WebEncoders 2.1.0.
Installing Microsoft.AspNetCore.Diagnostics.Abstractions 2.1.0.
Installing Microsoft.AspNetCore.Antiforgery 2.1.0.
Installing Microsoft.AspNetCore.JsonPatch 2.1.0.
Installing Microsoft.AspNetCore.Http.Features 2.1.1.
Installing Microsoft.Extensions.FileProviders.Abstractions 2.1.1.
Installing Microsoft.AspNetCore.DataProtection 2.1.0.
Installing System.Net.Requests 4.3.0.
Installing Microsoft.Net.Http.Headers 2.1.1.
Installing Microsoft.AspNetCore.Razor.Language 2.1.1.
Installing Microsoft.AspNetCore.Diagnostics.Abstractions 2.1.1.
Installing Microsoft.AspNetCore.Mvc.DataAnnotations 2.1.3.
Generating MSBuild file /codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/EduPlaTools.Query.UnitTest/obj/EduPlaTools.Query.UnitTest.csproj.nuget.g.props.
Generating MSBuild file /codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/EduPlaTools.Query.UnitTest/obj/EduPlaTools.Query.UnitTest.csproj.nuget.g.targets.
Restore completed in 2.08 sec for /codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/EduPlaTools.Query.UnitTest/EduPlaTools.Query.UnitTest.csproj.
Restoring packages for /codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/EduPlaTools.Query/EduPlaTools.Query.csproj...
Installing Microsoft.Extensions.WebEncoders 2.1.1.
Installing Microsoft.AspNetCore.Mvc.Formatters.Json 2.1.3.
Generating MSBuild file /codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/EduPlaTools.Query/obj/EduPlaTools.Query.csproj.nuget.g.props.
Generating MSBuild file /codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/EduPlaTools.Query/obj/EduPlaTools.Query.csproj.nuget.g.targets.
Restore completed in 96.34 ms for /codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/EduPlaTools.Query/EduPlaTools.Query.csproj.
Installing Microsoft.AspNetCore.Mvc.Core 2.1.3.
Installing Microsoft.AspNetCore.Antiforgery 2.1.1.
Installing Microsoft.Extensions.Logging.Abstractions 2.1.0.
Installing Microsoft.Extensions.Localization.Abstractions 2.1.0.
Installing Microsoft.AspNetCore.Http.Extensions 2.1.0.
Installing Microsoft.Extensions.FileProviders.Composite 2.1.0.
Installing Microsoft.AspNetCore.Razor 2.1.0.
Installing Microsoft.AspNetCore.Http.Abstractions 2.1.0.
Installing Microsoft.AspNetCore.Hosting.Abstractions 2.1.0.
Installing Microsoft.AspNetCore.ResponseCaching.Abstractions 2.1.0.
Restoring packages for /codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/EduPlaToolsNoSQLRepo/EduPlaToolsNoSQLRepo.csproj...
Installing System.Threading.Tasks.Extensions 4.5.0.
Installing Microsoft.AspNetCore.Routing 2.1.0.
Installing Microsoft.AspNetCore.Http 2.1.0.
Installing Microsoft.Extensions.FileProviders.Abstractions 2.1.0.
Installing Microsoft.AspNetCore.WebUtilities 2.1.0.
Installing Microsoft.AspNetCore.Mvc.Abstractions 2.1.0.
Installing Microsoft.AspNetCore.Authorization.Policy 2.1.0.
Installing Microsoft.AspNetCore.Authentication.Core 2.1.0.
Installing Microsoft.Extensions.Configuration.Abstractions 2.1.0.
Installing Microsoft.Extensions.ObjectPool 2.1.0.
Generating MSBuild file /codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/EduPlaToolsNoSQLRepo/obj/EduPlaToolsNoSQLRepo.csproj.nuget.g.props.
Generating MSBuild file /codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/EduPlaToolsNoSQLRepo/obj/EduPlaToolsNoSQLRepo.csproj.nuget.g.targets.
Restore completed in 1.45 sec for /codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/EduPlaToolsNoSQLRepo/EduPlaToolsNoSQLRepo.csproj.
Restoring packages for /codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/EducacionDanielWeb/EduPlaToolsWeb.csproj...
Generating MSBuild file /codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/EduPlaTools.General.UnitTest/obj/EduPlaTools.General.UnitTest.csproj.nuget.g.props.
Generating MSBuild file /codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/EduPlaTools.General.UnitTest/obj/EduPlaTools.General.UnitTest.csproj.nuget.g.targets.
Restore completed in 4.09 sec for /codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/EduPlaTools.General.UnitTest/EduPlaTools.General.UnitTest.csproj.
Restoring packages for /codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/Utilities/Utilities.csproj...
Generating MSBuild file /codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/Utilities/obj/Utilities.csproj.nuget.g.props.
Generating MSBuild file /codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/Utilities/obj/Utilities.csproj.nuget.g.targets.
Restore completed in 2.83 ms for /codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/Utilities/Utilities.csproj.
Installing System.Composition.Convention 1.0.31.
Installing System.Composition.Runtime 1.0.31.
Installing System.Composition.TypedParts 1.0.31.
Installing System.Composition.AttributedModel 1.0.31.
Installing System.Composition.Hosting 1.0.31.
Installing System.Composition 1.0.31.
Installing System.Linq.Parallel 4.3.0.
Installing Microsoft.CodeAnalysis.Workspaces.Common 2.8.0.
Installing Microsoft.VisualStudio.Web.CodeGeneration.Design 2.2.0.
Installing Microsoft.VisualStudio.Web.CodeGenerators.Mvc 2.2.0.
Installing Microsoft.VisualStudio.Web.CodeGeneration 2.2.0.
Installing Microsoft.VisualStudio.Web.CodeGeneration.EntityFrameworkCore 2.2.0.
Installing Microsoft.VisualStudio.Web.CodeGeneration.Core 2.2.0.
Installing Microsoft.VisualStudio.Web.CodeGeneration.Templating 2.2.0.
Installing Microsoft.VisualStudio.Web.CodeGeneration.Utils 2.2.0.
Installing Microsoft.CodeAnalysis.CSharp.Workspaces 2.8.0.
Installing NuGet.Frameworks 4.7.0.
Installing Microsoft.VisualStudio.Web.CodeGeneration.Contracts 2.2.0.
Generating MSBuild file /codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/EducacionDanielWeb/obj/EduPlaToolsWeb.csproj.nuget.g.props.
Generating MSBuild file /codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/EducacionDanielWeb/obj/EduPlaToolsWeb.csproj.nuget.g.targets.
Restore completed in 3.7 sec for /codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/EducacionDanielWeb/EduPlaToolsWeb.csproj.
[Container] 2018/12/15 16:26:39 Phase complete: PRE_BUILD Success: true
[Container] 2018/12/15 16:26:39 Phase context status code: Message:
[Container] 2018/12/15 16:26:39 Entering phase BUILD
[Container] 2018/12/15 16:26:39 Running command dotnet test EduPlaTools.General.UnitTest/EduPlaTools.General.UnitTest.csproj --configuration release
Build started, please wait...
/usr/share/dotnet/sdk/2.2.100/Microsoft.Common.CurrentVersion.targets(2110,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.Extensions.Identity.Stores". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/EduPlaTools.Data.Common/EduPlaTools.Data.Common.csproj]
ApplicationUser.cs(4,17): error CS0234: The type or namespace name 'AspNetCore' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [/codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/EduPlaTools.Data.Common/EduPlaTools.Data.Common.csproj]
ApplicationUser.cs(9,36): error CS0246: The type or namespace name 'IdentityUser' could not be found (are you missing a using directive or an assembly reference?) [/codebuild/output/src005625819/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/eduplatoolsweb/EduPlaTools.Data.Common/EduPlaTools.Data.Common.csproj]
[Container] 2018/12/15 16:26:45 Command did not exit successfully dotnet test EduPlaTools.General.UnitTest/EduPlaTools.General.UnitTest.csproj --configuration release exit status 1
[Container] 2018/12/15 16:26:45 Phase complete: BUILD Success: false
[Container] 2018/12/15 16:26:45 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: dotnet test EduPlaTools.General.UnitTest/EduPlaTools.General.UnitTest.csproj --configuration release. Reason: exit status 1
[Container] 2018/12/15 16:26:45 Entering phase POST_BUILD
[Container] 2018/12/15 16:26:45 Phase complete: POST_BUILD Success: true
[Container] 2018/12/15 16:26:45 Phase context status code: Message:
这是一张图片:
这是我拥有的buildspec.yml文件: 版本:0.2
# https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html
phases:
pre_build:
commands:
- dotnet restore EducacionDanielWeb.sln
build:
commands:
- dotnet test EduPlaTools.General.UnitTest/EduPlaTools.General.UnitTest.csproj
cache:
paths:
- '~/.nuget/packages'
这是我当前正在使用的Docker映像配置:
答案 0 :(得分:1)
发现它!!!!!
所以问题出在每个.csproj文件的内部
<Reference Include="Z.EntityFramework.Plus.EFCore">
<HintPath>C:\Users\asili\.nuget\packages\z.entityframework.plus.efcore\1.8.18\lib\netstandard2.0\Z.EntityFramework.Plus.EFCore.dll</HintPath>
</Reference>
我不得不从每个引用中删除<HintPath>
。显然,他们在引用我的本地NuGet程序包位置。
删除它们解决了所有问题!!!!!!