Can I transfer the project.json file to an asp.net 5 (dnx) project?

The default location of project.json is in the root folder of the asp.net project folder. I don't like configuration files mixed with classes, and would rather move project.json (and other configuration and launch items) to the configuration folder.

I moved project.json (in visual studio solution explorer) to the / Configuration folder, but this led to the following error:

C: \ Program Files (x86) \ MSBuild \ Microsoft ... \ DNX \ Microsoft.DNX.targets (142.5):
Error: Build development time node assembly with the following error:
Could not find project.json in 'Z: \ path \ to \ project \ root'

I don't seem to see configuration details to indicate where project.json is located. With all the extensibility and customization possible in the new framework, has Microsoft rigidly determined the location of the project.json file?

+6
source share
1 answer

The short answer is no. The new project system involves two things: (1) folder name = project name and (2) project.json is in this folder. project.json not a configuration file. This is project metadata, like csproj for C # projects

While you still need to have a folder named as a project with the project.json file inside it, you can always include source files from other folders outside the project folder. Here is an example of how to do this.

+7
source

Source: https://habr.com/ru/post/987209/


All Articles