-
Notifications
You must be signed in to change notification settings - Fork 560
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
Could not load file or assembly 'System.ServiceModel.Primitives, Version=4.2.0.0 #2885
Comments
Hi @ssashok10, just to help understand, what's the difference of this Azure Function app than the one you had in #2824? |
@ssashok10, I understand what you described. I am trying to see what caused this result, so that's why my question about what's the difference between the two projects (the project in this issue and the project in #2824). The difference between the two projects may help us to tell why the issue happens to one project but not the other. |
@zhenlan It's the same project. We initially had an issue with "System.private.servicemodel.dll" which doesn't exist on the bin folder. We overcome this issue with your work around and we ended up facing the current issue. We are able to see the DLL "system.servicemodel.primitives.dll" into the BIN folder with the right version. |
I see. Looks like somehow the project was trying to use an older version of S.SM.Primitives package. Does it help if you add package reference of |
we tried to add it explicitly and it's not helping at all as the DLL already exists in the bin folder. However, we are able to solve this issue something similar in the below article during runtime. http://putridparrot.com/blog/dynamically-resolve-assemblies-at-runtime/ |
I didn't have this issue last time when I tried .NET Core Azure Functions. At this point, it probably will be helpful if you can share a repro for further investigation. The blog post is about full framework, so I assume you worked around the issue by implementing assembly resolver using .NET Core APIs? |
yes...we fixed this issue with assembly resolver. |
@ssashok10 Looks like the fix in Azure function may have fixed your problem. Have you tried it? |
This is also an issue for me. Seems to crop up when referencing BasicHttpBinding or other Binding objects in code. I don't recall this being an issue a couple months back, as I have check-ins that were additive mid-to-late August. I'm seeing this inside Azure Functions and Console apps. I'm running the latest VS Pro 2017 preview (15.9.5) Hope this helps... |
I am facing the same issue using azure runtime Version: 2.0.12245.0 in VS2017. After i added the ServiceModel Primitives nuget package i get the following error: Could not load file or assembly 'System.Private.ServiceModel, Version=4.5.0.3, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. Any fix for this issue or workaround? Thanks. |
@chadgruka Have you tried the new Azure function version with the fix? When you say the issue repro with "Console apps", can you share concrete repro steps? |
Sorry, this is 2 months ago. I'll have to see where we landed on this since. |
@melzoghbi Have you tried the new Azure function version with the fix? If the issue that you ran into is about missing System.Private.ServiceModel.dll in Azure Function output directory, it may due to a different Azure function issue. Can you try the work around suggested by Zhenlan in #dotnet/wcf#2824 ? |
@chadgruka Thanks |
Closing this issue. If you still run into the same issue. Please try the new Azure function version with the fix. If it doesn't work, please open new issue in https://github.com/Azure/azure-functions-host repo. |
I am using Azure Function (C#) which is calling a .NET standard library to call an external WCF service and I am getting the below error. This file is located on the bin folder of my function and the version also correct.
Could not load file or assembly 'System.ServiceModel.Primitives, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
Here are the platform information,
Microsoft.NET.Sdk.Functions (1.0.13)
.NET Standard Library 2.0
System.ServiceModel.Duplex 4.4.2
System.ServiceModel.Http 4.4.2
System.ServiceModel.NetTcp 4.4.2
System.ServiceModel.Security 4.4.2
The text was updated successfully, but these errors were encountered: