-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
System.ServiceModel.Primitives in NetStandard 2.0 library requires System.Private.ServiceModel which is not available through Nuget UI #777
Comments
I'm looking into this. |
System.Private.ServiceModel contains the implementation of all 5 WCF core public packages and is not meant for direct consumption and shouldn't be referenced directly. It should be automatically pulled-in when using one of the public WCF packages which is why it is not found via the VS NuGet UI. I setup your scenario (VS version 15.7.3) and I was unable to get VS to reproduce your error without manually intervening. If I manually replace the S.ServiceModel.Primitives used at run-time by the .NET Fx app with the one from the .NET Standard library it will try to use S.P.SM but not find it which would be expected.
Perhaps you have some custom task that is copying assemblies around? |
Hi I am also having a very similar issue as @dgxhubbard or atleast the similar symptoms, I am currently in the process of creating a xmararin forms project and consuming a WCF service. In andriod and IOS projects the WCF calls work fine. However when trying to contact the service in UWP/UI Test I get the exact same error above. Could not load file or assembly 'ServiceModel.Primitives Version=4.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. I have tried some of the suggestions on other posts such as downgrading the primitives version on the effected UWP/UI projects and targeting framework version 4.6.1 but I get the same issue. The WCF service I am consuming uses serviceModel 4.0.30319 on .net461 but the xmararin solution I have made is using .netStandard2.0 which I think is where the issue lies. The version of VS I am using is 15.7.2. If you need more info please let me know. Thanks for your help :) |
Thanks @StephenBonikowsky its a bit of a headscratcher. Ill keep digging in the mean time. |
Hi all, Ive done a bit more digging and found that the issue only occurs when the solution is running in in debug mode, run the UWP in release mode it works fine. I am not sure what the difference is between the debug and release versions. Is there a way I can specifically target a specific version of the service model primitives when my application is running via UWP. Thanks in advance |
We are running on Visual Studio 15.7 and we have a .net standard library 2 that has the ServiceContract attribute on several interfaces.
The .net standard library 2 is used in .net core 2.1 and .net 4.7.1 apps and referenced in other libraries. In the .net 4.7.1 app it provides the interface to WCF services. In .net core 2.1 it is just an interface. We recently loaded System.ServiceModel.Primitives 4.5.0 release version and started getting the message that Sytem.Private.ServiceModel.dll could not be found. So I opened the NuGet UI and searched for it and could not find it, and then went to nuget.com and saw it and used the package manager console to load it, and manually added reference in the project. This works, but is it possible to make Sytem.Private.ServiceModel. available from the NuGet UI.
The text was updated successfully, but these errors were encountered: