roslyn
roslyn copied to clipboard
Roslyn incorrectly report some API as `Not Available ⚠` in IntelliSense list for mulit targetframeworks projects
Version Used: VS2022 17.1.0 preview1.1
Steps to Reproduce:
- Create an new console app, and change it to multi target frameworks with
net6.0;net472
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net6.0;net472</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
</PropertyGroup>
</Project>
- Try to autocomplete
ProcessStartInfowith the below code
using System.Diagnostics;
Process.Start(new Pro { });//<--Try to autocomplete `ProcessStartInfo` here and see it in IntelliSense list
Expected Behavior: The API should be available for both target framework.
Actual Behavior:
Roslyn report ProcessStartInfo is not avilable in net472
