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

System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.DotNet.Scaffolding.Shared' #3034

Open
mmKayAllDay opened this issue Oct 21, 2024 · 1 comment

Comments

@mmKayAllDay
Copy link

trying to scaffold CRUD pages for an entity (command below)
The DbContext as well as the entity are part of a class library.

dotnet aspnet-codegenerator razorpage -m Customer -dc AppDbContext -udl -outDir Pages/Customers

(dotnet-aspnet-codegenerator.exe 8.0.6 (8.0.624.50704))

exception

dotnet : Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.DotNet.Scaffolding.Shared, 
Version=8.0.6.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.
At line:1 char:1
+ dotnet aspnet-codegenerator razorpage -m Customer -dc AppDbContext -u ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Unhandled excep...file specified.:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
 
File name: 'Microsoft.DotNet.Scaffolding.Shared, Version=8.0.6.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'
   at Microsoft.VisualStudio.Web.CodeGeneration.Design.Program.Main(String[] args)

The library is in this path
.dotnet\tools.store\dotnet-aspnet-codegenerator\8.0.6\dotnet-aspnet-codegenerator\8.0.6\tools\net8.0\any\Microsoft.DotNet.Scaffolding.Shared.dll

version information

Target framework: (e.g. .NET 8.0)
Operating system: Windows 10
IDE: (e.g. Visual Studio 2022 17.11.5)

Any clues ?

@Lauwed
Copy link

Lauwed commented Nov 4, 2024

Same problem here
I have a Blazor shared project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants