Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] The "XamlGTask" task could not be initialized with its input parameters. #6466

Open
mattleibow opened this issue Jun 8, 2019 · 8 comments

Comments

@mattleibow
Copy link
Contributor

mattleibow commented Jun 8, 2019

Description

This appears to be the same issue as #2975

The "References" parameter is not supported by the "XamlGTask" task.
The "XamlGTask" task could not be initialized with its input parameters.

I believe it has to do with the mis-matching version of Xamarin.Forms used by projects. I am using Xamarin.Forms 4.0 and I depend on SkiaSharp.Views.Forms, which depends on 3.3.

This works on Windows, see the PR in the links.

Steps to Reproduce

  1. Create a new forms project that uses forms 4
  2. Create a library project that uses skiasharp.views.forms 1.68.0
  3. Add a reference from the sample netstandard to the new library
  4. Observe error
  5. Install forms into the library
  6. Observe success

Observe issue.

Expected Behavior

The project should compile, regardless of the dependency of SkiaSharp.

Actual Behavior

Somehow something is getting mixed up and cont compiling.

Basic Information

  • Version with issue:
  • Last known good version:
  • IDE:
  • Platform Target Frameworks:
    • iOS:
    • Android:
    • UWP:
  • Android Support Library Version:
  • NuGet Packages:
  • Affected Devices:

Screenshots

Reproduction Link

Example project: Archive.zip

@mattleibow mattleibow added t/bug 🐛 s/unverified New report that has yet to be verified labels Jun 8, 2019
@pauldipietro pauldipietro added this to New in Triage Jun 8, 2019
@samhouts samhouts added a/buildchain a/Xaml </> e/5 🕔 5 and removed s/unverified New report that has yet to be verified labels Jun 10, 2019
@samhouts samhouts moved this from New to Ready For Work in Triage Jun 10, 2019
@StephaneDelcroix
Copy link
Member

this indicates you have references to multiple forms versions in your solution. We should fail more gracefully, but I have to check if that code was already present in 3.3

@StephaneDelcroix StephaneDelcroix self-assigned this Jun 17, 2019
@samhouts samhouts added this to To do in Other Ready For Work Jun 17, 2019
@samhouts samhouts removed this from Ready For Work in Triage Jun 17, 2019
@hvaughan3
Copy link

hvaughan3 commented Sep 14, 2019

Finally got around this error. Visual Studio for Mac does not exclude/unload projects that were excluded/unloaded in Visual Studio 2017 on Windows. This causing an old Test project to load which referenced an older version of Xamarin Forms.

Please make this error more helpful!

@mikkeljohnsen
Copy link

This bug is driving my insane. It has been there for years and years now. Every time you open a project you have not been using for some time, you have to close and clean and close and remove obj and bin folders manually, and if you are lucky it will suddenly work (for awhile).

@mikkeljohnsen
Copy link

Today I think I used 80% of my time getting the build system to work and 20% actually coding. I do think, I need to change to JetBrains Rider and see if that is better. Else changing away from Xamarin.Forms is something I have to consider.

This is beginning to be ridiculous...

@mikkeljohnsen
Copy link

To be a little more constructive. It has something to do with iOS and Droid in the same project. If I unload the Droid project, I always get this error. If Droid is loaded and I clear "bin" and "obj" folders, I have to click on "Rebuild All" in the menu. If I click on the "Run" og just try to build the iOS project I get this error. So Rebuilding all first and then Run. That is where I get the best result and not getting this error. (But not always)

@Coruscate5
Copy link

I also have this problem very regularly for production apps. My workaround has been to nuke the whole cached package folder (where ".targets" resides) and either reinstall the Xamarin.Forms package from scratch or sometimes the build will rebuild the lib and build folders where the problem occurs

@MickLesk
Copy link

The problem also occurs with us! Is very critical for us, because we build a version (hotfix) for our Productive Live App every 2 days. Something must definitely happen here, we can't reinstall Forms every week. With us this occurs with the current 4.5 - version. @samhouts Can you push the problem again or add it to the build pipeline?
2020-03-31 14_19_30-Appzeug _ Microsoft Teams

@samhouts
Copy link
Member

@Coruscate5 @MickLesk What version(s) of Visual Studio do you use? Thanks!

@samhouts samhouts added this to the 5.0.0 milestone Aug 13, 2020
@samhouts samhouts added this to To do in vNext+1 (5.0.0) Aug 14, 2020
@samhouts samhouts removed this from the 5.0.0 milestone Nov 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Development

No branches or pull requests

7 participants