The Solution Explorer tree does not currently show these other views (we’re
looking at doing this in a future version), you can add the following to your
project:
<ItemGroup>
<None Include="**/*.cs"
Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder);$(Compile)" />
</ItemGroup>
Which will include these files that you’ve excluded below.
For files that have #if around them, you can view the other contexts by
changing this drop down in the corner of the editor:
[cid:[email protected]]
From: [email protected] <[email protected]> On Behalf
Of Greg Keogh
Sent: Friday, May 1, 2020 4:19 PM
To: ozDotNet <[email protected]>
Subject: Switching VS2019 targets
TGIF - I have some projects with <TargetFrameworks> (plural) for netstandard2.0
and net45, and to let certain bits of code to be included or excluded in the
different targets I use #if NET45 and csproj statements like this:
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<Compile Remove="NativeUtils.cs" />
</ItemGroup>
These techniques are well documented and are working nicely, but I can't figure
out how I can switch "view" to the different targets in Visual Studio 2019 so I
can see the conditional code and files come and go. I can't find anything in
the UI that does that. Is there a trick I'm missing?
Greg K