Got error while scaffolding minimal API with separate data layer solution. ('startIndex cannot be larger than length of string. (Parameter 'startIndex')')
- Dominant language
- C#
- Stars
- 818
- Forks
- 260
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 10
Description
While I learning to coding on minimal API with .Net 7.0 (runtime version 7.0.11) I got stuck with scaffolding a endpoint for minimal api.
I got error
``` There was an error running the selected code generator: 'startIndex cannot be larger than length of string. (Parameter 'startIndex')' ```

While I scaffolding a Minimal API wtih DbContext that on another reference solution , selecting "API with read/write endpoints, using Entity Framework" option on scaffolding menu

All dependencies is up to date (7.0.11 except CodeGeneration that latest version is 7.0.10)
here a image of dependencies of each solution
**dependencies of API Solution**

**dependencies of Data layer Solution**

**Here is my SDKs and Runtimes that has been installed in my computer**

if you want any more information on my machine please tell me.
Thank you.
Contributor guide
Research direction
Reproduce the reported Visual Studio scaffolding flow for a .NET 7 minimal API with a separate data-layer solution, selecting "API with read/write endpoints, using Entity Framework." No source file or test is named; investigate the generator path that produces the startIndex exception, and consider the issue done when the failing setup is explained and the scaffolding flow no longer errors or reports a clear validation failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100