Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When using XAML compilation, binding to command whose class definition is in external project generates an error #2518

Closed
ptsoccer opened this issue Apr 20, 2018 · 1 comment
Assignees
Projects

Comments

@ptsoccer
Copy link

@ptsoccer ptsoccer commented Apr 20, 2018

Description

When using compile time data bindings, binding a button's command to a command whose class definition is in another project generates:

Member '<class name>' is declared in another module and needs to be imported

Steps to Reproduce

  1. Create two projects, one being a xamarin forms project and one being a .NET standard 2 project and have the xamarin forms project reference the .NET standard 2 project
  2. In the .NET standard project, create a view model class and implementation of ICommand. Have the view model have an instance of the ICommand implementation.
  3. Turn on XAML compilation in the xamarin forms project
  4. Create a button in the xamarin forms project and bind its command to the command property on the view model
  5. Compile the xamarin forms project

Expected Behavior

The project should compile successfully

Actual Behavior

An error is returned:
Member 'ViewModel.DelegateCommand' is declared in another module and needs to be imported

Basic Information

  • Version with issue: 2.5.1 and 3.0-pre3

Reproduction Link

XamarinStaticBinding.zip

@pauldipietro pauldipietro added this to New in Triage Apr 20, 2018
@samhouts samhouts moved this from New to Ready For Work in Triage Apr 20, 2018
@StephaneDelcroix

This comment has been minimized.

Copy link
Member

@StephaneDelcroix StephaneDelcroix commented Apr 23, 2018

that's an issue in the BindingsCompiler

StephaneDelcroix added a commit that referenced this issue Apr 23, 2018
@samhouts samhouts added this to Ready in v3.0.0 via automation Apr 23, 2018
@samhouts samhouts removed this from Ready For Work in Triage Apr 23, 2018
@samhouts samhouts moved this from Ready to In Progress in v3.0.0 Apr 23, 2018
@samhouts samhouts moved this from In Progress to Done in v3.0.0 Apr 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
v3.0.0
  
Done
3 participants
You can’t perform that action at this time.