-
Notifications
You must be signed in to change notification settings - Fork 563
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
Upgrade to 6.0.0 (from 4.10.2) is missing IBindingRuntimePreferences #5202
Comments
hey, thanks for the fix. |
Hi! Very important feature for my project too. Is where any information about plans of releasing it? |
@imcarolwang @HongGit @mconnew |
Having the same issue here, when will this be released? |
I am also not sure of the release schedule. To unblock compiling, try cast type BasicHttpBinding to type Binding explicitly when passing it as parameter for composing CustomBinding instance? |
Same issue with the interface System.ServiceModel.Channels.IMergeEnabledMessageProperty. Can be easily reproduced with the following test: using System.ServiceModel.Channels;
using Xunit;
namespace ServiceModelPrimitives;
public class ServiceModelPrimitivesTests
{
[Fact]
public void UsingHttpRequestMessageProperty_ShouldCompile()
{
var actual = new HttpRequestMessageProperty();
Assert.NotEqual(null, actual);
}
} Will throw the following compilation error:
Reproducible using Here's the csproj: <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.ServiceModel.Http" Version="6.0.2" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.0" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
</Project> |
So, it's really wierd var actual = new HttpRequestMessageProperty();
Assert.NotEqual(null, actual); this compiles well var actual = new HttpRequestMessageProperty();
Assert.NotNull(actual); |
I suppose it's because XUnit Assert.Equal is creating a custom EqualityComparer that uses reflection, which triggers the exception to be thrown. |
the only way i could get around this issue is to do this: //request.Should().NotBeNull();
if (request == null) throw new InvalidOperationException("Request is null"); |
I have a wcf CustomBinding that is using BasicHttpBinding.
After the upgrade to 6.0.0 I get the following error in VS 2022
Error CS7069 Reference to type 'IBindingRuntimePreferences' claims it is defined in 'System.ServiceModel.Primitives', but it could not be found
I have added the nuget package Primitives. As well as alot of others to test with no joy
Looking in github, the interface exists in the RTM tag but not the 6.0.0 tag
is this the problem???
Or am I doing something wrong??
https://github.com/dotnet/wcf/blob/**v6.0.0-rtm**/src/System.ServiceModel.Primitives/src/System/ServiceModel/Channels/IBindingRuntimePreferences.cs
https://github.com/dotnet/wcf/blob/**v6.0.0**/src/System.ServiceModel.Primitives/src/System/ServiceModel/Channels/IBindingRuntimePreferences.cs
I have replicated this on a new console app with a class library with a single class
ConsoleApp1.zip](https://github.com/dotnet/wcf/files/12075724/ConsoleApp1.zip)
TestClass.cs
The ClassLibrary1.csproj file is as follows
ConsoleApp1.zip
The text was updated successfully, but these errors were encountered: