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

[XamlC] Error should be thrown when x:DataType="{x:Type XXX}" is specified in XAMLC #5330

Closed
toomasz opened this issue Feb 20, 2019 · 3 comments · Fixed by #5335
Closed

[XamlC] Error should be thrown when x:DataType="{x:Type XXX}" is specified in XAMLC #5330

toomasz opened this issue Feb 20, 2019 · 3 comments · Fixed by #5335
Assignees
Projects

Comments

@toomasz
Copy link
Contributor

toomasz commented Feb 20, 2019

Description

When DataType is specified like: x:DataType="{x:Type vm:SomeViewModel}" compilation succeeds and project runs but element doesn't benefit from xamlc compilation

Steps to Reproduce

Add x:DataType="{x:Type vm:SomeViewModel}" to any element

Expected Behavior

Project build should fail with some error complaining about x:DataType format

Actual Behavior

Procect build succeeds

Basic Information

  • Version with issue: 4.4
  • Last known good version: none
  • IDE: VS2017
  • Platform Target Frameworks:
    • Android: 7.1

Screenshots

image

@StephaneDelcroix
Copy link
Member

x:DataType expects a type literal, not a type object. We can see if it's possible to support this behavior in the future.

StephaneDelcroix added a commit that referenced this issue Feb 21, 2019
Invalid x:DataType was ignored up to now. Change the behavior so it
throws a XPE.

- fixes #5330
StephaneDelcroix added a commit that referenced this issue Feb 21, 2019
Invalid x:DataType was ignored up to now. Change the behavior so it
throws a XPE.

- fixes #5330
StephaneDelcroix added a commit that referenced this issue Feb 21, 2019
Invalid x:DataType was ignored up to now. Change the behavior so it
throws a XPE.

- fixes #5330
@samhouts samhouts added this to In Progress in v3.6.0 Feb 21, 2019
@samhouts samhouts removed this from New in Triage Feb 21, 2019
@samhouts samhouts added this to In Progress in v4.0.0 Feb 28, 2019
@samhouts samhouts removed this from In Progress in v3.6.0 Feb 28, 2019
@samhouts samhouts added this to In Progress in v4.1.0 Mar 2, 2019
@samhouts samhouts removed this from In Progress in v4.0.0 Mar 2, 2019
@thudugala
Copy link

Issue still exist in Xamarin .Forms 3.6, if built in release mode.

@StephaneDelcroix
Copy link
Member

@tmt242001 the PR isn't even merged yet

StephaneDelcroix added a commit that referenced this issue Mar 6, 2019
Invalid x:DataType was ignored up to now. Change the behavior so it
throws a XPE.

- fixes #5330
@samhouts samhouts moved this from In Progress to Done in v4.1.0 Mar 7, 2019
adrianknight89 pushed a commit to adrianknight89/Xamarin.Forms that referenced this issue Mar 29, 2019
Invalid x:DataType was ignored up to now. Change the behavior so it
throws a XPE.

- fixes xamarin#5330
codemillmatt pushed a commit to codemillmatt/Xamarin.Forms that referenced this issue Apr 19, 2019
Invalid x:DataType was ignored up to now. Change the behavior so it
throws a XPE.

- fixes xamarin#5330
@samhouts samhouts added this to In Progress in v4.2.0 May 29, 2019
@samhouts samhouts removed this from Done in v4.1.0 May 29, 2019
@samhouts samhouts moved this from In Progress to Done in v4.2.0 May 29, 2019
@samhouts samhouts removed this from Done in v4.2.0 Jun 4, 2019
@samhouts samhouts added this to In Progress in v4.1.0 Jun 4, 2019
@samhouts samhouts moved this from In Progress to Done in v4.1.0 Jun 5, 2019
AxelUser pushed a commit to AxelUser/Xamarin.Forms that referenced this issue Jun 15, 2019
Invalid x:DataType was ignored up to now. Change the behavior so it
throws a XPE.

- fixes xamarin#5330
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
v4.1.0
  
Done
Development

Successfully merging a pull request may close this issue.

4 participants