Using Nuget Package in runtime library

BitSmithy 1,951 Reputation points
2024-06-04T08:46:13.94+00:00

Hello,

I have a runtime library, where I have some classes which I use in my apps.

One class in the library uses nuget package.

I compile the library and attach to my app. Next I try to use the class in the app in Page Loadded event which such code:

private async void Page_Loaded(object sender, RoutedEventArgs e)
{
	MyClassFromRuntimeLibrary mc = new MyClassFromRuntimeLibrary();
}

After runing app throws the exception:

System.IO.FileNotFoundException: „Could not load file or assembly 'zxing, Version=0.16.9.0, Culture=neutral, PublicKeyToken=4e88037ac681fe60'. The system cannot find the file specified.”

This exception tells that nuget package which is attached to the runtime class library cant be found.

Please tell me what I am doing wrong? How to use nuget packages in runtime class library

Universal Windows Platform (UWP)
{count} votes