Closed Sunsikh closed 5 years ago
Hello Sunsikh,
Thank you for pointing out this issue to us and furnishing your application code so that we can narrow down the root cause, this was very helpful.
I have reproduced the scenario on my end and confirm that there is a version mismatch with NCache LINQ integration assembly that is shipped with NuGet package and this is why it is raising the error. Our engineering has published an updated NuGet Package Alachisoft.NCache.OpenSource.Linq (v 4.9.1.1) with correct version information that should work as expected in your environment.
You can install this Nuget Package from Visual Studio and use it in your application.
Here is the NuGet.org link to the updated NuGet package:
https://www.nuget.org/packages/Alachisoft.NCache.OpenSource.Linq/4.9.1.1
And it's worked! Thx you very much!
I have noticed that referencing either version of the NCache.Linq packages causes InitializeCache to hang or otherwise fail when attempting to use a "partitioned" cache. This is reproducible by changing the cache used in the NCacheLINQ sample project from "myCache" to "myPartitionedCache".
I have not found any documentation indicating that NCache Linq can only be used with a "local" cache?
If anyone has a solution for this (using Linq with partitioned cache) or information as to why we cannot use Linq with a partioned cache, kindly let us know.
Thanks.
I have noticed that referencing either version of the NCache.Linq packages causes InitializeCache to hang or otherwise fail when attempting to use a "partitioned" cache. This is reproducible by changing the cache used in the NCacheLINQ sample project from "myCache" to "myPartitionedCache"....
It appears that the NuGet packages for LINQ install local configurations, which was confusing the issue.
So the issue I mention above is probably not an issue.
Hi folks! NCacheQuery doesn't work correctly in .net core application with NuGet package "Alachisoft.NCache.OpenSource.Linq". If you install this package, Ncache doesn't allow you to use LINQ for queries data in cache because you will get this error: The type 'Cache' is defined in an assembly that is not referenced. You must add a reference to assembly 'Alachisoft.NCache.Web, Version=4.9.0.0, Culture=neutral, PublicKeyToken=cff5926ed6a53769' In a classic .net framework, everything works flawlessly. The workaround is to add DLL from sample application that going with Ncache: "%NCHOME%\samples\dotnetcore\NCacheLINQ\NCacheLINQ\lib\Alachisoft.NCache.Linq.dll" to project dependency and with that library, everything starts working. Can u fix this, pls?
namespace ConsoleAppCoreNCache { class Program { static void Main(string[] args) { var cache = NCache.InitializeCache("myCache"); cache.Clear();
}