{"id":755,"date":"2024-02-26T09:46:54","date_gmt":"2024-02-26T08:46:54","guid":{"rendered":"https:\/\/thomasjansen.eu\/?p=755"},"modified":"2024-02-26T09:46:54","modified_gmt":"2024-02-26T08:46:54","slug":"add-winform-support-to-a-net-678-project","status":"publish","type":"post","link":"https:\/\/thomas-jansen.eu\/?p=755","title":{"rendered":"Add winform support to a .NET 6,7,8 project"},"content":{"rendered":"\n<p>To add winforms support to an .NET class (Windows only) library add &lt;UseWindowsForms>true&lt;\/UseWindowsForms> to the project file. It will look like something below. (.NET 8.0)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;Project Sdk=\"Microsoft.NET.Sdk\">\n  &lt;PropertyGroup>\n    &lt;TargetFramework>net8.0-windows&lt;\/TargetFramework>\n    &lt;ImplicitUsings>enable&lt;\/ImplicitUsings>\n    &lt;Nullable>enable&lt;\/Nullable>\n   <strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-blue-color\">&lt;UseWindowsForms>true&lt;\/UseWindowsForms><\/mark><\/strong>\n  &lt;\/PropertyGroup>\n&lt;\/Project>\n<\/code><\/pre>\n\n\n\n<p><br><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>To add winforms support to an .NET class (Windows only) library add &lt;UseWindowsForms>true&lt;\/UseWindowsForms> to the project file. It will look like something below. (.NET 8.0)<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-755","post","type-post","status-publish","format-standard","hentry","category-c"],"_links":{"self":[{"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=\/wp\/v2\/posts\/755","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=755"}],"version-history":[{"count":1,"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=\/wp\/v2\/posts\/755\/revisions"}],"predecessor-version":[{"id":756,"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=\/wp\/v2\/posts\/755\/revisions\/756"}],"wp:attachment":[{"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=755"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=755"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=755"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}