I've created .Net Standard 2.0 library with custom XPO criteria functions (ICustomFunctionOperatorBrowsable). I need .Net Standard since I need to use the same functions in XPO-based Linux service and XAF solution. Otherwise I would need to duplicate code.
Now, win XAF application works as expected. Model editor in XAF applications also works. What doesn't work is Model editor in Visual Studio. It says:
Unable to create an instance of the "CustomApplication" type.
Reason: "Could not load file or assembly 'netstandard, Version=126.96.36.199, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. Не удается найти указанный файл."
Where should I put .netstandard library?
We tested our design-time features only under the .NET Framework. We can't guarantee that they will work with .NET Standard. However, I tested this scenario on my side, but I can't reproduce this issue with the attached projects. Assemblies are loaded for the GAC at design-time. So, try to put the "netstandard" assembly to the GAC.
If this is not helpful, please modify my project to reproduce the issue and provide me with the exception call stack. You can obtain it as described in the How to obtain a design-time exception call stack article.