Couchbase Logging issue - log4net

I have got a strange issues with Couchbase once i update it to the latest version (through NuGet).
My MVC web app uses log4net loading it from unity container.
Suddenly Couchbase Cluster constuctor started to throw an exception saying:
Method not found:
'Common.Logging.ILog Common.Logging.LogManager.GetCurrentClassLogger()'.
Stack trace:
at Couchbase.Cluster..cctor()
Any idea? How could i solve this problem?

Had the same problame.
Resolved it by adding dll compiled from current Couchbase.NetClient sources available on GitHub.
Issue was fixed by this commit https://github.com/couchbase/couchbase-net-client/commit/a3f0544fd5e61e6b8c3cf0e829b8697e69021fda
Steps:
Download last version of sources https://github.com/couchbase/couchbase-net-client
Compile Couchbase project
Replace ..\packages\CouchbaseNetClient.2.0.1\lib\net45\Couchbase.NetClient.dll with compiled version in your solution
As far as CouchbaseNetClient 2.0.2 is released you can update it from NuGet.

Related

Cannot create instance of type 'Syncfusion.UI.Xaml.Schedule.ScheduleAppointmentEditor'

I'm using WinRT C# application and after a Windows update 20H2 (framework: 528372), the syncfusion Scheduler component stopped working and crashes the application. On Windows 1909 (framework: 528040) it works correctly
The error: Cannot create instance of type 'Syncfusion.UI.Xaml.Schedule.ScheduleAppointmentEditor'
I updated the libaries to a newer version which didn't solve my issue.
I currently have two versions of the same application
WinRT
UWP
The UWP works fine on 20H2 Windows versions and both UWP and WinRT apps have the same libaries for the syncfusion.
Any workaround that I can put in place to make it work again on version 20H2?
Regarding Cannot create instance of type 'Syncfusion.UI.Xaml.Schedule.ScheduleAppointmentEditor
The reported issue has been fixed and included in the patch which can be download from the below links.
Recommended approach - exe will perform automatic configuration.
Please find the patch setup from below location:
Patch link:
https://syncfusion.com/Installs/support/patch/14.4.0.15/1015043/F168937/SyncfusionPatch_14.4.0.15_1015043_9272021085339206_F168937.exe
Please find the patch assemblies alone from below location:
Assemblies Link: https://syncfusion.com/Installs/support/patch/14.4.0.15/1015043/F168937/SyncfusionPatch_14.4.0.15_1015043_9272021085339206_F168937.zip
Nuget link: https://syncfusion.com/Installs/support/patch/14.4.0.15/1015043/F168937/SyncfusionNuget_14.4.0.15_1015043_9272021085339206_F168937.zip
Disclaimer:
Please note that we have created this patch for version 14.4.0.15 specifically to resolve the issue reported in this incident.
Syncfusion gave an updated library with the fix. Issue Resolved
Heres the link, version 14.4.0.15 but this is specific to this issue as i could read : https://www.syncfusion.com/forums/168937/cannot-create-instance-of-type-syncfusion-ui-xaml-schedule-scheduleappointmenteditor

How can I fix deployment problem? upgraded entity framework core from 3.1.4 to 3.1.5. Result mvc core web app runs in VS, but fails in Azure

How can I fix deployment problem? upgraded entity framework core from 3.1.4 to 3.1.5. Result mvc core web app runs in VS, but fails in Azure.
Dot Net core 3.1 with EF 3.1.4 in Azure ran OK.
I updated the Nuget EF packages to current stable 3.1.5, and the result runs locally, but fails when deployed to Azure with message:
"could not load file or assembly 'Microsoft.EntityFrameworkCore, Version=3.1.5.0"
I used the Azure AppService Console and can see the EF versions have the same date as my local files "5/1/2020".
The FileExplorer details screen shows the version as 3.1.5, while the error message says it can not load 3.1.5.0. I searched, but did not find any other people with this problem.
I think is missing the reference there. If you can, check in the folder "packages" if there is a EF 3.1.5 there. Also, check if there is some places which is showing just 3.1.5.0 and try to change to 3.1.5 as is showing in the nuget library.
Finally solved the problem. It involved information from this Microsoft article:
https://learn.microsoft.com/en-us/aspnet/core/test/troubleshoot-azure-iis?view=aspnetcore-3.1#clear-package-caches
Needed to uninstall some nuget packages, use command line nuget commands to clear nuget cache, and then re-install latest nuget packages. Redeployed to Azure and the site works again.

PatchOrchestrationApplicationType 1.2.2 - FABRIC_E_FILE_NOT_FOUND: The Application Manifest file 'ApplicationManifest.xml' is not found in the store

I have deployed a Service Fabric cluster with the Patch Orchestration application with version 1.2.1 using ARM following the link, it was successful without any issues with package 1.2.1. But same thing I tried with the package with the version 1.2.2, it is giving me an error "FABRIC_E_FILE_NOT_FOUND: The Application Manifest file 'ApplicationManifest.xml' is not found in the store."
Is it a known issue or could anyone help me out in this?
Thanks,
Avinash
In this case the issue was due to a different folder structure of the downloaded content. for me just changing the version to 1.2.2 and the url to the new version worked for the template.

HttpRequestMessageExtensions not being found at run-time in Azure Function

I've got an Azure Function app that creates a precompiled DLL (so it uses normal .cs files, not the older .csx method, pre-VS2017). Previously, it was targeting .Net Framework 4.5.2. I updated it to 4.7 so as to use some of the new C# 7 features. I updated my NuGet packages by doing "Update-Package -Reinstall" and verified that they all have the "net47" target set in my packages.config file.
Everything compiles fine. But when I call a function that uses either of 2 HttpRequestMessageExtensions methods, I get an exception. One example of the exception is this:
Method not found: 'System.Net.Http.HttpResponseMessage
System.Net.Http.HttpRequestMessageExtensions.CreateResponse(
System.Net.Http.HttpRequestMessage, System.Net.HttpStatusCode)'.
Here's an example of a tiny test function that will cause the error:
using System.Net;
using System.Net.Http;
public static HttpResponseMessage Run(HttpRequestMessage req)
{
return req.CreateResponse(HttpStatusCode.Accepted, "");
}
Upon calling this function with say Postman, I'll receive the aforementioned exception. I also get a similar method not found exception when I call GetQueryNameValuePairs() on the HttpRequestMessage.
I've tried updating my NuGet packages to the latest, no difference. I've cleaned and rebuilt and restarted a bunch of times, making sure to nuke my bin and obj directories.
I'm not sure what could be the problem. I guess I could downgrade back to .Net 4.5.2 but I'd rather not. For one, I want to use C# 7, and for two, I want to understand what the problem is rather than avoid it.
Update: interesting. The issue seems to be with System.Net.Http. If I lower it to 4.0.0 everything works fine. If I raise it to any higher version I get the issues listed above. I tried selectively lowering each of my packages, one by one, to their previous version number to find this out. I then updated all but this one to the latest version and it fixed the issue.
I also tested it on my side. The issue is related to the latest version of System.Net.Http assembly(4.3.2). If I don't install this package manually or install the earlier versions(4.3.1/4.3.0), the application could work fine.
The CreateResponse method is a extension method which is written in System.Web.Http assembly(version 5.2.3). It seem that it is not compatible with the latest version of System.Net.Http. Please could just skip the error by using the earlier version of System.Net.Http and you can also submit this issue to Microsoft using follow channel.
https://connect.microsoft.com/VisualStudio/Feedback
Interesting. For me, if I got above version 4.0.0 (including 4.1.1 or 4.3.1) I still get the same problem of not finding those extension methods.
The assembly might not be updated during you change the package version. From the bin\Debug\net47 folder, we could check the current assembly version we used.
If the modified date of assembly is 2/9/2017, the package version is 4.3.1. If the modified date of assembly is 4/19/2017, the package version is 4.3.2. If the assembly is not the latest version, it could work fine on my side.
In addition, Microsoft.Asp.Net.WebApi.Client package is installed by default when creating an Azure function. System.Net.Http is one of its dependencies. So we don't need to install the System.Net.Http package manually. When running our application, NuGet will choose a right version of System.Net.Http for our application.
I had the same issue running my Azure Function locally and eventually tracked it down to conflicting System.Net.Http assemblies. I created my Azure function from a blank ASP.NET Web App and initially pulled down the System.Net.Http NuGet package to use within the project. I also pulled down the Microsoft.AspNet.WebApi.Client for use within the project. It did not matter which version of System.Net.Http I tried my project would compile but fail when the request was made.
Eventually, I removed packages I had downloaded, cleaned the build folder and added just the Microsoft.AspNet.WebApi.Client. I noticed that this automatically referenced the System.Net.Http on my machine for my version of the .NET Framework. (C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework). This compiled successfully and I was able to make requests to the function without any exceptions.
Using #Aaron-Newton's insight, I identified that my issue was due to my Azure Functions project referencing a .Net Standard 2.0 class library. I switched it to .Net Framework 4.6 and it started working again. Seems like this is a bug in the Functions tooling.
I've filed a bug with the Functions team here: https://github.com/Azure/Azure-Functions/issues/477
I had the same issue. I spent quite a while to fix this problem.
The cause is that the Azure Functions project is refering to .Net Standard Library with version higher than 1.4.
Bringing down your .Net Standard version to 1.4 or lower would fix the problem.
But this is defintely a bug with Azure Functions SDK. They should fix it.
https://github.com/Azure/azure-webjobs-sdk-script/issues/980
https://github.com/Azure/Azure-Functions/issues/477

How to upgrade azure sdk to 2.4?

My existing project, uses Azure .NET SDK 2.1. I wanted to upgrade the SDK to 2.4, so i dowloaded the latest from here for VS 2012. After successfull installation, when i opened up my solution, the cloud projects did not load. Thats ok, as they have been created using a lower version. So i removed them and created newer cloud projects.
But the thing which astonishes me is, there are many places in the worker role project where its throwing build error as it is not able to find out the assemblies and methods. Is there any easier way to upgrade to sdk 2.4 without making code changes. Which i think is a bad idea to make changes to the stable code, just for SDK upgrade.
When you open a project created using 2.1 SDK and try to open it using 2.4 SDK, you should see the project upgrade dialog which gives you the option to either download 2.1 SDK or convert existing project to target 2.4. Selecting the convert option should upgrade the project to 2.4. Any errors in this process will be reported in the project migration summary report.
If you are not seeing this dialog, then you might still have 2.1 sdk on your machine in addition to 2.4 sdk. In that case, you can go the Azure project properties. That will give you the option to upgrade your project to 2.4.
In regard to the build errors that you are getting for new projects, the error details will help in identifying the root cause.

Resources