SlideShare una empresa de Scribd logo
1 de 16
.NET Standard
NuGet Analysis
Context
Part 1
.NET API Compatibility
Part 2
P/Invoke Compatibility
Part 1: .NET API Compatibility
• We’ve looked at packages and checked which .NET APIs they are using
• Top 1000
• All
• We’ve broken down the packages into three buckets:
• Packages that target .NET Standard/PCLs
• Packages that only use APIs available in .NET Standard 2.0
• Packages that use APIs unavailable in .NET Standard 2.0
• We’ve grouped the missing APIs by namespace and plotted how
strong a package depends on it
Compatibility of the Top 1000 Packages
63 % are API compatible with .NET Core & Standard 2.0 Still Incompatible
37 %30 % 33 %Top 1000
Provide portable asset Only use available APIs Use unavailable APIs
24 %
Uses app-model specific APIs, such as
• Classic ASP.NET
• WinForms
• WPF
• Xamarin Android & iOS
From those
87 % have also .NET Framework assets
of which
70 % are compatible
with .NET Core & Standard
0 20 40 60 80 100 120 140 160 180 200
(ASP.NET Classic)
(WinForms)
(WPF)
(Xamarin Android)
Microsoft.Win32
System
System.Collections
System.ComponentModel
System.ComponentModel.Composition
System.Data
System.Diagnostics
System.Drawing
System.IdentityModel
System.Net
System.Reflection
System.Runtime
System.Security
System.ServiceModel
<= 1
<= 5
<= 10
<= 20
<= 50
More
Top 1000: Incompatible API Usage
# of missing
APIs
per package
Take Away
 Most packages depend on classic
ASP.NET
 Packages depending on app
models often use 50+ APIs
0 10 20 30 40 50 60
System
System.Runtime
System.Security
System.Reflection
System.Data
System.Diagnostics
System.Drawing
System.ComponentModel.Composition
System.Net
Microsoft.Win32
<= 1
<= 5
<= 10
<= 20
<= 50
More
Top 1000: Incompatible API Usage
Excluding “lost causes”, i.e. only packages with no app model dependencies
Take Away
 Small # app-model agnostic (120)
 Looking at remaining technologies
there seem to be plenty of
packages that only use <= 5 APIs
# of missing
APIs
per package
Compatibility of all packages on NuGet
69 % are API compatible with .NET Core & Standard 2.0 Still Incompatible
32 %12 % 56 %All Packages
Provide portable asset Only use available APIs Use unavailable APIs
37 %30 % 33 %Top 1000 20 %
Uses app-model specific APIs, such as
• Classic ASP.NET
• WinForms
• WPF
• Xamarin Android & iOS
From those
50 % have also .NET Framework assets
of which
88 % are compatible
with .NET Core & Standard
0 1000 2000 3000 4000 5000 6000 7000 8000
(ASP.NET Classic)
(WinForms)
(WPF)
(Xamarin Android)
(Xamarin iOS)
Microsoft.VisualBasic
Microsoft.Win32
System
System.Collections
System.ComponentModel
System.ComponentModel.Composition
System.Data
System.Diagnostics
System.Drawing
System.Management
System.Net
System.Reflection
System.Runtime
System.Security
System.ServiceModel
<= 1
<= 5
<= 10
<= 20
<= 50
More
All Packages: Incompatible API Usage
Take Away
 Most packages depend on classic
ASP.NET
 Packages depending on app
models often use 50+ APIs
# of missing APIs
per package
0 200 400 600 800 1000 1200 1400 1600
Microsoft.Build
Microsoft.VisualBasic
Microsoft.Win32
System
System.Collections
System.ComponentModel
System.ComponentModel.Composition
System.Configuration
System.Data
System.Diagnostics
System.Drawing
System.IO
System.Management
System.Messaging
System.Net
System.Reactive
System.Reflection
System.Runtime
System.Security
System.ServiceModel
<= 1
<= 5
<= 10
<= 20
<= 50
More
All Packages: Incompatible API Usage
Excluding “lost causes”, i.e. only packages with no app model dependencies
# of missing APIs
per package
Take Away
 Relatively small # app-model agnostic
(7000)
 Looking at remaining technologies
there seem to be plenty of packages
that only use <= 5 APIs
Conclusion Part 1: .NET API Compatibility
• 69 % of all available NuGet packages are API compatible with .NET
Standard/.NET Core 2.0
• We shouldn’t prefer .NET Framework assets when compatible assets exists because
in those cases only 70 % are compatible with .NET Standard/Core 2.0
• Where both assets exist, in top 50 non-MSFT packages, the Standard asset uses
~10% fewer API (outliers: in one case 50% less): ie potentially cut-down functionality
• 20 % of all NuGet packages are app-model specific and thus not applicable
• Most depend on classic ASP.NET
• Packages depending on app models often use 50+ APIs
• 11 % of all NuGet packages use missing APIs
• The most used component we don’t have is System.Drawing
• Missing APIs in System.Data are in the process of being addressed
• The rest is distributed across a wide variety of technologies that we already support
in .NET Standard
• Fixing missing APIs in existing tech is hard as they are already maxed out
Part 2: P/Invoke Compatibility
• We’ve looked at packages and checked which P/Invokes are being
declared
• Top 1000
• All
• We’ve broken that down into the same categories as for managed
APIs
• We’ve bucketized the P/Invokes (e.g. Windows, libc etc) and plotted
how strong a package depends on it
P/Invokes in the Top 1000 Packages
37 %30 % 33 %Top 1000
Provide portable asset Only use available APIs Use unavailable APIs
P/Invokes 3 % 4 % 5 %
11 % of the API compatible packages have P/Invokes
P/Invokes in all packages on NuGet
32 %12 % 56 %All Packages
Provide portable asset Only use available APIs Use unavailable APIs
P/Invokes 0.4 % 4 % 4 %
6.5 % of the API compatible packages have P/Invokes
0 10 20 30 40 50 60 70
(ikvm)
(sqlite3)
(Windows)
/usr/lib/libobjc.dylib
/usr/lib/libsystem.dylib
credui
dnsapi
libc
libdl
mpr
powrprof
winmm
<= 1
<= 5
<= 10
<= 20
<= 50
More
Top 1000: P/Invokes in compatible libraries
Take Away
 Most packages with P/Invokes
depend on Win32
 A decent amount of them only use
a few APIs
Excluding “lost causes”, i.e. only packages with no app model dependencies
0 500 1000 1500 2000 2500
(sqlite3)
(Windows)
/usr/lib/libobjc.dylib
credui
Cryptdll
esent
iprop
libc
mpr
mtxex
ntdsapi
rpcrt4
security
Syncfusion.WebKitWrapper
version
winmm
<= 1
<= 5
<= 10
<= 20
<= 50
More
All Packages: P/Invokes in compatible libraries
Take Away
 Most packages with P/Invokes
depend on Win32
 A decent amount of them only use
a few APIs
Excluding “lost causes”, i.e. only packages with no app model dependencies
Conclusion Part 2: P/Invoke Compatibility
• Less than 7% of the packages that are API compatible have P/Invokes
• Most heavily depend on Win32
• Those libraries should work fine on Windows but won’t work as well on Linux
• The P/Invoke analysis does not change the earlier conclusion

Más contenido relacionado

La actualidad más candente

Microsoft .Net Framework
Microsoft .Net FrameworkMicrosoft .Net Framework
Microsoft .Net FrameworkRohit Rao
 
Facilitating Idiomatic Swift with Objective-C
Facilitating Idiomatic Swift with Objective-CFacilitating Idiomatic Swift with Objective-C
Facilitating Idiomatic Swift with Objective-CAaron Taylor
 
How to contribute to an open source project and don’t die during the Code Rev...
How to contribute to an open source project and don’t die during the Code Rev...How to contribute to an open source project and don’t die during the Code Rev...
How to contribute to an open source project and don’t die during the Code Rev...Victor Morales
 
Start with Angular framework
Start with Angular frameworkStart with Angular framework
Start with Angular frameworkKnoldus Inc.
 
ASP.NET 5 - Microsoft's Web development platform reimagined
ASP.NET 5 - Microsoft's Web development platform reimaginedASP.NET 5 - Microsoft's Web development platform reimagined
ASP.NET 5 - Microsoft's Web development platform reimaginedAlex Thissen
 
Mozilla: Automated Mozmill Tests
Mozilla: Automated Mozmill TestsMozilla: Automated Mozmill Tests
Mozilla: Automated Mozmill TestsHenrik Skupin
 
Alfresco WebScript Connector for Apache ManifoldCF
Alfresco WebScript Connector for Apache ManifoldCFAlfresco WebScript Connector for Apache ManifoldCF
Alfresco WebScript Connector for Apache ManifoldCFPiergiorgio Lucidi
 
DotNet Framework
DotNet FrameworkDotNet Framework
DotNet FrameworkWani Zahoor
 
Introduction to .NET Programming
Introduction to .NET ProgrammingIntroduction to .NET Programming
Introduction to .NET ProgrammingKarthikeyan Mkr
 
Observability beyond logging for Java Microservices
Observability beyond logging for Java MicroservicesObservability beyond logging for Java Microservices
Observability beyond logging for Java MicroservicesLuke Marsden
 
Microsoft &lt;3 Linux with ASP.NET Core
Microsoft &lt;3 Linux with ASP.NET CoreMicrosoft &lt;3 Linux with ASP.NET Core
Microsoft &lt;3 Linux with ASP.NET CoreJohn Patrick Oliveros
 
Validating latest changes with XCI
Validating latest changes with XCIValidating latest changes with XCI
Validating latest changes with XCIVictor Morales
 

La actualidad más candente (20)

Microsoft .Net Framework
Microsoft .Net FrameworkMicrosoft .Net Framework
Microsoft .Net Framework
 
Facilitating Idiomatic Swift with Objective-C
Facilitating Idiomatic Swift with Objective-CFacilitating Idiomatic Swift with Objective-C
Facilitating Idiomatic Swift with Objective-C
 
Presentation1.pptx
Presentation1.pptxPresentation1.pptx
Presentation1.pptx
 
Dependency injection
Dependency injectionDependency injection
Dependency injection
 
How to contribute to an open source project and don’t die during the Code Rev...
How to contribute to an open source project and don’t die during the Code Rev...How to contribute to an open source project and don’t die during the Code Rev...
How to contribute to an open source project and don’t die during the Code Rev...
 
Start with Angular framework
Start with Angular frameworkStart with Angular framework
Start with Angular framework
 
ASP.NET 5 - Microsoft's Web development platform reimagined
ASP.NET 5 - Microsoft's Web development platform reimaginedASP.NET 5 - Microsoft's Web development platform reimagined
ASP.NET 5 - Microsoft's Web development platform reimagined
 
Dot Net Core
Dot Net CoreDot Net Core
Dot Net Core
 
Mozilla: Automated Mozmill Tests
Mozilla: Automated Mozmill TestsMozilla: Automated Mozmill Tests
Mozilla: Automated Mozmill Tests
 
Uit 2015-cloud-v2
Uit 2015-cloud-v2Uit 2015-cloud-v2
Uit 2015-cloud-v2
 
Alfresco WebScript Connector for Apache ManifoldCF
Alfresco WebScript Connector for Apache ManifoldCFAlfresco WebScript Connector for Apache ManifoldCF
Alfresco WebScript Connector for Apache ManifoldCF
 
Cypress Testing.pptx
Cypress Testing.pptxCypress Testing.pptx
Cypress Testing.pptx
 
DotNet Framework
DotNet FrameworkDotNet Framework
DotNet Framework
 
Mozmill Crowd
Mozmill CrowdMozmill Crowd
Mozmill Crowd
 
1.0
1.01.0
1.0
 
Enterprise Library 5
Enterprise Library 5Enterprise Library 5
Enterprise Library 5
 
Introduction to .NET Programming
Introduction to .NET ProgrammingIntroduction to .NET Programming
Introduction to .NET Programming
 
Observability beyond logging for Java Microservices
Observability beyond logging for Java MicroservicesObservability beyond logging for Java Microservices
Observability beyond logging for Java Microservices
 
Microsoft &lt;3 Linux with ASP.NET Core
Microsoft &lt;3 Linux with ASP.NET CoreMicrosoft &lt;3 Linux with ASP.NET Core
Microsoft &lt;3 Linux with ASP.NET Core
 
Validating latest changes with XCI
Validating latest changes with XCIValidating latest changes with XCI
Validating latest changes with XCI
 

Similar a NET Standard NuGet Analysis

The how-dare-you-call-me-an-idiot’s guide to the .NET Standard (NDC London 2017)
The how-dare-you-call-me-an-idiot’s guide to the .NET Standard (NDC London 2017)The how-dare-you-call-me-an-idiot’s guide to the .NET Standard (NDC London 2017)
The how-dare-you-call-me-an-idiot’s guide to the .NET Standard (NDC London 2017)citizenmatt
 
.NET MeetUp Prague 2017 - .NET Standard -- Karel Zikmund
.NET MeetUp Prague 2017 - .NET Standard -- Karel Zikmund.NET MeetUp Prague 2017 - .NET Standard -- Karel Zikmund
.NET MeetUp Prague 2017 - .NET Standard -- Karel ZikmundKarel Zikmund
 
.NET MeetUp Amsterdam 2017 - .NET Standard -- Karel Zikmund
.NET MeetUp Amsterdam 2017 - .NET Standard -- Karel Zikmund.NET MeetUp Amsterdam 2017 - .NET Standard -- Karel Zikmund
.NET MeetUp Amsterdam 2017 - .NET Standard -- Karel ZikmundKarel Zikmund
 
Raffaele Rialdi
Raffaele RialdiRaffaele Rialdi
Raffaele RialdiCodeFest
 
DevOps at Amazon: A Look at Our Tools and Processes
DevOps at Amazon: A Look at Our Tools and ProcessesDevOps at Amazon: A Look at Our Tools and Processes
DevOps at Amazon: A Look at Our Tools and ProcessesAmazon Web Services
 
Dotnetintroduce 100324201546-phpapp02
Dotnetintroduce 100324201546-phpapp02Dotnetintroduce 100324201546-phpapp02
Dotnetintroduce 100324201546-phpapp02Wei Sun
 
ITCamp 2017 - Raffaele Rialdi - Adopting .NET Core in Mainstream Projects
ITCamp 2017 - Raffaele Rialdi - Adopting .NET Core in Mainstream ProjectsITCamp 2017 - Raffaele Rialdi - Adopting .NET Core in Mainstream Projects
ITCamp 2017 - Raffaele Rialdi - Adopting .NET Core in Mainstream ProjectsITCamp
 
Whats new in .NET for 2019
Whats new in .NET for 2019Whats new in .NET for 2019
Whats new in .NET for 2019Rory Preddy
 
Introduction to dot net
Introduction to dot netIntroduction to dot net
Introduction to dot netQIANG XU
 
DevOps at Amazon: A Look at Our Tools and Processes
DevOps at Amazon: A Look at Our Tools and ProcessesDevOps at Amazon: A Look at Our Tools and Processes
DevOps at Amazon: A Look at Our Tools and ProcessesAmazon Web Services
 
Fasten Industry Meeting with GitHub about Dependancy Management
Fasten Industry Meeting with GitHub about Dependancy ManagementFasten Industry Meeting with GitHub about Dependancy Management
Fasten Industry Meeting with GitHub about Dependancy ManagementFasten Project
 
DevJam 2019 - Building an ALEC Time Engine
DevJam 2019 - Building an ALEC Time EngineDevJam 2019 - Building an ALEC Time Engine
DevJam 2019 - Building an ALEC Time EngineRonny Trommer
 
Effective and Efficient API Misuse Detection via Exception Propagation and Se...
Effective and Efficient API Misuse Detection via Exception Propagation and Se...Effective and Efficient API Misuse Detection via Exception Propagation and Se...
Effective and Efficient API Misuse Detection via Exception Propagation and Se...XavierDevroey
 
What's New in AppFuse 2.0
What's New in AppFuse 2.0What's New in AppFuse 2.0
What's New in AppFuse 2.0Matt Raible
 
Lecture11_LaravelGetStarted_SPring2023.pdf
Lecture11_LaravelGetStarted_SPring2023.pdfLecture11_LaravelGetStarted_SPring2023.pdf
Lecture11_LaravelGetStarted_SPring2023.pdfShaimaaMohamedGalal
 
Microservices with Azure Service Fabric
Microservices with Azure Service FabricMicroservices with Azure Service Fabric
Microservices with Azure Service FabricDavide Benvegnù
 
Nike pop up habitat
Nike pop up   habitatNike pop up   habitat
Nike pop up habitatChef
 
AWS CodeCommit, CodeDeploy & CodePipeline
AWS CodeCommit, CodeDeploy & CodePipelineAWS CodeCommit, CodeDeploy & CodePipeline
AWS CodeCommit, CodeDeploy & CodePipelineJulien SIMON
 
Kubernetes deep dive - - Huawei 2015-10
Kubernetes deep dive - - Huawei 2015-10Kubernetes deep dive - - Huawei 2015-10
Kubernetes deep dive - - Huawei 2015-10Vishnu Kannan
 

Similar a NET Standard NuGet Analysis (20)

The how-dare-you-call-me-an-idiot’s guide to the .NET Standard (NDC London 2017)
The how-dare-you-call-me-an-idiot’s guide to the .NET Standard (NDC London 2017)The how-dare-you-call-me-an-idiot’s guide to the .NET Standard (NDC London 2017)
The how-dare-you-call-me-an-idiot’s guide to the .NET Standard (NDC London 2017)
 
.NET MeetUp Prague 2017 - .NET Standard -- Karel Zikmund
.NET MeetUp Prague 2017 - .NET Standard -- Karel Zikmund.NET MeetUp Prague 2017 - .NET Standard -- Karel Zikmund
.NET MeetUp Prague 2017 - .NET Standard -- Karel Zikmund
 
.NET MeetUp Amsterdam 2017 - .NET Standard -- Karel Zikmund
.NET MeetUp Amsterdam 2017 - .NET Standard -- Karel Zikmund.NET MeetUp Amsterdam 2017 - .NET Standard -- Karel Zikmund
.NET MeetUp Amsterdam 2017 - .NET Standard -- Karel Zikmund
 
Raffaele Rialdi
Raffaele RialdiRaffaele Rialdi
Raffaele Rialdi
 
DevOps at Amazon: A Look at Our Tools and Processes
DevOps at Amazon: A Look at Our Tools and ProcessesDevOps at Amazon: A Look at Our Tools and Processes
DevOps at Amazon: A Look at Our Tools and Processes
 
Dotnetintroduce 100324201546-phpapp02
Dotnetintroduce 100324201546-phpapp02Dotnetintroduce 100324201546-phpapp02
Dotnetintroduce 100324201546-phpapp02
 
ITCamp 2017 - Raffaele Rialdi - Adopting .NET Core in Mainstream Projects
ITCamp 2017 - Raffaele Rialdi - Adopting .NET Core in Mainstream ProjectsITCamp 2017 - Raffaele Rialdi - Adopting .NET Core in Mainstream Projects
ITCamp 2017 - Raffaele Rialdi - Adopting .NET Core in Mainstream Projects
 
Whats new in .NET for 2019
Whats new in .NET for 2019Whats new in .NET for 2019
Whats new in .NET for 2019
 
Introduction to dot net
Introduction to dot netIntroduction to dot net
Introduction to dot net
 
DevOps at Amazon: A Look at Our Tools and Processes
DevOps at Amazon: A Look at Our Tools and ProcessesDevOps at Amazon: A Look at Our Tools and Processes
DevOps at Amazon: A Look at Our Tools and Processes
 
Fasten Industry Meeting with GitHub about Dependancy Management
Fasten Industry Meeting with GitHub about Dependancy ManagementFasten Industry Meeting with GitHub about Dependancy Management
Fasten Industry Meeting with GitHub about Dependancy Management
 
DevJam 2019 - Building an ALEC Time Engine
DevJam 2019 - Building an ALEC Time EngineDevJam 2019 - Building an ALEC Time Engine
DevJam 2019 - Building an ALEC Time Engine
 
Effective and Efficient API Misuse Detection via Exception Propagation and Se...
Effective and Efficient API Misuse Detection via Exception Propagation and Se...Effective and Efficient API Misuse Detection via Exception Propagation and Se...
Effective and Efficient API Misuse Detection via Exception Propagation and Se...
 
What's New in AppFuse 2.0
What's New in AppFuse 2.0What's New in AppFuse 2.0
What's New in AppFuse 2.0
 
Lecture11_LaravelGetStarted_SPring2023.pdf
Lecture11_LaravelGetStarted_SPring2023.pdfLecture11_LaravelGetStarted_SPring2023.pdf
Lecture11_LaravelGetStarted_SPring2023.pdf
 
Microservices with Azure Service Fabric
Microservices with Azure Service FabricMicroservices with Azure Service Fabric
Microservices with Azure Service Fabric
 
Nike pop up habitat
Nike pop up   habitatNike pop up   habitat
Nike pop up habitat
 
AWS CodeCommit, CodeDeploy & CodePipeline
AWS CodeCommit, CodeDeploy & CodePipelineAWS CodeCommit, CodeDeploy & CodePipeline
AWS CodeCommit, CodeDeploy & CodePipeline
 
Developer Tools at AWS 2018.pdf
Developer Tools at AWS 2018.pdfDeveloper Tools at AWS 2018.pdf
Developer Tools at AWS 2018.pdf
 
Kubernetes deep dive - - Huawei 2015-10
Kubernetes deep dive - - Huawei 2015-10Kubernetes deep dive - - Huawei 2015-10
Kubernetes deep dive - - Huawei 2015-10
 

Último

week 1 cookery 8 fourth - quarter .pptx
week 1 cookery 8  fourth  -  quarter .pptxweek 1 cookery 8  fourth  -  quarter .pptx
week 1 cookery 8 fourth - quarter .pptxJonalynLegaspi2
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxBIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxSayali Powar
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSMae Pangan
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
How to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseHow to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseCeline George
 
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...DhatriParmar
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDhatriParmar
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Association for Project Management
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Projectjordimapav
 
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnvESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnvRicaMaeCastro1
 
4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptxmary850239
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 
Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1GloryAnnCastre1
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxMan or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxDhatriParmar
 

Último (20)

week 1 cookery 8 fourth - quarter .pptx
week 1 cookery 8  fourth  -  quarter .pptxweek 1 cookery 8  fourth  -  quarter .pptx
week 1 cookery 8 fourth - quarter .pptx
 
prashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Professionprashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Profession
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxBIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHS
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
How to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseHow to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 Database
 
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Project
 
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnvESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
 
Paradigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTAParadigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTA
 
4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 
Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxMan or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
 

NET Standard NuGet Analysis

  • 2. Context Part 1 .NET API Compatibility Part 2 P/Invoke Compatibility
  • 3. Part 1: .NET API Compatibility • We’ve looked at packages and checked which .NET APIs they are using • Top 1000 • All • We’ve broken down the packages into three buckets: • Packages that target .NET Standard/PCLs • Packages that only use APIs available in .NET Standard 2.0 • Packages that use APIs unavailable in .NET Standard 2.0 • We’ve grouped the missing APIs by namespace and plotted how strong a package depends on it
  • 4. Compatibility of the Top 1000 Packages 63 % are API compatible with .NET Core & Standard 2.0 Still Incompatible 37 %30 % 33 %Top 1000 Provide portable asset Only use available APIs Use unavailable APIs 24 % Uses app-model specific APIs, such as • Classic ASP.NET • WinForms • WPF • Xamarin Android & iOS From those 87 % have also .NET Framework assets of which 70 % are compatible with .NET Core & Standard
  • 5. 0 20 40 60 80 100 120 140 160 180 200 (ASP.NET Classic) (WinForms) (WPF) (Xamarin Android) Microsoft.Win32 System System.Collections System.ComponentModel System.ComponentModel.Composition System.Data System.Diagnostics System.Drawing System.IdentityModel System.Net System.Reflection System.Runtime System.Security System.ServiceModel <= 1 <= 5 <= 10 <= 20 <= 50 More Top 1000: Incompatible API Usage # of missing APIs per package Take Away  Most packages depend on classic ASP.NET  Packages depending on app models often use 50+ APIs
  • 6. 0 10 20 30 40 50 60 System System.Runtime System.Security System.Reflection System.Data System.Diagnostics System.Drawing System.ComponentModel.Composition System.Net Microsoft.Win32 <= 1 <= 5 <= 10 <= 20 <= 50 More Top 1000: Incompatible API Usage Excluding “lost causes”, i.e. only packages with no app model dependencies Take Away  Small # app-model agnostic (120)  Looking at remaining technologies there seem to be plenty of packages that only use <= 5 APIs # of missing APIs per package
  • 7. Compatibility of all packages on NuGet 69 % are API compatible with .NET Core & Standard 2.0 Still Incompatible 32 %12 % 56 %All Packages Provide portable asset Only use available APIs Use unavailable APIs 37 %30 % 33 %Top 1000 20 % Uses app-model specific APIs, such as • Classic ASP.NET • WinForms • WPF • Xamarin Android & iOS From those 50 % have also .NET Framework assets of which 88 % are compatible with .NET Core & Standard
  • 8. 0 1000 2000 3000 4000 5000 6000 7000 8000 (ASP.NET Classic) (WinForms) (WPF) (Xamarin Android) (Xamarin iOS) Microsoft.VisualBasic Microsoft.Win32 System System.Collections System.ComponentModel System.ComponentModel.Composition System.Data System.Diagnostics System.Drawing System.Management System.Net System.Reflection System.Runtime System.Security System.ServiceModel <= 1 <= 5 <= 10 <= 20 <= 50 More All Packages: Incompatible API Usage Take Away  Most packages depend on classic ASP.NET  Packages depending on app models often use 50+ APIs # of missing APIs per package
  • 9. 0 200 400 600 800 1000 1200 1400 1600 Microsoft.Build Microsoft.VisualBasic Microsoft.Win32 System System.Collections System.ComponentModel System.ComponentModel.Composition System.Configuration System.Data System.Diagnostics System.Drawing System.IO System.Management System.Messaging System.Net System.Reactive System.Reflection System.Runtime System.Security System.ServiceModel <= 1 <= 5 <= 10 <= 20 <= 50 More All Packages: Incompatible API Usage Excluding “lost causes”, i.e. only packages with no app model dependencies # of missing APIs per package Take Away  Relatively small # app-model agnostic (7000)  Looking at remaining technologies there seem to be plenty of packages that only use <= 5 APIs
  • 10. Conclusion Part 1: .NET API Compatibility • 69 % of all available NuGet packages are API compatible with .NET Standard/.NET Core 2.0 • We shouldn’t prefer .NET Framework assets when compatible assets exists because in those cases only 70 % are compatible with .NET Standard/Core 2.0 • Where both assets exist, in top 50 non-MSFT packages, the Standard asset uses ~10% fewer API (outliers: in one case 50% less): ie potentially cut-down functionality • 20 % of all NuGet packages are app-model specific and thus not applicable • Most depend on classic ASP.NET • Packages depending on app models often use 50+ APIs • 11 % of all NuGet packages use missing APIs • The most used component we don’t have is System.Drawing • Missing APIs in System.Data are in the process of being addressed • The rest is distributed across a wide variety of technologies that we already support in .NET Standard • Fixing missing APIs in existing tech is hard as they are already maxed out
  • 11. Part 2: P/Invoke Compatibility • We’ve looked at packages and checked which P/Invokes are being declared • Top 1000 • All • We’ve broken that down into the same categories as for managed APIs • We’ve bucketized the P/Invokes (e.g. Windows, libc etc) and plotted how strong a package depends on it
  • 12. P/Invokes in the Top 1000 Packages 37 %30 % 33 %Top 1000 Provide portable asset Only use available APIs Use unavailable APIs P/Invokes 3 % 4 % 5 % 11 % of the API compatible packages have P/Invokes
  • 13. P/Invokes in all packages on NuGet 32 %12 % 56 %All Packages Provide portable asset Only use available APIs Use unavailable APIs P/Invokes 0.4 % 4 % 4 % 6.5 % of the API compatible packages have P/Invokes
  • 14. 0 10 20 30 40 50 60 70 (ikvm) (sqlite3) (Windows) /usr/lib/libobjc.dylib /usr/lib/libsystem.dylib credui dnsapi libc libdl mpr powrprof winmm <= 1 <= 5 <= 10 <= 20 <= 50 More Top 1000: P/Invokes in compatible libraries Take Away  Most packages with P/Invokes depend on Win32  A decent amount of them only use a few APIs Excluding “lost causes”, i.e. only packages with no app model dependencies
  • 15. 0 500 1000 1500 2000 2500 (sqlite3) (Windows) /usr/lib/libobjc.dylib credui Cryptdll esent iprop libc mpr mtxex ntdsapi rpcrt4 security Syncfusion.WebKitWrapper version winmm <= 1 <= 5 <= 10 <= 20 <= 50 More All Packages: P/Invokes in compatible libraries Take Away  Most packages with P/Invokes depend on Win32  A decent amount of them only use a few APIs Excluding “lost causes”, i.e. only packages with no app model dependencies
  • 16. Conclusion Part 2: P/Invoke Compatibility • Less than 7% of the packages that are API compatible have P/Invokes • Most heavily depend on Win32 • Those libraries should work fine on Windows but won’t work as well on Linux • The P/Invoke analysis does not change the earlier conclusion