After creating a new project (example is in .net core) the global.json of the solution looks like that
{
"projects": [ "src", "test" ],
"sdk": {
"version": "1.0.0-preview2-003131"
}
}
And the new project created inside src folder and there is a physical folder exists inside the solution folder. Although the global.json appears inside Solution Items solution folder in the visual studio, no physical folder named solution items exists.
Now if i add a unittest project it creates just inside the solution folder, it does not create any Solution Folder or Physical Folder named test.
Then i created a test folder it does not appear on VS and creating a new test project does not create within the test physical folder.
If i add an another new project the new project created inside src folder. If I add any item (e.g. XMLFile) it add it within the Solution Items solution folder. But if you add test project if just appears underneath solution folder
Now my project
and the physical folder looks like below
However, my question is about the discrepancies of the behaviours.
- Why the behaviour is different for test projects
- Why is the test added on global.json automatically?
I have also noticed that if the test project is not inside the test folder, sometimes, it does not find xunit or nunit tests, but it finds the MSTest tests. So, my point is how the test in global.json helping us?