This repository was archived by the owner on Oct 4, 2021. It is now read-only.
Description The same issue was report in #4928 (which I am unable to re-open), and I just hit this issue in VS for Mac 8.0.3 (build 14).
The following does not work in VS for Mac (but works with VS for Windows and when building from the command line with dotnet build).
<ItemGroup Condition="'$(IsOSX)' == 'true'">
<ProjectReference Include="..\GVFS.Platform.Mac\GVFS.Platform.Mac.csproj" />
<Compile Include="..\GVFS.PlatformLoader\PlatformLoader.Mac.cs">
<Link>PlatformLoader.Mac.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup Condition="'$(OS)' == 'Windows_NT'">
<ProjectReference Include="..\GVFS.Platform.Windows\GVFS.Platform.Windows.csproj" />
<Compile Include="..\GVFS.PlatformLoader\PlatformLoader.Windows.cs">
<Link>PlatformLoader.Windows.cs</Link>
</Compile>
</ItemGroup>
VS for Mac will end up including both ProjectReferences and PlatformLoader source files:
As a work around I've switched to using Choose/When:
<Choose>
<When Condition="'$(OS)' == 'Windows_NT'">
<ItemGroup>
<ProjectReference Include="..\GVFS.Platform.Windows\GVFS.Platform.Windows.csproj" />
<Compile Include="..\GVFS.PlatformLoader\PlatformLoader.Windows.cs">
<Link>PlatformLoader.Windows.cs</Link>
</Compile>
</ItemGroup>
</When>
<Otherwise>
<ItemGroup>
<ProjectReference Include="..\GVFS.Platform.Mac\GVFS.Platform.Mac.csproj" />
<Compile Include="..\GVFS.PlatformLoader\PlatformLoader.Mac.cs">
<Link>PlatformLoader.Mac.cs</Link>
</Compile>
</ItemGroup>
</Otherwise>
</Choose>
(See microsoft/VFSForGit#1060 )
Reactions are currently unavailable