{"id":2651,"date":"2023-02-14T13:43:08","date_gmt":"2023-02-14T21:43:08","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/dotnet\/?p=2651"},"modified":"2023-02-14T13:43:08","modified_gmt":"2023-02-14T21:43:08","slug":"introducing-search-by-target-framework-on-nuget-org","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/introducing-search-by-target-framework-on-nuget-org\/","title":{"rendered":"Introducing Search By Target Framework on NuGet.org"},"content":{"rendered":"<p>Last year, we brought a new feature to improve the way you assess <a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/introducing-compatible-frameworks-on-nuget-org\/\">target framework compatibility of a NuGet package through a new &#8220;Frameworks&#8221; tab<\/a>.<\/p>\n<p>Today, we are announcing a new feature that will allow you to search by a target framework on <a href=\"https:\/\/www.nuget.org\/\">NuGet.org<\/a>. Here\u2019s how it looks:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2023\/02\/FullExperience-1.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2023\/02\/FullExperience-1-430x350.png\" alt=\"Image FullExperience\" width=\"430\" height=\"350\" class=\"aligncenter size-medium wp-image-2658\" \/><\/a><\/p>\n<p>The first thing you might notice is that there is a new \u201cFrameworks\u201d filter on the left where you can select from a collection of .NET frameworks you\u2019re interested in a package providing assets for.<\/p>\n<p>Selecting .NET in this example will match packages that are built for modern .NET including <code>net5.0<\/code> through <code>net7.0<\/code> and provides at least one of these versions with a framework asset respectfully.<\/p>\n<p>If you\u2019d like to get more specific about the version, you can expand the parent element and then select a combination of known target frameworks.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2023\/02\/SingleSelection-1.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2023\/02\/SingleSelection-1-430x350.png\" alt=\"Image SingleSelection\" width=\"430\" height=\"350\" class=\"aligncenter size-medium wp-image-2659\" \/><\/a><\/p>\n<p>One key design principle in the .NET framework is backwards compatibility, which enables developers to upgrade their applications and packages to newer versions of the framework without having to completely rewrite their code.<\/p>\n<p>Whether you are looking for compatible packages on the latest .NET framework or packages still targeting the framework you are, this feature is here to help.<\/p>\n<p>Finally, you may have noticed some elements were moved on the search page. We wanted to take this opportunity to put filters in a logical place where they\u2019re always available and we moved the sort options to a more accessible location. In short:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2023\/02\/Meme-1.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2023\/02\/Meme-1-339x350.png\" alt=\"Image Meme\" width=\"339\" height=\"350\" class=\"aligncenter size-medium wp-image-2666\" \/><\/a><\/p>\n<h2>Wait&#8230;What&#8217;s a Target Framework Again?<\/h2>\n<p>A <a href=\"https:\/\/learn.microsoft.com\/dotnet\/standard\/frameworks\">target framework<\/a> is a .NET framework that a NuGet package is built and designed to work with. When a package is created, the developer specifies which target framework(s) the package supports. The target framework is typically specified using a specific .NET Framework, .NET Core, or .NET Standard version.<\/p>\n<p>For example, if a package specifies that it targets the .NET Framework 4.6 (<code>net46<\/code> for short), that means the package is built and designed to work with applications that are built using the .NET Framework 4.6 or higher.<\/p>\n<p>If a developer upgrades their project\u2019s target framework to .NET 4.7, they may need to update the NuGet packages they use to maintain compatibility and ensure their application continues to work as expected.<\/p>\n<p>If a package targets .NET Standard 2.0, it means that the package is built and designed to work with any runtime that supports the .NET Standard 2.0, including .NET Framework, .NET Core, and .NET.<\/p>\n<p>When a developer installs a package in their project, they can specify the target framework they are using, and NuGet will check that the package is compatible with that framework. This ensures that developers can use packages that are designed to work with the framework they are using and can also ensure that packages do not have any versioning conflicts.<\/p>\n<h2>What&#8217;s Next?<\/h2>\n<p>The next step in this feature area is to bring this target framework awareness to the NuGet protocol so that clients like Visual Studio and CLI tooling can also provide rich experiences for filtering packages.<\/p>\n<p>In addition, <a href=\"https:\/\/dotnet.microsoft.com\/\">.NET has been growing the number of platforms these target frameworks support over the years<\/a> and we want to make it easier for you to find packages based on more helpful factors such as platforms a target framework supports and their respective platform versions.<\/p>\n<h2>Feedback<\/h2>\n<p>We are continuously working to improve NuGet and NuGet.org to better meet the needs of the community. We would love to <a href=\"https:\/\/github.com\/NuGet\/NuGetGallery\/issues\/new\/choose\">hear your thoughts on this feature<\/a>, including any feedback you have on it, what would be most helpful to you, and any potential challenges you run into. Your feedback is essential in helping us ensure that we are building the right features to meet your needs, and we thank you for taking the time in sharing your thoughts with us.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last year, we brought a new feature to improve the way you assess target framework compatibility of a NuGet package through a new &#8220;Frameworks&#8221; tab. Today, we are announcing a new feature that will allow you to search by a target framework on NuGet.org. Here\u2019s how it looks: The first thing you might notice is [&hellip;]<\/p>\n","protected":false},"author":551,"featured_media":2658,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[7933,7874,7931],"tags":[7996,7848,7997,7966,7967],"class_list":["post-2651","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-feature-announcement","category-nuget","category-nuget-org","tag-advanced-filters","tag-nuget-org","tag-search-by-tfm","tag-target-framework","tag-target-framework-moniker"],"acf":[],"blog_post_summary":"<p>Last year, we brought a new feature to improve the way you assess target framework compatibility of a NuGet package through a new &#8220;Frameworks&#8221; tab. Today, we are announcing a new feature that will allow you to search by a target framework on NuGet.org. Here\u2019s how it looks: The first thing you might notice is [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/2651","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/users\/551"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/comments?post=2651"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/2651\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media\/2658"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media?parent=2651"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=2651"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=2651"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}