Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dotnet tool aspnet-codegenerator looks for executable at wrong path #10459

Closed
seancpeters opened this issue Dec 10, 2018 · 11 comments

Comments

@seancpeters
Copy link
Collaborator

commented Dec 10, 2018

From @tbureck on December 8, 2018 23:16

I'm currently following this guide in order to scaffold Identity in my existing ASP.NET Core project. When trying to run the scaffolder command with the help option, though, I'm getting this error message:

> dotnet aspnet-codegenerator --help
The application to execute does not exist: 'C:\Users\Tim\.dotnet\tools\.store\dotnet-aspnet-codegenerator\2.2.0-rtm-35687\dotnet-aspnet-codegener
ator\2.2.0-rtm-35687\tools\netcoreapp2.1\any\dotnet-aspnet-codegenerator.dll'.

I've checked the .dotnet\tools.store directory and the tool seems to be installed correctly. BUT, it is installed in a 2.2.0 directory instead of the 2.2.0-rtm-35687 directory, which dotnet tool is looking in.

I've opened a thread on Stackoverflow as well and someone else seems to have the same issue, which is why I'm creating this issue.

Why is it that dotnet tool is looking in the 2.2.0-rtm-35687 sub directory instead of the 2.2.0 where it is actually installed?

Edit: my dotnet version is 2.2.100

Copied from original issue: aspnet/Scaffolding#932

@seancpeters

This comment has been minimized.

Copy link
Collaborator Author

commented Dec 10, 2018

From @maliming on December 9, 2018 9:37

I also encountered the same problem.

@seancpeters

This comment has been minimized.

Copy link
Collaborator Author

commented Dec 10, 2018

From @guardrex on December 9, 2018 13:25

I just hit this one, too.

@tdykstra

This comment has been minimized.

Copy link
Contributor

commented Dec 10, 2018

I hit the same error running through the Razor Pages intro tutorial:

~\source\repos\RazorPagesMovie> dotnet tool install --global dotnet-aspnet-codegenerator
You can invoke the tool using the following command: dotnet-aspnet-codegenerator
Tool 'dotnet-aspnet-codegenerator' (version '2.2.0') was successfully installed.

~\source\repos\RazorPagesMovie> dotnet aspnet-codegenerator razorpage -m Movie -dc MovieContext -udl -outDir Pages\Movies --referenceScriptLibraries
The application to execute does not exist: 'C:\Users\tdykstra.dotnet\tools.store\dotnet-aspnet-codegenerator\2.2.0-rtm-35687\dotnet-aspnet-codegenerator\2.2.0-rtm-35687\tools\netcoreapp2.1\any\dotnet-aspnet-codegenerator.dll'.

@wli3 wli3 self-assigned this Dec 10, 2018

@wli3

This comment has been minimized.

Copy link
Collaborator

commented Dec 10, 2018

it should be caused by this dotnet/sdk#2698

let me follow up on the authoring side

@seancpeters

This comment has been minimized.

Copy link
Collaborator Author

commented Dec 13, 2018

@wli3 - I see that dotnet/sdk#2698 is closed due to the fix we worked on. I'd like to close the issue on aspnet/scaffolding, but don't want to close it until this is closed.

@wli3

This comment has been minimized.

Copy link
Collaborator

commented Dec 13, 2018

@seancpeters
dotnet/sdk#2698 is closed due to dotnet/sdk#2739 is merged (the fix for root cause in SDK) and it will be in 2.1.600 and 2.2.200

The new package has not been pushed yet. Do you think we should close this issue until it is pushed?

@seancpeters

This comment has been minimized.

Copy link
Collaborator Author

commented Dec 13, 2018

Oh, in that case, let's leave it open for now. Since the sdk issue was closed, I was thinking we could close the entire chain, but open is probably better for now.

@guardrex

This comment has been minimized.

Copy link
Contributor

commented Dec 14, 2018

Hello @wli3 ... Can you state the workaround/fix for a user prior to the released patch? We're getting a few pings in doc issues as devs try to follow one of our tutorials and hit this.

@wli3

This comment has been minimized.

Copy link
Collaborator

commented Dec 14, 2018

@guardrex use an older version as the following
dotnet tool install --global dotnet-aspnet-codegenerator --version 2.1.6

@drowhunter

This comment has been minimized.

Copy link

commented Dec 20, 2018

I was pulling my hair out trying to solve the same problem. So many issues with net core im almost regretting not staying with Net Framework.

@wli3

This comment has been minimized.

Copy link
Collaborator

commented Jan 14, 2019

2.2.1 is shipped with the fix. Closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.