Skip to content
This repository has been archived by the owner on Dec 15, 2020. It is now read-only.

Port to NetStandard 2.0 #79

Open
ststeiger opened this issue Feb 19, 2018 · 0 comments
Open

Port to NetStandard 2.0 #79

ststeiger opened this issue Feb 19, 2018 · 0 comments

Comments

@ststeiger
Copy link

ststeiger commented Feb 19, 2018

In order to more easily port ngit to .net-core, could we

  1. In NGit\NGit.Util.IO\ThrowingPrintWriter.cs
    Add
    public override Encoding Encoding => System.Text.Encoding.UTF8;

within #IF NETFX ?

so it compiles with NETSTANDARD 2.0

As well as making the following changes

A) In Mono.Posix move Remoting to a separate dll ?
Mono.Remoting.Channels.Unix

Mono.unix -- deleted remoting

B) Mono.Posix/Mono.Unix.Native/CdeclFunction.cs
In CdeclFunction, dispose of


	//this.assemblyBuilder = AppDomain.CurrentDomain.DefineDynamicAssembly (
			//		assemblyName, AssemblyBuilderAccess.Run);

				///* MethodBuilder mb = */ tb.DefinePInvokeMethod (
				//		method, 
				//		library, 
				//		MethodAttributes.PinvokeImpl | MethodAttributes.Static | MethodAttributes.Public,
				//		CallingConventions.Standard, 
				//		returnType, 
				//		parameterTypes, 
				//		CallingConvention.Cdecl,
				//		CharSet.Ansi);
				//mi = tb.CreateType ().GetMethod (method);

In
\NSch\Mono.Security\Mono.Security.Protocol.Tls
remove the DebugHelper
DebugHelper.cs -- removed debug.Lisneter.add

And in
NSch\Mono.Security\Mono.Security.Protocol.Tls\HttpsClientStream.cs

somehow replace this code, or make it conditional to full .net framework.

#pragma warning disable 618
//if (ServicePointManager.CertificatePolicy != null) {
// ServicePoint sp = _request.ServicePoint;
// bool res = ServicePointManager.CertificatePolicy.CheckValidationResult (sp, certificate, _request, _status);
// if (!res)
// return false;
// failed = true;
//}

Added issues for Mono.Posix and Mono.Security
Maybe fork out Mono.Security until the NETSTANDARD port of Mono.Security is ready.
Also, fork out Mono.Posix from mono, as there is no nuget-library.

In case anybody needs ngit for NETSTANDARD 2.0:
https://github.com/ststeiger/ngit-core

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant