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

'The referenced component could not be found' spurious warning on Windows builds using nugets that contain native references #12741

Open
chamons opened this issue Sep 15, 2021 · 1 comment
Labels
bug If an issue is a bug or a pull request a bug fix iOS Issues affecting Xamarin.iOS low-priority This is a low priority issue or pull request
Milestone

Comments

@chamons
Copy link
Contributor

chamons commented Sep 15, 2021

Builds on Visual Studio for Windows using libraries with native references may produce the following warning:

'The referenced component 'PATH' could not be found.'

This is a false warning, the component was successfully linked (unless you have a mtouch warning\error later).

This is due to the unfortunate choice of "NativeReference" in project files for Xamarin dependencies, which clashes with an existing Windows target.

It would be rather difficult to fix this in an backwards compatible way.

Steps to Reproduce

  1. Create a new iOS project on Windows
  2. Add a reference to a nuget that contains a native reference .a file, such as https://www.nuget.org/packages/Microsoft.CognitiveServices.Speech
  3. Build

Expected Behavior

No warnings

Actual Behavior

Not a build warning in the log, but you will get a warning in the IDE of 'The referenced component 'PATH' could not be found.'

Environment

Latest stable

@chamons chamons added bug If an issue is a bug or a pull request a bug fix iOS Issues affecting Xamarin.iOS low-priority This is a low priority issue or pull request labels Sep 15, 2021
@chamons chamons added this to the Future milestone Sep 15, 2021
@chamons
Copy link
Contributor Author

chamons commented Sep 15, 2021

This issue was confirmed by discussions with @emaf and based upon https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1284847

@chamons chamons changed the title 'The referenced component could not be found' on Windows builds using nugets that contain native references 'The referenced component could not be found' spurious warning on Windows builds using nugets that contain native references Sep 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug If an issue is a bug or a pull request a bug fix iOS Issues affecting Xamarin.iOS low-priority This is a low priority issue or pull request
Projects
None yet
Development

No branches or pull requests

1 participant