I have been splitting my single project Asp.net Core app into different projects and I am seeing some strange errors and warnings and think maybe I have done it wrong. The main warning is that all through my files I have:
The type 'VepoContext' in '/Users/benjaminfarquhar/dev/vepo_back_end/Vepo/Vepo.Data/VepoContext.cs' conflicts with the imported type 'VepoContext' in 'Vepo.Data, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in '/Users/benjaminfarquhar/dev/vepo_back_end/Vepo/Vepo.Data/VepoContext.cs'. [Vepo, Vepo]csharp(CS0436)
On most of my custom Classes.
I'm also getting:
Duplicate 'global::System.Runtime.Versioning.TargetFrameworkAttribute' attribute [Vepo]
For which I have applied a few of the widely accepted Stack Overflow fixes, which have not worked.
This is my project structure. The project named "Vepo" is the Asp.net Core app and the other projects, Vepo.Data, Vepo.Domain, and Vepo.Common are all Class Library projects. I am wondering if I have placed my data, domain, and common projects inside the Asp.net Core project as it looks like that is the case in VS Code but not in Visual Studio:
In VS Code:
Yes, you have placed your secondary projects inside the actual Vepo project. However, you also have the ones outside of the main project. Make sure to remove the ones inside the main since those are what are most likely causing you to get an error where two of the same types are loaded.