I have a C# MVC web app in VS2017 that references two library projects, Crd.Core and Crd.Data. These two libraries both reference the same third party dlls that I've got stored in a folder at the solution level. In Debug everything builds OK. In Release Crd.Core builds OK but Crd.Data fails with two errors:
Unable to generate a temporary class (result=1).
CS0012 The type 'Consilium.TASKMobile.Common.Messages.UserType' is defined in an assembly that is not referenced. You must add a reference to assembly 'Consilium.TASKMobile.Common.Messages, Version=6.0.60037.0, Culture=neutral, PublicKeyToken=null'.
This assembly is definitely referenced. The exact same file is referenced by both projects from the same neutral location. I have tried moving the referenced files, and removing the references before re-adding them again.
The following are the identical for both projects:
- configurations (Any CPU)
- target framework (4.6.1)
- PropertyGroups in the csproj file
- References to the thirds party DLLs in the csproj file
- Properties of the references (same versions, Copy Local = True, etc)
Basically my two projects are identical in every way that I can think of checking but one of them fails to build in Release mode so there must be something different somewhere. What am I missing? What else can I check?