Baffled by a VS behavior difference between two machines/people here. When I open a project out of source control, I see this:
When they open the exact same byte identical sln/csproj on their machine, they see this:
Nothing is included, compilation fails with “does not contain a static Main” etc. The proj files are identical, cloned out of the same repo from the same commit
The csproj file looks like this:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>XXX_XxxxxXxxxxxxx</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ClosedXML" Version="0.102.2" />
<PackageReference Include="Flurl" Version="4.0.0" />
<PackageReference Include="Flurl.Http" Version="4.0.2" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>
</Project>
If I right click the Program.cs and choose “exclude” this is the diff on the repo:
If my coworker right clicks and Includes the ghosted files, this is the diff on the repo:
The best way I can describe it is mine seems to include any file unless I specifically exclude, whereas theirs will only include files in a project if they are specifically nominated for inclusion
Is there an “at VS level” settng that controls something like file inclusion, that could explain why two VS work so differently ? Both VS are latest 2022..