New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NuGet Package StackExchange.Redis v2.2.4 raises System.IO.FileNotFoundException on ConnectionMultiplexer.Connect(_ConnectionString).GetDatabase() #1637
Comments
I have the same error with 2.2.4 when targeting netcoreapp3.1. Here the detail of the error
|
I already tried the versions 2.2.3 and 2.1.58, but the same exception occurs no matter which version i use. |
This sounds like an Azure functions deployment thing to be honest... we're
just shipping regular nupkgs :/
…On Wed, 9 Dec 2020, 06:40 ChrWeinert, ***@***.***> wrote:
I already tried the versions 2.2.3 and 2.1.58, but the same exception
occurs no matter which version i use.
Maybe this is a problem because of using Redis within a Azure Function
"application" v3?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1637 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAEHMDMIJYBENLF65EGRQLST4LWZANCNFSM4USBNHVA>
.
|
Hello Marc, I also included the nuget package "System.IO.Pipelines" into my project. Same error. The error occures just when I added the Redis package. The error occurs when I want to open a connection (ConnectionMultiplexer.Connect(_ConnectionString)). |
I'm including "deploying locally" in that; my point being - it sounds like
something is very wrong in the output folder.
What kind of setup would I need to repro this? I obviously can't see your
output folder or your csproj
…On Wed, 9 Dec 2020, 07:33 ChrWeinert, ***@***.***> wrote:
Hello Marc,
thank You for Your reply.
I haven´t deployed the Azure Functions to the Azure Portal yet.
I get the error when I execute the functions locally.
I also included the nuget package "System.IO.Pipelines" into my project.
Same error.
The error occures just when I added the Redis package. The error occurs
when I want to open a connection
(ConnectionMultiplexer.Connect(_ConnectionString)).
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1637 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAEHMDLYVT7TPQ7GBOXNKLST4R4LANCNFSM4USBNHVA>
.
|
Hello Marc, |
I also setup a simple console application based on netcore3.1 using the same nuget packages. |
Can you please try: <PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AzureFunctionsVersion>v3</AzureFunctionsVersion>
<_FunctionsSkipCleanOutput>true</_FunctionsSkipCleanOutput> <!-- *** this line is new ** -->
</PropertyGroup> (inspired by Azure/Azure-Functions#1518) |
Adding |
Great to hear! Does it also work for you, @ChrWeinert ? |
Adding <_FunctionsSkipCleanOutput> to the project file works. Thank You for the assistence!!! |
Thank You for the assistence!!! @mgravell |
@mgravell You just saved me as well, thanks the for the help! |
Adding But is this fix correct ? is this fix would work on Azure DevOps pipeline and after azure function deployment on azure? |
Good question. I just package things using the expected mechanisms. If the
Azure DevOps pipeline doesn't obey those rules, then I can:
a) offer random thoughts, and
b) ask folks "does that work?"
It isn't a deployment approach I'm actively using myself, so I'm open to
being guided by people who are.
…On Thu, 11 Mar 2021, 10:17 Ganesh Gawande, ***@***.***> wrote:
Adding
<_FunctionsSkipCleanOutput>true</_FunctionsSkipCleanOutput>
to the csproj file fixed it for me.
But is this fix correct ? is this fix would work on Azure DevOps pipeline
and after azure function deployment on azure?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1637 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAEHMBAVOZ5VSF22TAD3VTTDCKCVANCNFSM4USBNHVA>
.
|
Adding <_FunctionsSkipCleanOutput>true</_FunctionsSkipCleanOutput> to my function project file didn't work for me.
and exception which I am getting on console - "Anonymously Hosted DynamicMethods Assembly: Object reference not set to an instance of an object." when I am trying to inject IDistributedCache in contructor. |
Fundamentally, the maintainers aren't azure functions consumers, so it is very hard for us to opine. I've provided some initial hunches and ideas based on searching, and sometimes they have worked, sometimes they haven't. I guess what I'm saying is: it is very hard for us to provide the solution here - or even reproduce the problem. What would be great is somebody who uses azure functions trying to debug it, and providing feedback (or a PR) along the lines of (for example):
or
or similar |
Thanks !!! |
Updating |
Thank you so much! |
Hope this comment doesn't open the issue again. If it does, sorry! Just wanted to leave this here in case more people like me stumble onto this page by googling before or instead of finding the proper solution, which is: Output Settings |
That's really helpful, thanks @joedyndale - hopefully people will use this approach in the future! Ultimately, we're library maintainers. If the question is "how do we configure framework X to work with the library?", That needs knowledge of X - for every X you can imagine. And we're not X experts - we just know the library :) so: I appreciate the input (Edit: although ironically, @NickCraver might not be able to use this excuse much longer) |
@joedyndale 's solution worked for me - specifically by adding this to the function app project csproj file. |
Worked for me too thanks @joedyndale |
Please reopen the issue as it still exists. Is there any reason for removing the |
@ness001 We haven't removed anything. We depend on Pipelines as a transitive dependency. The problem is that some build/runtime environments aren't propagating that transitive dependency correctly. However, we don't own those build/runtime environments, and frankly: other than declaring the transitive dependency (which we already do), there is as far as I know: nothing more we can do. Except perhaps (as a few above), discuss various ways of working around that failure on different individual environments. Please feel free to suggest some additional action we could take here; that's the beauty of open source: now that you're aware of a problem, you can propose a concrete fix by playing with the code. |
I ran into this issue because in Visual Studio, I had replaced all occurrences of "${DOCKER_REGISTRY-}" with the name of my docker repository. |
I want to use an Azure Redis Cache within my Azure Functions.
After creating a new Redis Cache Resource within my Azure Subscription I added the StackExchange.Redis package (version 2.2.4) to my .net Core 3.1 project.
When I connect to the Redis Cache my Application crashes at the follwoing line of code saying that the assembly System.IO.Pipelines was not found.
IDatabase _Cache = ConnectionMultiplexer.Connect(_ConnectionString).GetDatabase();
Exception Details:
_System.IO.FileNotFoundException: 'Could not load file or assembly 'System.IO.Pipelines, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.'
System.IO.FileNotFoundException
HResult=0x80070002
Message=Could not load file or assembly 'System.IO.Pipelines, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.
Source=StackExchange.Redis
StackTrace:
at StackExchange.Redis.ConnectionMultiplexer.Connect(ConfigurationOptions configuration, TextWriter log) in //src/StackExchange.Redis/ConnectionMultiplexer.cs:line 1032
at StackExchange.Redis.ConnectionMultiplexer.Connect(String configuration, TextWriter log) in //src/StackExchange.Redis/ConnectionMultiplexer.cs:line 1015_
I added the Nuget Package for System.IO.Pipelines with Version 5.0 to the project, but got the same error.
After this I removed StackExchange.Redis from the project and added it with an older version (2.1.58), but still get the error.
Does anyone got stucked in the same error and found a solution for this?
Best Regards
Christian Weinert
The text was updated successfully, but these errors were encountered: