#msbuild #identityserver4
#msbuild #identityserver4
Вопрос:
Проблема / Шаги для воспроизведения проблемы
Запуск файла build.ps1 внутри IdentityServer4 /src/IdentityServer4/
Эта проблема со сборкой возникла при независимой сборке IdentityServer4
проекта. т.е. проект IdentityServer4 изолирован от другого проекта.
Соответствующие части файла журнала
Using global .NET SDK
----------------------------------------
Setup
----------------------------------------
branch : master
pre-release label :
version : 0.1.0.0
version suffix :
informational : 0.1.0 1.Branch.master.Sha.e333ebb1284752e0e62ed4e9637961dce3aac501
========================================
Clean
========================================
========================================
Build
========================================
Microsoft (R) Build Engine version 15.9.20 g88f5fadfbe for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
Restoring packages for D:IdentityServer4IdentityServer4srcIdentityServer4.csproj...
D:IdentityServer4IdentityServer4srcIdentityServer4.csproj : warning NU1604: Project dependency IdentityModel does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results.
D:IdentityServer4IdentityServer4srcIdentityServer4.csproj : warning NU1604: Project dependency IdentityServer4.Storage does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results.
D:IdentityServer4IdentityServer4srcIdentityServer4.csproj : warning NU1604: Project dependency Microsoft.AspNetCore.Authentication does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results.
D:IdentityServer4IdentityServer4srcIdentityServer4.csproj : warning NU1604: Project dependency Microsoft.AspNetCore.Authentication.Cookies does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results.
D:IdentityServer4IdentityServer4srcIdentityServer4.csproj : warning NU1604: Project dependency Microsoft.AspNetCore.Authentication.OpenIdConnect does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results.
D:IdentityServer4IdentityServer4srcIdentityServer4.csproj : warning NU1604: Project dependency Microsoft.AspNetCore.Authorization does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results.
D:IdentityServer4IdentityServer4srcIdentityServer4.csproj : warning NU1604: Project dependency Microsoft.AspNetCore.Cors does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results.
D:IdentityServer4IdentityServer4srcIdentityServer4.csproj : warning NU1604: Project dependency Microsoft.Extensions.Caching.Memory does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results.
D:IdentityServer4IdentityServer4srcIdentityServer4.csproj : warning NU1604: Project dependency Microsoft.Extensions.Logging does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results.
D:IdentityServer4IdentityServer4srcIdentityServer4.csproj : warning NU1604: Project dependency Microsoft.Extensions.Options.ConfigurationExtensions does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results.
D:IdentityServer4IdentityServer4srcIdentityServer4.csproj : warning NU1604: Project dependency Microsoft.SourceLink.GitHub does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results.
D:IdentityServer4IdentityServer4srcIdentityServer4.csproj : warning NU1604: Project dependency System.IdentityModel.Tokens.Jwt does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results.
D:IdentityServer4IdentityServer4srcIdentityServer4.csproj : warning NU1604: Project dependency System.Security.Cryptography.Cng does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results.
D:IdentityServer4IdentityServer4srcIdentityServer4.csproj : error NU1103: Unable to find a stable package Microsoft.SourceLink.GitHub with version
D:IdentityServer4IdentityServer4srcIdentityServer4.csproj : error NU1103: - Found 7 version(s) in nuget.org [ Nearest version: 1.0.0-beta-62905-03 ]
D:IdentityServer4IdentityServer4srcIdentityServer4.csproj : error NU1103: - Found 0 version(s) in Microsoft Visual Studio Offline Packages
D:IdentityServer4IdentityServer4srcIdentityServer4.csproj : warning NU1701: Package 'IdentityModel 1.0.0' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project.
D:IdentityServer4IdentityServer4srcIdentityServer4.csproj : warning NU1701: Package 'System.IdentityModel.Tokens.Jwt 1.0.0' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project.
Generating MSBuild file D:IdentityServer4IdentityServer4srcobjIdentityServer4.csproj.nuget.g.props.
Generating MSBuild file D:IdentityServer4IdentityServer4srcobjIdentityServer4.csproj.nuget.g.targets.
Restore failed in 946.03 ms for D:IdentityServer4IdentityServer4srcIdentityServer4.csproj.
Build FAILED.
D:IdentityServer4IdentityServer4srcIdentityServer4.csproj : warning NU1604: Project dependency IdentityModel does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results.
D:IdentityServer4IdentityServer4srcIdentityServer4.csproj : warning NU1604: Project dependency IdentityServer4.Storage does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results.
D:IdentityServer4IdentityServer4srcIdentityServer4.csproj : warning NU1604: Project dependency Microsoft.AspNetCore.Authentication does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results.
D:IdentityServer4IdentityServer4srcIdentityServer4.csproj : warning NU1604: Project dependency Microsoft.AspNetCore.Authentication.Cookies does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results.
D:IdentityServer4IdentityServer4srcIdentityServer4.csproj : warning NU1604: Project dependency Microsoft.AspNetCore.Authentication.OpenIdConnect does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results.
D:IdentityServer4IdentityServer4srcIdentityServer4.csproj : warning NU1604: Project dependency Microsoft.AspNetCore.Authorization does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results.
D:IdentityServer4IdentityServer4srcIdentityServer4.csproj : warning NU1604: Project dependency Microsoft.AspNetCore.Cors does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results.
D:IdentityServer4IdentityServer4srcIdentityServer4.csproj : warning NU1604: Project dependency Microsoft.Extensions.Caching.Memory does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results.
D:IdentityServer4IdentityServer4srcIdentityServer4.csproj : warning NU1604: Project dependency Microsoft.Extensions.Logging does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results.
D:IdentityServer4IdentityServer4srcIdentityServer4.csproj : warning NU1604: Project dependency Microsoft.Extensions.Options.ConfigurationExtensions does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results.
D:IdentityServer4IdentityServer4srcIdentityServer4.csproj : warning NU1604: Project dependency Microsoft.SourceLink.GitHub does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results.
D:IdentityServer4IdentityServer4srcIdentityServer4.csproj : warning NU1604: Project dependency System.IdentityModel.Tokens.Jwt does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results.
D:IdentityServer4IdentityServer4srcIdentityServer4.csproj : warning NU1604: Project dependency System.Security.Cryptography.Cng does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results.
D:IdentityServer4IdentityServer4srcIdentityServer4.csproj : warning NU1701: Package 'IdentityModel 1.0.0' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project.
D:IdentityServer4IdentityServer4srcIdentityServer4.csproj : warning NU1701: Package 'System.IdentityModel.Tokens.Jwt 1.0.0' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project.
D:IdentityServer4IdentityServer4srcIdentityServer4.csproj : error NU1103: Unable to find a stable package Microsoft.SourceLink.GitHub with version
D:IdentityServer4IdentityServer4srcIdentityServer4.csproj : error NU1103: - Found 7 version(s) in nuget.org [ Nearest version: 1.0.0-beta-62905-03 ]
D:IdentityServer4IdentityServer4srcIdentityServer4.csproj : error NU1103: - Found 0 version(s) in Microsoft Visual Studio Offline Packages
15 Warning(s)
1 Error(s)
Time Elapsed 00:00:01.48
An error occurred when executing task 'Build'.
Error: One or more errors occurred. (.NET Core CLI: Process returned an error (exit code 1).)
.NET Core CLI: Process returned an error (exit code 1).
Как можно решить эту проблему?
Ответ №1:
Я решил это, удалив ссылку на этот пакет в IdentityServer4 / src / IdentityServer4 /src /IdentityServer4.csproj:
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />