After I added to my working UWP app a reference to a member in a .NET Standard 2.0 class library, that I added, now when I run it I get this error:
System.IO.FileNotFoundException HResult=0x80070002 Message=Could not load file or assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified. Source=CameraFrames StackTrace: at FrameRenderer.ProcessFrame(MediaFrameReference frame) in C:\PRIMARY\WORK\CAMERA READER\Samples\CameraFrames\cs\SOURCE\FrameRenderer.cs:line 393 at SDKTemplate.Scenario1_DisplayDepthColorIR.FrameReader_FrameArrived(MediaFrameReader sender, MediaFrameArrivedEventArgs args) in C:\PRIMARY\WORK\CAMERA READER\Samples\CameraFrames\cs\Scenario1_DisplayDepthColorIR.xaml.cs:line 315
Here is the UWP app code that breaks it. If I remove the "bool aa"... line, it works.
public void ProcessFrame( MediaFrameReference frame)
{
// TEST MULTI-PROJ
bool aa = UWP_BRIDGE_DotNet_Standard_ClassLibrary.Class1.flag;
Here is the code in the .NET Standard 2.0 class lib...
using System;
namespace UWP_BRIDGE_DotNet_Standard_ClassLibrary
{
public class Class1
{
public static bool flag = false;
public static string buffer = "HELLO";
}
}
I set UWP project properties > Targeting > Target & Min version both to Windows 10 v 1803 and it still errors.