Charles Lowell commented on LOG4NET-567:

As part of creating a netstandard2.0 build, I made a single csproj to build 
assemblies for net20 to netstandard2.0 and pack them into a nupkg. You can see 
it at 

[~dpsen...@gmail.com] to your question, binaries built on either platform 
should be compatible with Mono, .NET Core, and .NET Framework as expected. I 
write "should " because I haven't tested them. On Linux you would need Mono 5+ 
to get the latest MSBuild. However, I'm uncertain Mono supports the net35/net40 
client profiles, so it may not be possible to build everything on Linux.

> Use new csproj format to target multiple frameworks
> ---------------------------------------------------
>                 Key: LOG4NET-567
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-567
>             Project: Log4net
>          Issue Type: Improvement
>            Reporter: Peter Jas
>   Original Estimate: 4h
>  Remaining Estimate: 4h
> I have noticed that recently all the csprojs are converged to one monolithic 
> "old-style" csproj. It is an improvement but what about xproj and .NET Core?
> Instead of having xproj+project.json and csproj with two solution files and 
> multiple packages.config files in the repo, use modern csproj format, which 
> is compact, clear, able to target multiple platforms at once, does not 
> require any additional packages.config etc. file.
> bq. The idea is to remove netstandard directory from the root and maintain 
> only new-format csproj file.
> Additional advantange include easy to package for _all supported platforms_ 
> with ONE command: [{{dotnet 
> pack}}|https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-pack].
> Example: 
> https://github.com/JamesNK/Newtonsoft.Json/blob/b311d91/Src/Newtonsoft.Json/Newtonsoft.Json.csproj.
>  James is supporting the whole JSON.NET for .NET Framework 2.0 to .NET 
> Standard 1.3 with a single new-csproj file.
> Sometimes we want to explicitly target mono, other times the neutral grouds 
> like PCL or NetStandard1.0 do the job. An example of explict targeting:
> {code:xml}
> <TargetFrameworks>net45;netstandard1.1;netstandard1.3;win81;MonoAndroid7;Xamarin.iOS10</TargetFrameworks>
> {code}
> see this example in action: 
> https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/blob/0ae178520/src/Microsoft.Identity.Client/Microsoft.Identity.Client.csproj
> Also See: 
> https://docs.microsoft.com/en-us/dotnet/core/tools/project-json-to-csproj
> and http://www.natemcmaster.com/blog/2017/03/09/vs2015-to-vs2017-upgrade/
> ---
> You can also try creating a new solution in VS2017 with dotnet core project 
> to get familiar with new csproj format. If you are not using VS2017 or VS 
> Code, then dotnet-cli can give a quick sneak peak:
> {code}
> mkdir test && cd $_
> dotnet new classlib -n mylib
> dotnet new console -n myapp
> dotnet add myapp.csproj reference mylib.csproj
> # dotnet restore && dotnet run
> {code}
> Then see the structure of mylib.csproj and myapp.csproj.
> ---
> Issues with new project system (which supports the new-csproj structure) can 
> be reported at https://github.com/dotnet/project-system. Note that in that 
> repo 15.3 milestone is next in line which will bring new features and fix 
> some existing complains: 
> https://github.com/dotnet/project-system/milestone/7. However the current 
> 15.2 version is working out fine for us in production.

This message was sent by Atlassian JIRA

Reply via email to