Identity scaffolding fails with No such file or directory
- Dominant language
- C#
- Stars
- 818
- Forks
- 260
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 10
Description
## Steps to reproduce:
Create a Web App (MVC) with Individual authentication project form the template. (I used Rider)
`dotnet tool install -g dotnet-aspnet-codegenerator`
`dotnet restore`
`dotnet aspnet-codegenerator identity`
OS: Ubuntu 18.04.4 LTS
## Expected behavior:
Generate the identity scaffold.
## Actual behavior:
Fails with the following output:
```
[Trace]: Command Line: identity
Scaffolding failed.
No such file or directory
[Trace]: at System.Diagnostics.Process.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at Microsoft.Extensions.Internal.Command.Execute()
at Microsoft.Extensions.ProjectModel.MsBuildProjectContextBuilder.Build()
at Microsoft.VisualStudio.Web.CodeGeneration.Tools.Program.GetProjectInformation(String projectPath, String configuration)
at Microsoft.VisualStudio.Web.CodeGeneration.Tools.Program.BuildAndDispatchDependencyCommand(String[] args, String projectPath, String buildBasePath, String configuration, Boolean noBuild, ILogger logger)
at Microsoft.VisualStudio.Web.CodeGeneration.Tools.Program.<>c__DisplayClass19_0.b__0()
RunTime 00:00:00.06
```
## Additional information about the problem:
(Followed this issue: dotnet/AspNetCore.Docs#11666)
I don't know is it count but if i delete the global tool and using:
``
Output:
```
It was not possible to find any compatible framework version
The framework 'Microsoft.NETCore.App', version '2.0.7' was not found.
- The following frameworks were found:
3.1.2 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
You can resolve the problem by installing the specified framework and/or SDK.
The specified framework can be found at:
- https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=2.0.7&arch=x64&rid=ubuntu.18.04-x64
```
## Additional information about the project being scaffolded, such as:
### Target framework(s):
netcoreapp3.1
### Package version of Microsoft.AspNetCore.App or Microsoft.AspNetCore.All (if applicable):
I'm using the 3.1.2 SDK
### Package version of Microsoft.VisualStudio.Web.CodeGeneration.Design - this may be added to your project by scaffolding:
``
### Full csproj:
```xml
netcoreapp3.1
aspnet-WebApplicationAuth-1449EA9C-6326-4DDC-9385-F30F87201553
```
Contributor guide
Assessment
This issue has not been assessed yet.