C# submission with multiple .cs files

I’m doing the SprialMatrix problem and my tests pass locally. However, I’ve added 3 new classes in separate .cs files and this causes the tests to fail when submitted to exercism because they are not included in the compilation at exercism.

The only thing I can do to fix this I suppose is to put all the classes into the same SpiralMatrix.cs file but I’d rather keep them as separate distinct files.

Is there any other way to fix this?

Have you submitted all files to the exercise (aside from the tests file and the README)?

But having a comment stating how you would separate them is just as good, in my opinion.

Anything not listed in the .files.solution array in ./.exercism/config.json has to be listed separately for exercism submit, and if you do that you need to include every file to submit:

exercism submit SpiralMatrix.cs Class1.cs Class2.cs

Hi, yes I added the new files to config.json and re-submitted but it still didn’t work. I eventually just added the classes in those new files to the SpiralMatrix.cs and that did the trick.

Thanks everyone for your help.

I’m glad you found a workaround. Perhaps a C# expert can help out…

Thank you for expanding on that. Specifically the executing line.

@ChristopherPope Would you mind opening an issue at GitHub - exercism/csharp-test-runner: An experimental test runner for Exercism's C# Track?

I have the same issue, with partial classes and multiple files submissions on the Clock exercise.

I have opened an issue there, but it was automatically closed and I had the message to discuss it here on the forums.

Sometimes, a good way to organize your C# code is to use partial classes and have different files with the implementation for the support of different interfaces.

I tried to enhance my solution to the Clock problem this way and now it seems that the test suite cannot run tests on the solution anymore. I have submitted all files, and they all appear on the web editor as different files, but it seems that they are not being compiled together and the tests fail to even start.

Here is the link to my public solution, look at the interaction 7: arlm's solution for Clock in C# on Exercism