locked
InvalidProjectFileException: Cycle in target dependencies detected.Build failed RRS feed

  • Question

  • User274782 posted

    Here is error message:

    /Project/DASSolutionFinder/Droid/DASSolutionFinder.Droid.csproj (Build) ->: error : Error building target XamarinAndroidBuildAarProguardConfigs: Microsoft.Build.BuildEngine.InvalidProjectFileException: Cycle in target dependencies detected at Microsoft.Build.BuildEngine.Target.BuildOtherTargets (System.Collections.Generic.IEnumerable1[T] targetNames, System.Action1[T] missingtarget, System.Boolean& executeOnErrors) [0x00065] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Target.cs:263 at Microsoft.Build.BuildEngine.Target.BuildDependencies (System.Boolean& executeOnErrors) [0x0003f] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Target.cs:211 at Microsoft.Build.BuildEngine.Target.BuildActual (System.String builttargetskey, System.Boolean& executeOnErrors) [0x00091] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Target.cs:177

    what should I do ?

    Sunday, July 2, 2017 3:21 PM

Answers

  • User334301 posted

    Try to downgrade the package Xamarin.Build.Download to version 0.4.5, it worked for me (I had previously version 0.4.6 installed and had the same error).

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Monday, July 3, 2017 10:52 AM

All replies

  • User36998 posted

    Got the same one, can't build Android. Tried Stable, beta and Alpha channels...

    Monday, July 3, 2017 12:12 AM
  • User334301 posted

    Try to downgrade the package Xamarin.Build.Download to version 0.4.5, it worked for me (I had previously version 0.4.6 installed and had the same error).

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Monday, July 3, 2017 10:52 AM
  • User246261 posted

    @seb987 said: Try to downgrade the package Xamarin.Build.Download to version 0.4.5, it worked for me (I had previously version 0.4.6 installed and had the same error).

    Doesn't work even after downgrading the Xamarin.Build.Download to version 0.4.5

    Tuesday, July 4, 2017 5:24 PM
  • User246261 posted

    Any other way to solve this issue?

    Tuesday, July 4, 2017 5:25 PM
  • User224448 posted

    Try to downgrade the package Xamarin.Build.Download to version 0.4.5, it worked for me (I had previously version 0.4.6 installed and had the same error).

    The above solution is not working.

    Any other way to solve this issue?

    Wednesday, July 5, 2017 9:53 AM
  • User334301 posted

    @vijaykr and @Yogi21 : Are you expecting the same error even after downgrading ? Please provide us your packages.config file's content to help debug your issue.

    Wednesday, July 5, 2017 2:07 PM
  • User224448 posted

    @seb987

    Please find my package config file. Please help me to sort out this issue.

    Wednesday, July 5, 2017 2:26 PM
  • User334301 posted

    @Yogi21 : I created a new Xamarin.Forms project with your packages.config and everything is building fine. Have you tried to clean and build your app ? What is your error message now ?

    Wednesday, July 5, 2017 2:48 PM
  • User224448 posted

    @seb987

    I tried to clean and rebuild the project and also I did deleted bin and obj Folder and tried the same. But the result is same. Please find the below error details.

    Error: Error building target XamarinAndroidBuildAarProguardConfigs: Microsoft.Build.BuildEngine.InvalidProjectFileException: Cycle in target dependencies detected at Microsoft.Build.BuildEngine.Target.BuildOtherTargets (System.Collections.Generic.IEnumerable1[T] targetNames, System.Action1[T] missingtarget, System.Boolean& executeOnErrors) [0x00065] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Target.cs:263 at Microsoft.Build.BuildEngine.Target.BuildDependencies (System.Boolean& executeOnErrors) [0x0003f] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Target.cs:211 at Microsoft.Build.BuildEngine.Target.BuildActual (System.String builttargetskey, System.Boolean& executeOnErrors) [0x00091] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Target.cs:177

    Wednesday, July 5, 2017 2:57 PM
  • User131129 posted

    @Yogi21

    Downgrade to Xamarin.Build.Download.0.4.5

    1. Delete Packages\Xamarin.Build.Download.0.4.6 folder in solution.
    2. Enable Multidex in Android build options.
    3. And try rebuilding. It will work
    Thursday, July 6, 2017 7:20 AM
  • User224448 posted

    @Sriman

    Thanks Man. Now Worked I followed point no 1 and tried to rebuild the app and the problem is solved

    Thursday, July 6, 2017 8:15 AM
  • User270512 posted

    Downgrade to 0.4.5 worked for me. Thanks!

    I was having issues in Azure Mobile Center after updating the Android project to API 25

    Friday, July 14, 2017 11:30 PM
  • User73826 posted

    Downgrade to 0.4.5 worked for me too. I don't understand how these things can be possible... :neutral:

    Tuesday, July 18, 2017 11:36 AM
  • User240159 posted

    @DavidOrtinau any comment on it? I also had to downgrade Xamarin.Build.Download from 0.4.6 to 0.4.5, because of this issue.

    Friday, July 28, 2017 9:01 AM
  • User44363 posted

    Does anyone have a solution which reproduces this issue they could share?

    I'm currently unable to reproduce this on my end, but we've seen it a couple of places and would love to get to the bottom of it.

    Monday, July 31, 2017 2:18 PM
  • User44363 posted

    Can those of you experiencing this issue please try the pre-release of Xamarin.Build.Download 0.4.7-rc1 which should address the bug.

    https://preview.nuget.org/packages/Xamarin.Build.Download/0.4.7-rc1

    Wednesday, August 9, 2017 6:48 PM
  • User26128 posted

    Looks like it fixed. My project builded with 0.4.7-rc1 successful. I had build error with 0.4.6

    Thursday, August 10, 2017 8:51 AM
  • User240159 posted

    Same for me - working fine at 0.4.7-rc1 (while there was an issue at 0.4.6) :+1:

    Thursday, August 10, 2017 11:48 AM
  • User45240 posted

    This is working now, thanks!

    Friday, August 11, 2017 8:35 PM
  • User29221 posted

    Updated from 0.4.6 to 0.4.7 and it's work

    Monday, September 4, 2017 10:18 AM
  • User272231 posted

    Hi All,

    I faced the same issue, In my case after configuring the package to 0.4.5 I was still facing the same issue, I cleaned the project folder, deleted bin and obj folder nothing solved.

    Updated from 0.4.6 to 0.4.7 and it's work. Thanks all

    Thursday, September 14, 2017 3:34 AM
  • User159980 posted

    @YogeswaranSivagurunathan said: Hi All,

    I faced the same issue, In my case after configuring the package to 0.4.5 I was still facing the same issue, I cleaned the project folder, deleted bin and obj folder nothing solved.

    Updated from 0.4.6 to 0.4.7 and it's work. Thanks all

    This is what solve my issue

    Friday, September 29, 2017 10:25 PM
  • User319386 posted

    @JonathanDick I have a compressed project directory where I can reproduce this, which is using the latest stable Xamarin (as of today.) Also was reproducible with Xamarin from a few days ago (stable channel.)

    Thursday, November 16, 2017 4:18 AM
  • User175020 posted

    I today updated Xamarin.Build.Download from 0.4.5 to 0.4.7 but still get the error above.

    Multidex in Android build options is enabled.

    Thursday, January 11, 2018 7:08 AM
  • User392 posted

    I get this error too and I already have 0.4.7 of Xamarin.Build.Download

    Thursday, January 11, 2018 10:53 PM
  • User392 posted

    I tried several things. I was able to determine that building within Visual Studio for Mac WORKS, but using xbuild on the command line fails. The xbuild command line gives a deprecation warning and says to switch to msbuild. I tried msbuild and it WORKED.

    Thursday, January 11, 2018 11:38 PM