Search code examples
c#compilation.net-coresubdirectory

Tell `dotnet build` to also compile source files in a subfolder


I'm going to preface this by saying I'm not only new to the .NET Core, but I'm new to C# as well, though this isn't a code problem. Anyway, my project is laid out like this:

Visual Studio Solution Explorer Screenshot

All I'm trying to find out, is how I can get dotnet build to also compile the files in the Items folder. I ran dotnet build --help but didn't find anything that seemed to help, so I assume I'll have to do something with the .csproj file. But either way, how can I accomplish this?

EDIT:

The accepted answer is correct, though my problem ended up being that I needed to add a using HouseCS.Items; line. (New to Namespaces...)


Solution

  • Making classes public should get you your desired result.