Unity Accord.net Gabor - c#

I have to use Gabor Filter on image in Unity. Accord.net have it. I download libs for .net3.5 but i got reflection problem
link to accord.net
Internal compiler error. See the console log for more information. output was:
Unhandled Exception: System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
i use options changings from subset to .net 2.0 but still nothing.
https://github.com/accord-net/framework/releases
i have to use probably only accord.dll and accord.imaging.dll
what i have to do? Any solutions?

You have to manually resolve the dependencies, like this:
I got Accord DLLs using NuGet, and drag-and-dropped them into Unity from "packages/Accord??/lib/net35". (This means DLLs were built for .NET 3.5.) Maybe you can use manually built DLLs for .NET 3.5.
For Mac OSX, System DLLs can be obtained from
"/Applications/Unity/Unity.app/Contents/Frameworks/Mono/lib/mono/2.0".

Related

.NET Framework 4.7.2 with MoreLINQ

I am trying to update a large solution to .NET Framework 4.7.2 with VS2019. One of the problems with this solution is that it is a large plugin type architecture, where (for many reasons) I am not able to recompile and release the plugins to production with the updated shared set of libraries that the solution provides.
Normally this is OK, but we have to be very careful to ensure full backwards binary compatibility. When we recently upgraded to .NET 4.7.2, we started getting conflicting usage indicators between System.Linq and MoreLinq, generally on the .ToHashSet() extension that we commonly use. The problem is outlined somewhat on MoreLinq's github
I think the only way to correct this is to isolate MoreLINQs usage into a single DLL that I control, and once all plugins reference that DLL upgrade to 4.7.2, fixing the .ToHashSet() call in the common location at that time.
Does anyone know of a better/more efficient way to do this, without re-releasing all the plugins at once? Some kind of global redirect that I am not aware of?
Evidently this just works. Installing the solutions common DLLs # 4.7.2 alongside older plugins # 4.5.2 worked fine, even though those plugins had compilation errors when compiling in Visual Studio against 4.7.2.
I'd be curious to know what internals are making this succeed. Does the system load multiple versions of .NET framework DLLs for the running process?

How to System.Data.SQLite Interop.dll on Xamarin.Forms?

I get the following problem every time I try to run my mobile application:
System.DllNotFoundException:
'SQLite.Interop.dll assembly:<unknown assembly> type:<unknown type> member:(null)'
To put this in some context:
I am developing on Xamarin.Forms [4.3.0] (in this case running the build on Android 9.0 x86). The client-side library runs on .NET Standard 2.0 and I have installed System.Data.SQLite.Core (1.0.112) from NuGet.
When you look up my problem, you will find people saying to put the SQLite.Interop.dll's into the x86/x64 folders. But when looking for these files there are none for .NET Standard at all, only for .NET Framework. I tried using the SQLite.Interop.dll's from the precompiled statically-linked binaries from the .NET Framework 4.6 version.
Screenshot of the project structure
Same error though.
Unfortunately, it is not possible for me to switch the SQLite library as I am porting a desktop version to mobile which uses this lib.
if they have not made a mess in the classes and functions you need to port you can use "Microsoft.Data.SQLite", there is a difference but is not as far away from usable as the crazy nonsense you need to do with "SQLite-Net-Pcl"

Unity Standalone Probobuf C# Port

I'm trying to use the Protobuf C# Port that was developed by Jon Skeet's on a Unity project, but I keep getting errors when I try to build and run a stand alone. I have copied over all the .dll files into the assets and things run smoothly while I'm running unity from developer environment, but as soon as I compile and build I get an error about a "filename unkown".
error image
I haven't managed to find a solution because it seems that most people run into similar issues using Marc Gravell's version of Protobuf. I'd like to stick to the version that I'm using now since I will be working with several languages for this project.
Any help is greatly appreciated.
-- Solution --
It turns out that I had to go into Edit > Project Settings > Player and change the NET version from 2.0 Subset into 2.0
I often find type initialization exceptions occurring because of project reference issues. The two most common causes:
Building your application against a newer version of .NET than the library being referenced (e.g. Protobuf library may have been compiled against .NET 4 while the application is being built against .NET 4.5). You could try resolving that by recompiling the Protobuf libs against the same .NET version as your project.
The compiler assumes a reference is present, but at run time it is not. You can fix this by adding a reference to the specific library (in this case the .NET library with the RegEx object, which is usually System.dll)

Unable to load .dll?

I made an application using c#.net 2.0 and linq but as we can't use Linq cause it was introduced in framework 3.5, i add some references of dll of version 3.5 and linq started working fine.
when i made the setup and installed it, it is working fine on my system but on other system it is showing error that
Unable to load System.Data.DatasetExtensions
I don't know that if other dlls are working then why this dll is creating problem? What is the solution for this?
Needs Help.Thanks.
If you are constrained to using .Net2.0, then don't bother trying to load assemblies targeting later versions of .Net. It's doomed to failure. If you want to use Linq, target >=.Net3.5, if you need to target .Net2.0, don't use Linq.
Regarding error, the assemblies that you added may be having dependencies on other assemblies. It didn't give error on your system because you had it installed on it.
But you shouldn't be doing such a thing in general. A better way would be installing the required framework version within your installer as a pre-requisite requirement.

Prexisiting dlls (.NET 4 framework) issue with mono for android

I am creating a fresh Mono for android application using http://xamarin.com/monoforandroid
I selected Mono for Android Application using Visual C# option.
My Android target version is :
I went to references of the project and tried adding my pre existing dlls (made in .NET 4 Framework)
and I got this error:
The strange stuff is there is no option to change the .NET Framework from project properties. Can you tell me what I am missing?
The problem here is that you're trying to reference a .NET 4 DLL from a project that isn't .NET 4. Mono for Android uses its own profile for .NET, which is very similar to that of Silverlight (but not exactly the same). While it's possible that adding a DLL compiled for a different profile will work, it's very risky as you will probably run into problems at runtime where your app will crash, due to something being missing from the Mono for Android profile.
The best answer right now is to create a Mono for Android class library, link in the appropriate files from the library you want to use, and reference that. This will give you compile-time checking that you're not using anything unsupported by the Mono for Android profile, and help keep you more sane in the long run. I have an old blog post up here that talks about how to link files across projects.
That said, in this case you're in luck because someone else has already done that last part for you! Check out this fork of Json.NET which provides versions for MonoTouch and Mono for Android.
The strange stuff is there is no option to change the .NET Framework from project properties. Can you tell me what I am missing?
It's not particularly strange - that dialog box was written by Microsoft, with its own project types in mind. It sounds like Mono for Android doesn't have the same options available.
I strongly suspect you'll just have to use a version of JSON.NET targeting .NET 3.5.
(Having said that, Mono for Android claims to support "dynamic language features" which sounds like it should be targeting .NET 4. Odd. I suspect the fix is the same though.)

Categories

Resources