Code generator fails to run with custom bin and obj location
- Dominant language
- C#
- Stars
- 818
- Forks
- 260
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 10
Description
I followed the instructions at https://www.natemcmaster.com/blog/2017/11/13/dotnet-watch-and-docker/ to setup docker with dotnet watch, which requires moving bin/ and obj/ out of the project folder using a Directory.Build.props file so that docker and Visual Studio Code can work together.
Then when I tried to run dotnet aspnet-codegenerator it failed with the following error (also an obj/ folder is created in the project):
> Scaffolding failed.
> Failed to get Project Context for .
>
> To see more information, enable tracing by setting environment variable 'codegen_trace' = 1.
> RunTime 00:00:00.95
If I remove the Directory.Build.props file then the code generator runs without error.
It seems that the tool does not read the settings inside Directory.Build.props and does not provide a way to specify the path to the obj/ folder (e.g. dotnet ef supports --msbuildprojectextensionspath).
Is there any other way to get the code generator to run other than removing Directory.Build.props?
Contributor guide
Assessment
This issue has not been assessed yet.