There is no such things as .sln
and .proj
files.
Instead of them folders are being used in Visual Studio Code.
Each project folder should have a seperate project.json
file.
/MyProject.Core
SourceFile.cs
project.json
/MyProject.Web
/Controllers
/Views
project.json
To reference MyProject.Core
from MyProject.Web
project edit MyProject.Web\project.json
file and add the dependency:
// MyProject.Web/project.json
{
"dependencies": {
"MyProject.Core": {"target": "project"},
...
}
"buildOptions": {
"emitEntryPoint": true
}
}
The line "emitEntryPoint": true
says that MyProject.Web
is a start project for the solution.
MyProject.Core
should have this flag disabled in its project.json
file:
// MyProject.Core/project.json
{
...
"buildOptions": {
"emitEntryPoint": false
}
}
Build the project (Mac: ⌘+Shift+B, Windows: Ctrl+Shift+B) and each project should have own \bin
and \obj
folders with new .dll
files.