-1

How do I reference the FontAwesome.WPF dll from the OtherProject in the Test project.

In the OtherProject I reference it like this:

xmlns:fa="http://schemas.fontawesome.io/icons/"

I know how to reference the project itself:

xmlns:fa="clr-namespace:OtherProject;assembly=OtherProject"

But I think the namespace should change, however I don't know to what and where to find it?

enter image description here

This is the FontAwesome.WPF in the object browser:

enter image description here

I don't know how the first reference would relate to this or might help me or if this is even possible?

So what I want is calling this:

<fa:ImageAwesome Icon="Flag" VerticalAlignment="Center" HorizontalAlignment="Center" />

Without installing the NuGet package in the Test project.

Elmer
  • 384
  • 5
  • 19

1 Answers1

0

You should read the following accepted answer.

MSBuild doesn't copy references (DLL files) if using project dependencies in solution

In short, you have two options:

  • Install the NuGet package in the test project as well.
  • Add some code (not only XAML markup) in the OtherProject that references a type in the FontAwesome assembly.

Then the assembly should be copied to the test project's output directory.

mm8
  • 163,881
  • 10
  • 57
  • 88