A Snail.

Pitfalls of Unoptimized NuGet Packages

Summary You might unknowingly be using an unoptimized dependency which could impact the performance of your app. Now, it’s easy to get a warning if that happens, at build time, using the NuGet package UnoptimizedAssemblyDetector: <PackageReference Include="UnoptimizedAssemblyDetector" Version="0.1.0"> <PrivateAssets>all</PrivateAssets> </PackageReference> After you add this NuGet package, a warning will be included in your build if any unoptimized assembly is detected. The source code of project is hosted on GitHub ⭐. What’s the pitfall? The default build configuration for dotnet pack and dotnet publish is not Release as you might assume or expect. When publishing NuGet packages to nuget.org, one must explicitly make it a release package, like: dotnet pack -c Release. Without it, the assemblies packed will not be compiled with optimizations. In this blog post you’ll learn that’s not always the case. Even for those who know, accidents happens and a misconfigured build script can result in a Debug build ending up on nuget.org. ...

May 21, 2021 · 11 min · Bruno Garcia

NuGetTrends: .NET libraries download trends

I joined sentry.io just over a year ago. Soon after I started, I was tasked with writing a new .NET SDK for Sentry. Throughout the previews, I was always curious if the releases were being downloaded at all. I found myself checking nuget.org and looking at the Statistics for total downloads. It was obvious we in the .NET ecosystem were missing some package download stats website. Welcome NuGet Trends, to the .NET community! NuGet Trends is a website with historical total download count for NuGet packages on nuget.org. ...

July 16, 2019 · 2 min · Bruno Garcia

.NET runtime information in different systems

Edit: I’ve created a repository on GitHub to expose an API which simplifies getting runtime, operating system and other platform information: https://github.com/getsentry/dotnet-sentry-platform-abstractions If you are interested in contributing, please let me know. A few issues were created to discuss API design and features, feel free to drop a message there. There is already code to detect the different installations of the .NET Framework installed and also what runtime the code is running on. Preview versions are available on NuGet.org. ...

April 15, 2018 · 8 min · Bruno Garcia

CI/CD for .NET with GitHub/Travis-CI/AppVeyor/Codecov/NuGet

I recently setup continuous integration for a few open source projects. I used GitHub, AppVeyor, Travis-CI and Codecov. The resulting packages are deployed to NuGet.org. Here I aim to describe the process in an attempt to document it both for myself and hopefully help others in getting started with it. Scenario I have some .NET Core projects on GitHub that are actually just .NET Standard libraries. Ultimately, once they are built and tested on Windows, MacOS and Linux, I want them published to NuGet.org. I also want to use GitHub’s Release feature to document what I am pushing to NuGet. ...

December 2, 2017 · 9 min · Bruno Garcia