Issue / Steps to reproduce the problem
Running build.ps1 file inside IdentityServer4/src/IdentityServer4/
This build issue was generated while building IdentityServer4 project independently. i.e. IdentityServer4 project is isolated from other project.
Relevant parts of the log file
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:\IdentityServer4\IdentityServer4\src\IdentityServer4.csproj...
D:\IdentityServer4\IdentityServer4\src\IdentityServer4.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:\IdentityServer4\IdentityServer4\src\IdentityServer4.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:\IdentityServer4\IdentityServer4\src\IdentityServer4.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:\IdentityServer4\IdentityServer4\src\IdentityServer4.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:\IdentityServer4\IdentityServer4\src\IdentityServer4.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:\IdentityServer4\IdentityServer4\src\IdentityServer4.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:\IdentityServer4\IdentityServer4\src\IdentityServer4.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:\IdentityServer4\IdentityServer4\src\IdentityServer4.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:\IdentityServer4\IdentityServer4\src\IdentityServer4.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:\IdentityServer4\IdentityServer4\src\IdentityServer4.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:\IdentityServer4\IdentityServer4\src\IdentityServer4.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:\IdentityServer4\IdentityServer4\src\IdentityServer4.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:\IdentityServer4\IdentityServer4\src\IdentityServer4.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:\IdentityServer4\IdentityServer4\src\IdentityServer4.csproj : error NU1103: Unable to find a stable package Microsoft.SourceLink.GitHub with version
D:\IdentityServer4\IdentityServer4\src\IdentityServer4.csproj : error NU1103: - Found 7 version(s) in nuget.org [ Nearest version: 1.0.0-beta-62905-03 ]
D:\IdentityServer4\IdentityServer4\src\IdentityServer4.csproj : error NU1103: - Found 0 version(s) in Microsoft Visual Studio Offline Packages
D:\IdentityServer4\IdentityServer4\src\IdentityServer4.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:\IdentityServer4\IdentityServer4\src\IdentityServer4.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:\IdentityServer4\IdentityServer4\src\obj\IdentityServer4.csproj.nuget.g.props.
Generating MSBuild file D:\IdentityServer4\IdentityServer4\src\obj\IdentityServer4.csproj.nuget.g.targets.
Restore failed in 946.03 ms for D:\IdentityServer4\IdentityServer4\src\IdentityServer4.csproj.
Build FAILED.
D:\IdentityServer4\IdentityServer4\src\IdentityServer4.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:\IdentityServer4\IdentityServer4\src\IdentityServer4.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:\IdentityServer4\IdentityServer4\src\IdentityServer4.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:\IdentityServer4\IdentityServer4\src\IdentityServer4.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:\IdentityServer4\IdentityServer4\src\IdentityServer4.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:\IdentityServer4\IdentityServer4\src\IdentityServer4.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:\IdentityServer4\IdentityServer4\src\IdentityServer4.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:\IdentityServer4\IdentityServer4\src\IdentityServer4.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:\IdentityServer4\IdentityServer4\src\IdentityServer4.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:\IdentityServer4\IdentityServer4\src\IdentityServer4.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:\IdentityServer4\IdentityServer4\src\IdentityServer4.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:\IdentityServer4\IdentityServer4\src\IdentityServer4.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:\IdentityServer4\IdentityServer4\src\IdentityServer4.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:\IdentityServer4\IdentityServer4\src\IdentityServer4.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:\IdentityServer4\IdentityServer4\src\IdentityServer4.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:\IdentityServer4\IdentityServer4\src\IdentityServer4.csproj : error NU1103: Unable to find a stable package Microsoft.SourceLink.GitHub with version
D:\IdentityServer4\IdentityServer4\src\IdentityServer4.csproj : error NU1103: - Found 7 version(s) in nuget.org [ Nearest version: 1.0.0-beta-62905-03 ]
D:\IdentityServer4\IdentityServer4\src\IdentityServer4.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).
How can is solve this issue?
I solved this by removing this package reference in IdentityServer4/src/IdentityServer4/src/IdentityServer4.csproj:
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
Related
dependencies {
implementation("com.android.support:appcompat-v7:28.0.0")
implementation("com.android.support.constraint:constraint-layout:2.0.4")
implementation("com.android.support:design:28.0.0")
testImplementation("junit:junit:4.+")
androidTestImplementation("com.android.support.test:runner:1.0.2")
androidTestImplementation("com.android.support.test.espresso:espresso-core:3.0.2")
implementation("com.google.android.material:material:1.4.0-alpha02")
}
When I added the last line in the dependencies the first and third line says error and it says that
"
Dependencies using groupId com.android.support and androidx.* can not be combined but found com.android.support:design:28.0.0 and androidx.constraintlayout:constraintlayout:2.0.1 incompatible dependencies"
Please help me I am a beginner...
Android libraries used to be standalone, generally under the com.android.support name. The latest effort to organize those dependencies is called Jetpack. Jetpack introduced new code, package name and implementation, referred as Android X.
There are then, "support" (pre-X) and "AndroidX" dependencies. If your project is new, you should be starting with AndroidX out of the box. Otherwise you can migrate to it.
In your case your dependencies com.android.support:design and com.google.android.material are the same library, in its "support" and "AndroidX" form. Also com.android.support.test.espresso:.. became androidx.test.espresso:....
Check your project's gradle.properties for android.useAndroidX=true` to see if you're on an AndroidX project or not. Then use the proper dependencies.
Check https://developer.android.com/jetpack/androidx/migrate/artifact-mappings
This use case might be a bit off-label, but I'm hoping someone can help me...
For a number of years I've maintained a "library" of MSBuild commands -- in a file we'll call CommonTasks.targets, distributed through our internal NuGet server -- that handles various tasks needed by my company's projects. For the last few years I've utilized GitVersion v3 with it, both for generating the library's own NuGet package version numbers as well as utilizing GitVersion's GetVersion MSBuild target directly (e.g., when generating a corresponding git tag), to avoid needing to extract the GitVersion-generated version from the dependent project's assembly, post-build.
Previously (with GitVersion v3), all that was required was for my CommonTasks.targets file to import the GitVersionTask.targets file located in GitVersion's NuGet package at \build\dotnet\GitVersionTasks.targets. This targets file in turn executed the necessary UsingTask commands (particularly GitVersionTask.GetVersion) which then let me call <GetVersion ...> in my own .targets file after the import.
With v4, GitVersionTask has introduced a dependency on UtilPack.NuGet.MSBuild (which I gather helps with various NuGet commands). To start with, that meant that I needed to import its UtilPack.NuGet.MSBuild.props file, or GitVersionTask wouldn't load at all. However, having done that, I now get unexpected errors attempting to call GetVersion from within an MSBuild file. Seemingly, the GetVersion target now attempts to query all my defined NuGet repositories (nuget.org, local caches, our company server, etc.) for the packaged version of my library, and at the end I'm greeted with this error:
MSBUILD : NuGetTaskRunnerFactory error NR0001: [NuGet Error]: Unable to find package CommonTasks with version
(>= 1.37.0-gitversiontask4-0001) [C:\redacted\CommonTasks\Build.proj]
MSBUILD : NuGetTaskRunnerFactory error NR0001: - Found 108 version(s) in Source1 [ Nearest version: 1.36.3 ] [C:\redacted\CommonTasks\Build.proj]
MSBUILD : NuGetTaskRunnerFactory error NR0001: - Found 42 version(s) in Source2 [ Nearest version: 1.36.3 ] [C:\redacted\CommonTasks\Build.proj]
MSBUILD : NuGetTaskRunnerFactory error NR0001: - Found 0 version(s) in Microsoft Visual Studio Offline Packages [C:\redacted\CommonTasks\Build.proj]
MSBUILD : NuGetTaskRunnerFactory error NR0001: - Found 0 version(s) in nuget.org [C:\redacted\CommonTasks\Build.proj]
MSBUILD : Task factory error NMSBT003: Failed to find main package CommonTasks#. [C:\redacted\CommonTasks\Build.proj(47,9): error MSB4175: The task factory "Ut
ilPack.NuGet.MSBuild.NuGetTaskRunnerFactory" could not be loaded from the assembly "C:\redacted\CommonTasks\packages\UtilPack.NuGet.MSBuild.2.7.0\build\\net46\UtilPack.NuGet.MSBuild.dll". Object ref
erence not set to an instance of an object.
What I don't get is why it's attempting NuGet retrievals at all, and, even if that's the new default behavior, I don't know a way to disable that, or barring that, I don't know why it's not working. I assume the error must have something to do with this not being a normal .NET project (i.e., with no source code aside from a .targets file, no .csproj file, etc.). But my library is used by many normal .NET projects, which themselves use GitVersionTask to auto-version their assemblies.
For now I've pinned my library to GitVersionTask v3, but would very much like to figure out how to allow it to use v4 as I'd been using v3 previously. I could likely switch to using the GitVersion.CommandLine package instead, and parsing its output, but I ultimately do need these GitVersion-generated versions as MSBuild properties in order to use them as intended. And with dependent projects also using GitVersionTask (not the CLI), it's convenient to be able to use a single package for both.
Is there a way to fix what I'm doing with GitVersionTask v4, or some completely different (perhaps more elegant) way to achieve what I'm trying to do?
Update: see the self-answer. The issue seems to be with Maven import or some sort of corruption of a module's settings after the import.
I have a very large multi-module Maven IntelliJ project with 3 separate roots.
I am building the whole project in preparation to commit.
I am getting the following error from IntelliJ 2017.2.3 Ultimate:
Information:Eclipse compiler 4.6.2 was used to compile java sources
...
Error:java: Target level '1.5' is incompatible with source level '1.8'. A target level '1.8' or better is required
None of the code is supposed to compile with Java 5, it's all Java 8.
The project is configured with JDK 1.8
Maven's maven-compiler-plugin is already configured to use version 1.8 of Java as explained here.
2 questions:
What causes this? Is it a known bug with IntelliJ?
How do I find out which module of the 100 or so modules in the project is the one causing the issue?
I was getting this for a few maven modules in my project, I could get rid of this by updating the .iml files under those modules by changing the following entry to 1.8-
<orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" /
When trying to build a solution developed in VS2010, I get the following error in one of the subprojects that depends on a DLL built by another project in the solution, though it seems to have all the project references correctly interpreted by Xamarin Studio (v5.7.0).
/path/to/failing/project/myproject.csproj (Build) ->
/Library/Frameworks/Mono.framework/Versions/3.12.0/lib/mono/4.5/Microsoft.Common.targets (ResolveAssemblyReferences target) ->
/Library/Frameworks/Mono.framework/Versions/3.12.0/lib/mono/4.5/Microsoft.Common.targets: warning : Reference '/path/to/successful/parent/project/library/bin/ReleaseMac//mylibrary.dll' not resolved
After this error, there are subsequent compilation errors like:
The type or namespace name 'MyLibrary' could not be found. Are you missing an assembly reference?
These are presumably related to the fact that the DLL that did not resolve correctly contains that namespace.
Might this also be related to Xamarin not resolving references correctly?
I'm trying to build my project using IntelliJ and gradle. I have a dependency on oozie-client jar.
I defined the dependency in gradle as follows:
dependencies {
compile 'com.yahoo.oozie:oozie-core:3.0.0'
}
when I run buildDependency I get the following error:
* What went wrong:
Could not resolve all dependencies for configuration ':compile'.
Could not resolve com.yahoo.oozie:oozie-core:3.0.0.
Required by:
:TestRunnerFramework:1.0
Could not resolve com.yahoo.oozie:oozie-core:3.0.0.
Could not parse POM http://repo1.maven.org/maven2/com/yahoo/oozie/oozie-core/3.0.0/oozie-core-3.0.0.pom
Could not find any version that matches com.yahoo.oozie:oozie-main:3.0.0.
please advice,
This is either an incorrect POM (or incorrect parent POM), or a POM that Gradle fails to interpret correctly (there are a few known limitations around this). Often, the only solution is to edit the POM, for example in your binary artifact repository. If you think the problem is on Gradle's side, you can file an issue over at http://forums.gradle.org.