Xamarin.Forms.2.3.4.247 update : project won't build

2»

Posts

  • DougKeithDougKeith USUniversity ✭✭

    @MarcoRinaldi said:
    Hello.
    Closing visual studio and deleting ALL "bin" and "obj" folders has solved the problem for me.
    I'm using a Shared Project.

    Best regard,
    Marco

    +1. Thank you, Marco.

  • TienDinhTienDinh AUMember
    edited June 2017

    I had the same issue so i did the following to resolve
    1. Build > Clean All
    2. Right click on each project from the solution panel, select Tools then Edit File. This will open the csproj file as text
    3. Find all lines with Xamarin and ensure that it use version 2.3.4.247.
    4. File > Close Solution
    5. File > Close (make sure that Visual Studio is completely shutdown)
    6. Open Finder and remove all bin and obj folder from each of your project
    7. Open your solution and rebuild

  • Joe.6582Joe.6582 USMember
    edited June 2017

    The most important bit for me was in Stephane's instructions was:

    "...if I have more than one XF nuget package installed in packages/, that means there's still a reference."

    1. Update all Xamarin Forms packages to latest (stable latest in my case).
    2. With the solution open, Clean it.
    3. Close the solution and close Visual Studio.
    4. Delete all bin and obj folders in your solution. (If you're on a Mac, you can use this Automator script to add a "Remove bin and obj folders" context action in the OS X Finder: http://www.joesauve.com/remove-obj-and-bin-folders-via-os-x-finder/)
    5. Delete your packages/ folder.
    6. Re-open Visual Studio and your solution.
    7. Allow the packages to be restored (automatic on solution-open in VS for Mac)
    8. Observe your packages/ folder. If you see Xamarin.Forms.* folders with more than one version number, then you still have references in your solution (SOMEWHERE) to an older version of Forms.
    9. Use the "Find in Files" feature of VS to search the entire solution folder for the erroneous version number. (In my case it was "2.3.3.152"). You'll probably find instances of that in files like project.json and packages.config.
    10. Delete all references to those erroneous versions of Forms. (You may need some familiarity with packages.config and project.json to this without messing anything up, but it's not too hard.
    11. For safe measure, again Clean the solution, close it, delete bin and obj folders, and delete packages/ folder.
    12. Open the solution again and allow the IDE to restore packages. You should be able to build now.

    I was seeing the dreaded The "DebugType" parameter is not supported by the "XamlCTask" task. But now all is well.

  • WindyhenWindyhen USMember ✭✭

    @LRLin56 said:
    I rollback Xamarin.Forms to version 2.3.4.231, then the error is gone.

    Waste too much time on it.

    this is what i did, i guess i'll stay with 2.3.4.231 for a while

  • KyleJadekeKyleJadeke USUniversity

    I had the same problem, I fixed it by following these steps...
    1. Verifying that all of my projects had the same version of Xamarin.Forms. (It turned out that I had updated it in my PCL but not in my iOS project).
    2. Close Visual Studio
    3. Delete the bin and obj folders for your PCL, iOS, and Android projects
    4. Also Delete your packages folder (to get rid of the multiple copies of Xamarin.Forms)
    5. Reopen Visual Studio and Build

  • millos21millos21 USMember

    @YuriShteinman said:
    exit VS, delete all obj and bin folders, run VS and build. That fixed it for me.

    I did the same thing to my Android project and it worked.

  • LarryKenobiLarryKenobi USMember ✭✭

    Deleting the bin/obj folders and restarting vs works, not editing the target files for me. However this bug quickly returns and restarting VS every time is not an ideal solution.

  • JamesMontemagnoJamesMontemagno USForum Administrator, Xamarin Team, Developer Group Leader Xamurai

    So, this one actually has to do more with NuGet and perhaps not removing and updating the csproj file correctly.

    For instance I updated to 2.3.4.247 from an older version and NuGet didn't know how to upgrade and left old busted imports around. Sooo, unload your projects and look into the bottom of all the csproj files for things that aren't correct.

    For instance I had these two lines:

     <Import Project="..\packages\Xamarin.Forms.2.0.1.6492-pre1\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets" Condition="Exists('..\packages\Xamarin.Forms.2.0.1.6492-pre1\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" />
    <Import Project="..\packages\Xamarin.Forms.2.3.4.247\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets" Condition="Exists('..\packages\Xamarin.Forms.2.3.4.247\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets')" />
    

    I removed the old 2.0.1 one from the csproj. I had to close VS and re-open and it worked just fine then.

  • wiriwiri USMember

    @JamesMontemagno said:
    So, this one actually has to do more with NuGet and perhaps not removing and updating the csproj file correctly.

    For instance I updated to 2.3.4.247 from an older version and NuGet didn't know how to upgrade and left old busted imports around. Sooo, unload your projects and look into the bottom of all the csproj files for things that aren't correct.

    For instance I had these two lines:

     <Import Project="..\packages\Xamarin.Forms.2.0.1.6492-pre1\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets" Condition="Exists('..\packages\Xamarin.Forms.2.0.1.6492-pre1\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" />
    <Import Project="..\packages\Xamarin.Forms.2.3.4.247\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets" Condition="Exists('..\packages\Xamarin.Forms.2.3.4.247\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets')" />
    

    I removed the old 2.0.1 one from the csproj. I had to close VS and re-open and it worked just fine then.

    I have the same problem but no old imports in my csproj files :'(

  • TonyMelonyTonyMelony USMember
    edited June 2017

    This thread contains a lot of workarounds but no solution:

    • Restart VS: Yes I it works but if you need a bunch of work done, restarting applications is not very productive
    • Remove bin and object files: If this is the problem, why didn't do the Xamarin Build tools that for me?
    • Install the latest Xamarin update. Yes good idea, and multiply your problems with other problems from new updates.

    Xamarin drives me frequently crazy, every update has its own specific build problems. There is really never been a Xamarin release that let you run and debug without problems.

    Serious guys, this is again a sloppy work of the Xamarin team. Why can't they get this stuff stable. Why don't we all complain a little harder.

    My solution: Restart VS and rebuild. Then you have for a short time no problem. But it re-appears soon. And if you want to be busy with starting and closing applications and moving and deleting files it is a great solution. But if you want to deliver, IT DOESN'T HELP A BIT!

  • DavidOrtinauDavidOrtinau USForum Administrator, Xamarin Team, Insider, University Xamurai

    @TonyMelony it re-appears?! Can you share your project so we can look into that?

    Share it on this issue or you could email me directly and we can work something out. [email protected]

    https://bugzilla.xamarin.com/show_bug.cgi?id=56640

  • mejiandresmejiandres USMember ✭✭

    Hi, maybe it is an issue with the version of your android's SDK. Taking into account that the latest plugins and libraries are compiled against later APIs I've managed to solve this problem by updating the Android SDK (or downloading) to API 25 and then setting the project's compiler to target that API. Also it's advisable to restart the IDE (VS or Xamarin studio)

    Hope it helps

  • RobertDurfeeRobertDurfee USMember ✭✭
    edited July 2017

    @DavidOrtinau said:
    @TonyMelony it re-appears?! Can you share your project so we can look into that?

    Share it on this issue or you could email me directly and we can work something out. [email protected]

    https://bugzilla.xamarin.com/show_bug.cgi?id=56640

    Yes, the problem reappears - restarting visual studio and deleting the bin/obj files only fixes it temporarily. The problem ALWAYS comes back. It seems to rear its head if I switch between Local Machine and Remote Machine when debugging UWP.

    I only have one Xamarin Forms folder in my packages folder, 2.3.5-pre6.

    The UWP csproj file format seems to be different than the iOS and Android. The references are different and it doesn't have the Imports entries.

    This issue, combined with Visual Studio locking up because it's "busy" when loading the solution*, is causing a lot of frustration for me today. I'm going to try removing the DebugType parameter from the targets file next.

    *To fix this, I have to end the task and delete the .suo file from the v15 folder. Ugh.

  • tafftaff USMember ✭✭

    Any plans to fix this issue? I'm still getting it and while restarting VS and cleaning the solution is a workaround, its a major pain when you have a large solution that takes a while to open and you're 'mid flow' and dont want to stop to restart becuase of this bug...

    1. Uninstall Xamarin.forms dll from the solution
    2. Delete bin and obj folders.
    3. Reinstall the Xamarin.forms dll.
    4. Rebuild the solution.
      This worked for me
  • TangoGrowlerTangoGrowler USMember ✭✭

    Same issue here. Go to "Manage Nuget packages for Solution" and ensure all Xamarin.Forms versions are the same from there - fixed for me

  • smhasansmhasan KWMember ✭✭
    edited August 2017

    Just upgrading Xamarin.forms from NuGet for Forms, Android and iOS, it works fine

  • RenaudLaloireRenaudLaloire BEUniversity ✭✭
    edited August 2017

    Same here, upgrading all projects to XForms 2.3.4.267 resolve the issue.

  • LyndonHugheyLyndonHughey USUniversity ✭✭✭

    I ran into this issue today with a netstandard 1.4 forms project. Cleaning the obj and bin folders resolved the issue.

  • JamilAttarJamilAttar SEMember

    For me it was only to select the right project from the Solution Explorer then run.
    This error may happen when you have class libraries included in your "solution"

  • ThinkerSabraThinkerSabra USMember ✭✭

    Hi all,

    Here's what solved it for me -
    - In the Configuration Manager (VS 2017 in the "Debug" drop-down aka Solutions Configuration), I deselected the "Build" check mark for the iOS project.

    Keep in mind, I have not yet connected a Mac agent so I have not yet deployed my app to an iPhone Simulator or an iPhone. My guess is that, once I do, I will be able to check the "Build" for the iOS project and will not receive the error.

    Still not sure the primary cause of the error, as I see it is happening to various people for various reasons, but we should not have to clean / delete bin & obj / restart VS to solve this problem.

  • chetszotchetszot PLMember ✭✭

    Hello

    I have updated today from 2.3.4.231 to 2.3.4.270 and for each project in my solution referencing Xamarin.Forms I have build error:

    'The "DebugType" parameter is not supported by the "XamlCTask" task. Verify the parameter exists on the task, and it is a settable public instance property.'

    I have tried all of your suggestions posted here, that is:

    • all solution projects references only 2.3.4.270 version (manually deleted packages directory had reverted only 2.3.4.270 Forms version by NuGet)
    • multiple VS restarting
    • manually removing all bin and obj folders from all solution projects

    Error still persists. Any ideas? I honestly always face different problems when updating to ANY Forms release after 2.3.4.231, which is the last version which works for me.

    Regards
    Maciek

  • FilipLarssonFilipLarsson SEMember ✭✭
    edited September 2017

    Same issue as chetszot. I updated from 247 to 270. It does not help to restart, clean, remove obj/bin.

    It works for Android on my PC, but not for iOS on my MacBook...

    Edit: Downgraded to 267 and it worked for iOS again.

  • MuhammadhamzaMuhammadhamza USMember ✭✭

    there is maybe two instance opened of visual studio, and one of them is already in debugging the x application.

  • RotimiOduRotimiOdu USMember

    Xamarin forms is the WORST thing that has ever happened to me in my programming career. I have never had this kind of frustrating issues while trying to work with other frameworks. And for God's sake this is Microsoft, can't anyone just find a lasting solution to this useless beast that .NET has delivered unto us? Starting from simply creating a fresh page whose boiler template crashes. Yet awa Microsoft people are still looking at the useless thing and it has even gotten to the stage where we now have to start checking out blogs on how to fix the BULLSHIT boiler plate that is automatically generated with FOOLISH errors in it. Can't something ever work for God's sake in this thing? Now we have another stupid issue and the only thing they have to say is that we should delete bin and obj folders and reopen visual studio, or edit Xamarin.Forms.Target document, commenting one line of the useless crap that they gave us themselves which is still not a guaranty that the IDIOT would work. Meehn... i would continue to pray that u guys would get it right one day though, but as for me, this is where I depart from this useless .NET MONSTER

  • bradmbradm AUMember ✭✭✭

    @RotimiOdu said:
    Xamarin forms is the WORST thing that has ever happened to me in my programming career.....

    Odd, Xamarin Forms is one of the best things that has ever happened to me in my programming career. As for frustrating issues, sure it has a few but its all OS so you can take a look inside and see what is happing. Plus the community (yourself excluded) is generally super handy towards each other and to helping the Xamarin team resolve any issues.

    Maybe the problem isn't forms, maybe its you? :D

  • @JakeAnstey said:
    Solved for me: Restarted my Visual Studio and rebuilt.

    This worked for me.

  • AngYiYangAngYiYang MYMember ✭✭

    Previously, above solutions works for me. But today everything does not work, at the end I solved it by unplugging my Android device from USB port and replug again

  • ayaahmed2017ayaahmed2017 EGMember ✭✭

    @ChrisRzepa really really i spent more time to resolve it thanks
    جزاك الله كل خير :)

  • markokstatemarkokstate USMember

    Setting this up in CI is impossible, don't have the ability to just restart and clean. Keeps messing up in the cloud with the SAME error :(

  • DeepakDYDeepakDY INMember ✭✭✭

    Colse visual studio and delete obj and bin for all project(Portable,Android,Ios,UWP)

    after open project clean and rebuild.

    Its work for me

  • BobbyFARUQIBobbyFARUQI USMember ✭✭

    updating project to use Xamarin.Form v2.5.0.121934 worked for me

  • CarlosScarattiCarlosScaratti USMember ✭✭

    @AnthonyWaters.7746 said:

    @JakeAnstey said:
    Solved for me: Restarted my Visual Studio and rebuilt.

    This worked for me.

    For me too

  • Ashok_AAshok_A INMember ✭✭

    Delete packages and bin, obj for PCL and Droid. open project -> Clean -> Rebuild solution

  • amirvenusamirvenus USMember ✭✭✭

    I ran into this problem after updating to XF 3.

    What worked for me was deleting contents of obj folder in both iOS and Android folder and restarting the VS for Mac

  • princepotemkinprincepotemkin Member ✭✭

    This Xamarin excrement is unbelievably bad. Come back DEC - all is forgiven. Your managers may have been completely useless dumb numbskull tarts but at least your hardware and software worked ...

  • akadamakadam USMember ✭✭

    @princepotemkin said:
    This Xamarin excrement is unbelievably bad. Come back DEC - all is forgiven. Your managers may have been completely useless dumb numbskull tarts but at least your hardware and software worked ...

    This very constructive reply made me realise that it has been quite some time since I did not have problems compiling and/or debugging XF apps, recent versions are waaaaaaaay more reliable than XF used to be, thumbs up.

  • bradmbradm AUMember ✭✭✭

    Same, and the improvements that came in 3.5 are amazing.

  • Josh.1093Josh.1093 USUniversity ✭✭
    edited February 21

    In my case Stephane has it right, as you would expect.

    I was moving some dependencies around, and some of my projects that had been getting a pinned version of Xamarin.Forms ended up getting an older version. Pinning those projects to the version that they had been getting (via a transitive nuget dependency) fixed my issue. Thanks @StephaneDelcroix !

Sign In or Register to comment.