Skip to content
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

Access to System.Runtime.Remoting.Metadata.W3cXsd2001 under .NET Standard #26290

Closed
tlwest opened this issue May 27, 2018 · 8 comments
Closed
Labels
area-Serialization question Answer questions and provide assistance, not an issue with source code or documentation.
Milestone

Comments

@tlwest
Copy link

tlwest commented May 27, 2018

System.Runtime.Remoting is not implemented in .NET Standard for various good reasons.

However, there are some utility classes that (as far as I can tell) don't depend on the main problematic parts of System.Runtime.Remoting. The one that concerns me is System.Runtime.Remoting.Metadata.W3cXsd2001 which includes classes for binary/hex conversion. Could this be added into .NET Standard under a different namespace?

It would save Framework -> Standard conversion effort for little cost to the .NET Standard framework.

@karelz
Copy link
Member

karelz commented May 27, 2018

The types there seem to be SOAP related. I wonder if they would fit better WCF or external library. It does not feel like something we should include in "core" BCL IMO.

@danmoseley
Copy link
Member

@tlwest do you have code that uses only these types from Remoting (ie there is value in porting these alone)? Or is it more that you would like to write code that uses such types (ie., alternative types are OK)

@zhenlan are there equivalents of these types? Note in .NET Framework sources they are in clr\src\BCL\System\Runtime\Remoting\SoapInteropTypes.cs. These types are not entirely decoupled from remoting in .NET Framework, eg., they can throw RemotingException.

@tlwest
Copy link
Author

tlwest commented May 29, 2018

Our code makes a fair bit of use of the SoapHexBinary class as a simple utility class (i.e. not connected with remoting). I can write a replacement, but if the only reason it's not included in .NET Standard is that it happens to be in the System.Runtime.Remoting namespace, then it's inclusion in .NET Standard would make porting of some projects just that much easier for others (albeit presumably requiring a namespace change).
If there's a philosophical reason for its removal, then that would be a different matter.

@danmoseley
Copy link
Member

@tlwest .NET Standard changes more slowly than .NET Core. Unless you're writing a .NET Standard library (ie, a single binary that must run on both .NET Core and .NET Framework) it may be enough for us to port it to .NET Core.

@zhenlan
Copy link
Member

zhenlan commented May 30, 2018

@zhenlan are there equivalents of these types? Note in .NET Framework sources they are in clr\src\BCL\System\Runtime\Remoting\SoapInteropTypes.cs. These types are not entirely decoupled from remoting in .NET Framework, eg., they can throw RemotingException.

Add @mconnew @Lxiamail to help.

@huanwu
Copy link
Contributor

huanwu commented May 31, 2018

@tlwest To workaround it, you can create a dummy class derived from XmlSerializationWriter and call FromByteArrayHex from your own method.

@tlwest
Copy link
Author

tlwest commented Jun 19, 2018

@huanwu. Thank you! I will examine this approach as the closest to the current code that we can achieve.

@mconnew
Copy link
Member

mconnew commented Jun 28, 2018

@tlwest, I'm closing this issue as it looks like you have a solution. Feel free to reopen if that doesn't work for you.

@mconnew mconnew closed this as completed Jun 28, 2018
@msftgits msftgits transferred this issue from dotnet/corefx Jan 31, 2020
@msftgits msftgits added this to the 3.0 milestone Jan 31, 2020
bobbymcr added a commit to bobbymcr/OrcaMDF that referenced this issue May 10, 2020
Add support for .NET Standard 2.0 (in all the core libraries) and
.NET 4.6.1 (in the OMS and test projects).

Summary of changes:

- Update all projects to [SDK style][1]; set GenerateAssemblyInfo to false
  to [avoid having to touch existing AssemblyInfo files][2]
- Use <PackageReference> instead of packages.config
- Update .sln file to remove unnecessary build targets (assume AnyCPU)
- Upgrade to newest NUnit
- Modify path prefix in OrcaMDF.RawCore.Tests.BaseFixture
- Move TestHelper out of core framework and include it as a linked file in
  all the test projects (this is needed because the code used here is
  [not compatible with .NET Standard][3])

[1]: https://docs.microsoft.com/en-us/dotnet/core/tools/csproj
[2]: dotnet/runtime#26290
[3]: https://stackoverflow.com/questions/42138418/equivalent-to-assemblyinfo-in-dotnet-core-csproj
@ghost ghost locked as resolved and limited conversation to collaborators Dec 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Serialization question Answer questions and provide assistance, not an issue with source code or documentation.
Projects
None yet
Development

No branches or pull requests

7 participants