I found the solution to the problem.
My csproj file had some strange entries for the LaunchScreen.storyboard file.
<ItemGroup>
<InterfaceDefinition Remove="LaunchScreen.storyboard" />
<InterfaceDefinition Remove="Resources\LaunchScreen.storyboard" />
</ItemGroup>
<ItemGroup>
<None Remove="Resources\LaunchScreen.storyboard" />
</ItemGroup>
I deleted these ItemGroups and left the standard inclusion and it worked after that.