{"id":879,"date":"2024-01-09T16:27:34","date_gmt":"2024-01-09T19:27:34","guid":{"rendered":"https:\/\/ricaun.com\/?p=879"},"modified":"2024-07-29T11:47:05","modified_gmt":"2024-07-29T14:47:05","slug":"revit-api-net-core","status":"publish","type":"post","link":"https:\/\/ricaun.com\/br\/revit-api-net-core\/","title":{"rendered":"Revit API .Net Core"},"content":{"rendered":"<p>Finally, Revit API gonna be updated to .NET Core, at the moment the Revit 2025 Preview is running in .NET Core 7.0, and basically, you need to select the target framework to &#8216;net7.0-windows&#8217; and select the Revit API references using the package <strong>Revit_All_Main_Versions_API_x64<\/strong> for the version 2025 and you are ready to go.<\/p>\n\n\n\n<p>There are other configurations in the<em> .csproj<\/em> when using .NET Core that are important to change. To have the same reference files when building the project similar to the .NET Framework.<\/p>\n\n\n<p><script src=\"https:\/\/gist.github.com\/ricaun\/ebaaa14f9ad487cf7b84aaf39c34f8f2.js\"><\/script><\/p>\n\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Update a RevitAddin Project<\/h4>\n\n\n\n<p>In the video below I update the project <strong>RevitAddin.DI.Example<\/strong> work with .NET Core, in that case, all the packages and references used in the project are already prepared to work with the .NET Core.<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<div class=\"nv-iframe-embed\"><iframe loading=\"lazy\" title=\"Revit API is moving to .NET Core 7.0\" width=\"1200\" height=\"675\" src=\"https:\/\/www.youtube.com\/embed\/EysAn87iqWo?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen><\/iframe><\/div>\n<\/div><\/figure>\n\n\n\n<p>The template used in the project was kind of ready for the day Autodesk decided to update to .Net Core. The .csproj and the build automation to create all the Revit versions and the installation is from the <a href=\"https:\/\/ricaun.com\/apploader\/\" target=\"_blank\" rel=\"noopener\" title=\"\">AppLoader<\/a> plugin.<\/p>\n\n\n\n<p>When Revit 2025 is officially released I hope that uses .NET 8.0 just to be consistent with Microsoft Lifecycle. The version .NET 7.0 ends on May 14, 2024. Revit usually is released in April, so probably gonna be version .NET 8 makes more sense.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">References<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/adndevblog.typepad.com\/aec\/2023\/11\/revit-api-is-moving-to-net-core-70.html\" target=\"_blank\" rel=\"noopener\" title=\"\">ADN DevBlog &#8211; Revit API is moving to .NET Core 7.0<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/thebuildingcoder.typepad.com\/blog\/2023\/11\/net-core-preview-and-open-source-add-in-projects.html#2\" target=\"_blank\" rel=\"noopener\" title=\"\">The Building Coder &#8211; .NET Core Preview<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/thebuildingcoder.typepad.com\/blog\/2023\/12\/parameters-and-net-core-webinar.html#2\" target=\"_blank\" rel=\"noopener\" title=\"\">The Building Coder &#8211; .NET Core Migration Webinar<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/thebuildingcoder.typepad.com\/blog\/2024\/04\/migrating-from-net-48-to-net-core-8.html\" target=\"_blank\" rel=\"noopener\" title=\"\">The Building Coder &#8211; Migrating from .NET 4.8 to .NET Core 8<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/ricaun-io\/RevitAddin.DI.Example\" target=\"_blank\" rel=\"noopener\" title=\"\">Github &#8211; RevitAddin.DI.Example<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.nuget.org\/packages\/Revit_All_Main_Versions_API_x64\" target=\"_blank\" rel=\"noopener\" title=\"\">Nuget Package &#8211; Revit_All_Main_Versions_API_x64<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Finally, Revit API gonna be updated to .NET Core, at the moment the Revit 2025 Preview is running in .NET Core 7.0, and basically, you need to select the target framework to &#8216;net7.0-windows&#8217; and select the Revit API references using the package Revit_All_Main_Versions_API_x64 for the version 2025 and you are ready to go. There are&hellip;&nbsp;<a href=\"https:\/\/ricaun.com\/br\/revit-api-net-core\/\" class=\"\" rel=\"bookmark\">Continue a ler &raquo;<span class=\"screen-reader-text\">Revit API .Net Core<\/span><\/a><\/p>","protected":false},"author":1,"featured_media":895,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","_ti_tpc_template_sync":false,"_ti_tpc_template_id":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-879","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-revit-api"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/ricaun.com\/br\/wp-json\/wp\/v2\/posts\/879","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ricaun.com\/br\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ricaun.com\/br\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ricaun.com\/br\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ricaun.com\/br\/wp-json\/wp\/v2\/comments?post=879"}],"version-history":[{"count":11,"href":"https:\/\/ricaun.com\/br\/wp-json\/wp\/v2\/posts\/879\/revisions"}],"predecessor-version":[{"id":938,"href":"https:\/\/ricaun.com\/br\/wp-json\/wp\/v2\/posts\/879\/revisions\/938"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ricaun.com\/br\/wp-json\/wp\/v2\/media\/895"}],"wp:attachment":[{"href":"https:\/\/ricaun.com\/br\/wp-json\/wp\/v2\/media?parent=879"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ricaun.com\/br\/wp-json\/wp\/v2\/categories?post=879"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ricaun.com\/br\/wp-json\/wp\/v2\/tags?post=879"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}