title: How to set target net7.0 -windows?
body: <p>I try change</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;Project Sdk=&quot;Microsoft.NET.Sdk&quot;&gt;
  
    &lt;PropertyGroup&gt;
      &lt;OutputType&gt;WinExe&lt;/OutputType&gt;
      &lt;TargetFramework&gt;net6.0-windows&lt;/TargetFramework&gt;
      &lt;UseWindowsForms&gt;true&lt;/UseWindowsForms&gt;
    &lt;/PropertyGroup&gt;
  
  </code></pre>
  <p>to</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;Project Sdk=&quot;Microsoft.NET.Sdk&quot;&gt;
  
    &lt;PropertyGroup&gt;
      &lt;OutputType&gt;WinExe&lt;/OutputType&gt;
      &lt;TargetFramework&gt;net7.0-windows&lt;/TargetFramework&gt;
      &lt;UseWindowsForms&gt;true&lt;/UseWindowsForms&gt;
    &lt;/PropertyGroup&gt;
  
  </code></pre>
  <p>but build error. How to set target to <code>net7.0-windows</code> success?</p>
  <p><a href="https://i.stack.imgur.com/mAWxs.png" rel="noreferrer"><img src="https://i.stack.imgur.com/mAWxs.png" alt="enter image description here" /></a></p>
  <pre><code>Severity    Code    Description Project File    Line    Suppression State
  Error   NETSDK1045  The current .NET SDK does not support targeting .NET 7.0.  Either target .NET 6.0 or lower, or use a version of the .NET SDK that supports .NET 7.0.    acore   C:\Program Files\dotnet\sdk\6.0.201\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets   144 
  
  </code></pre>
  <p><a href="https://i.stack.imgur.com/QfN0U.png" rel="noreferrer"><img src="https://i.stack.imgur.com/QfN0U.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/j2sj3.png" rel="noreferrer"><img src="https://i.stack.imgur.com/j2sj3.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/0n94t.png" rel="noreferrer"><img src="https://i.stack.imgur.com/0n94t.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/YIpSQ.png" rel="noreferrer"><img src="https://i.stack.imgur.com/YIpSQ.png" alt="enter image description here" /></a></p>
  <pre><code>C:\Users\donhu&gt;dotnet --info
  .NET SDK (reflecting any global.json):
   Version:   7.0.100-preview.2.22153.17
   Commit:    9c52c56c13
  
  Runtime Environment:
   OS Name:     Windows
   OS Version:  10.0.22000
   OS Platform: Windows
   RID:         win10-x64
   Base Path:   C:\Program Files\dotnet\sdk\7.0.100-preview.2.22153.17\
  
  Host (useful for support):
    Version: 7.0.0-preview.2.22152.2
    Commit:  e24f66dff0
  
  .NET SDKs installed:
    6.0.201 [C:\Program Files\dotnet\sdk]
    7.0.100-preview.2.22153.17 [C:\Program Files\dotnet\sdk]
  
  .NET runtimes installed:
    Microsoft.AspNetCore.App 3.1.23 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
    Microsoft.AspNetCore.App 5.0.15 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
    Microsoft.AspNetCore.App 6.0.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
    Microsoft.AspNetCore.App 7.0.0-preview.2.22153.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
    Microsoft.NETCore.App 3.1.23 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
    Microsoft.NETCore.App 5.0.15 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
    Microsoft.NETCore.App 6.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
    Microsoft.NETCore.App 7.0.0-preview.2.22152.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
    Microsoft.WindowsDesktop.App 3.1.23 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
    Microsoft.WindowsDesktop.App 5.0.15 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
    Microsoft.WindowsDesktop.App 6.0.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
    Microsoft.WindowsDesktop.App 7.0.0-preview.2.22153.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  
  To install additional .NET runtimes or SDKs:
    https://aka.ms/dotnet-download
  
  C:\Users\donhu&gt;
  </code></pre>
  <p>Related: <a href="https://docs.microsoft.com/en-us/visualstudio/ide/visual-studio-multi-targeting-overview?view=vs-2022" rel="noreferrer">https://docs.microsoft.com/en-us/visualstudio/ide/visual-studio-multi-targeting-overview?view=vs-2022</a></p>