Я добавляю поддержку Docker в моем приложении ASP.NET Core 2.2 и при локальном тестировании команд для Docker обнаружил, что dotnet publish -f netcoreapp2.2 -c Release -o out
выдает ошибки.
. / IdentityServer.sln
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IdentityServer", "IdentityServer\IdentityServer.csproj", "{A435DE31-3D1C-4228-BBD9-0157E849D07D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Dependencies", "Dependencies", "{0A7E3F1D-5162-463F-BAF8-714C7FD37B8C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IdentityServer4", "dependencies\identityserver4\src\IdentityServer4.csproj", "{3A32B19C-B6FC-4A2D-9421-5A16849B7C2A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IdentityServer4.AspNetIdentity", "dependencies\identityserver4.aspnetidentity\src\IdentityServer4.AspNetIdentity.csproj", "{0E36AE9A-B9B6-4E1C-B446-82A3265432F8}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IdentityServer.Email", "IdentityServer.Email\IdentityServer.Email.csproj", "{BD699934-C404-4CF4-B77C-511E584D1754}"
EndProject
. / IdentityServer / IdentityServer.csproj: https://gist.github.com/paulcsiki/4d3b827af418044dacea0149a2361b81
Вывод dotnet restore
в той же папке, что и решение:
Restore completed in 52.96 ms for /Users/paul/docker/dependencies/identityserver4.aspnetidentity/src/IdentityServer4.AspNetIdentity.csproj.
Restore completed in 52.96 ms for /Users/paul/docker/dependencies/identityserver4/src/IdentityServer4.csproj.
Restore completed in 54.56 ms for /Users/paul/docker/IdentityServer/IdentityServer.csproj.
Restore completed in 52.97 ms for /Users/paul/docker/IdentityServer.Email/IdentityServer.Email.csproj.
Вывод dotnet publish -f netcoreapp2.2 -c Release -o out
в той же папке, что и решение:
Microsoft (R) Build Engine version 15.9.20+g88f5fadfbe for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
Restore completed in 44.29 ms for /Users/paul/docker/dependencies/identityserver4/src/IdentityServer4.csproj.
Restore completed in 44.3 ms for /Users/paul/docker/IdentityServer.Email/IdentityServer.Email.csproj.
Restore completed in 45.91 ms for /Users/paul/docker/IdentityServer/IdentityServer.csproj.
Restore completed in 44.3 ms for /Users/paul/docker/dependencies/identityserver4.aspnetidentity/src/IdentityServer4.AspNetIdentity.csproj.
/Users/paul/.nuget/packages/microsoft.build.tasks.git/1.0.0-beta-63127-02/build/Microsoft.Build.Tasks.Git.targets(20,5): error : Unable to locate repository containing directory '/Users/paul/docker/dependencies/identityserver4/src'. [/Users/paul/docker/dependencies/identityserver4/src/IdentityServer4.csproj]
IdentityServer.Email -> /Users/paul/docker/IdentityServer.Email/bin/Release/netcoreapp2.2/IdentityServer.Email.dll
IdentityServer.Email -> /Users/paul/docker/IdentityServer.Email/bin/Release/netcoreapp2.2/IdentityServer.Email.Views.dll
IdentityServer.Email -> /Users/paul/docker/IdentityServer.Email/out/
Я попытался запустить команду восстановления и публикации из папки WebApp (/ Users / paul / docker / IdentityServer), и она выдает тот же результат.
Выход file /Users/paul/docker/dependencies/identityserver4/src/IdentityServer4.csproj
:
/Users/paul/docker/dependencies/identityserver4/src/IdentityServer4.csproj: exported SGML document text, UTF-8 Unicode (with BOM) text