I figured this out. For a DLL you must use the same directory for Output Directory and Intermediate directory:
I made these the same and now it is working. (This is from Project Property file.)
<PropertyGroup>
<OutDir>$(SolutionDir)Build\$(Configuration)\$(ProjectName)\</OutDir>
<IntDir>$(SolutionDir)Build\$(Configuration)\$(ProjectName)\</IntDir>
</PropertyGroup>
Also ending up have to make sure: (This is from Project Property file.)
<ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
For the compile side.
Link side is default as well.
Compiler and Linker must have different names for "ProgramDataBaseFileName"
I have not worked with DLL's as much. I have never had this problem before with static libraries are exe.