Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

log4net version error when installing Google.Apis.Plus.v1

Vote:
 

Hi, everyone!

When I try to install Install-Package Google.Apis.Plus.v1, I get the following error:

Install failed. Rolling back...
Install-Package : Updating 'log4net 1.2.10' to 'log4net 2.0.3' failed. Unable to find a version of 'EPiServer.Logging.Log4Net' that is compatible with 'log4net 2.0.3'.
At line:1 char:1
+ Install-Package Google.Apis.Plus.v1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand

I am on CMS 8.8.2.

It looks like http://nuget.episerver.com/en/OtherPages/Package/?packageId=EPiServer.Logging.Log4Net&packageVersion=2.0.0-pre-000006 hasn't changed a lot (last changed in April). Is this a good road to take or is there a better option?

Thx in advance!

Marija

#123118
Jun 25, 2015 11:04
Vote:
 

Hi!

It is possible to load multiple versions of the same binaries concurrently into a project, but it's not recommended, so I haven't bothered finding out how. We had the same issue for a client using EPiServer together with Google's custom search; we ended up creating a separate project for these types of integrations, using it's own log4net version. I asked Kristoffer at EPi about it and he said that they are in the process of making changes in regard to log4net; so, it might be a temporary integration project should it turn out that the architecture is better that way later on.

Cheers!

Mathias

#123120
Jun 25, 2015 11:25
Vote:
 

Hi,

use JSon,

Uri videoEntryUrl = new Uri(@"https://www.googleapis.com/youtube/v3/videos?part=snippet&id=VidoeKey&key=DeveloperKey");

            Create Web request for videoEntryUrl
            Get response
            read stream
            dynamic decodedJson = System.Web.Helpers.Json.Decode(json);

Regards

/K

#123127
Jun 25, 2015 11:55
Vote:
 

Here is how we did tricks with log4net (you still need to do black magic with packages to get everything added to your project, you may use "ignore dependencies" even):

- v1.2.10 is located in main bin/ folder

- create separate folder for other log4net.dll version - let's say bin/log4net.1.2.11/

- both files are named the same - "log4net.dll"

- add following lines to yourweb.config:

<dependentAssembly>
    <assemblyIdentity name="log4net" publicKeyToken="1b44e1d426115821" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-1.2.10.0" newVersion="1.2.10.0" />
    <bindingRedirect oldVersion="1.2.11.0-1.2.65535.0" newVersion="1.2.11.0" />
    <codeBase version="1.2.11.0" href="bin\log4net1.2.11\log4net.dll" />
</dependentAssembly>

The only problem here with really new log4net version could be regarding publicToken value. You just need to check this. There has been real hype around this mess made by log4net team..

#123175
Jun 25, 2015 23:44
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.