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

ERROR: Metadata file 'Microsoft.EntityFrameworkCore.dll' could not be found #155

Open
divinebovine opened this issue Apr 26, 2023 · 1 comment

Comments

@divinebovine
Copy link

My t4 template has the following:

<#@ output extension=".md" #>
<#@ assembly name="System.Core" #>
<#@ assembly name="Microsoft.EntityFrameworkCore" #>
<#@ assembly name="Microsoft.EntityFrameworkCore.Relational" #>
<#@ assembly name="Microsoft.EntityFrameworkCore.Design" #>
<#@ parameter name="Model" type="Microsoft.EntityFrameworkCore.Metadata.IModel" #>
<#@ parameter name="Options" type="Microsoft.EntityFrameworkCore.Scaffolding.ModelCodeGenerationOptions" #>
<#@ import namespace="System.Linq" #>
<#@ import namespace="Microsoft.EntityFrameworkCore" #>

When I execute the dotnet t4 tool, I get the following:

dotnet t4 -P bin/Debug/net7.0/ MermaidDiagram.tt
Processing 'MermaidDiagram.tt' failed.
ERROR: Metadata file 'Microsoft.EntityFrameworkCore.dll' could not be found
ERROR: Metadata file 'Microsoft.EntityFrameworkCore.Relational.dll' could not be found
ERROR: Metadata file 'Microsoft.EntityFrameworkCore.Design.dll' could not be found

My project's bin/Debug/net7.0 folder has these dlls, but I'm not sure why this isn't working. Any advice would be appreciated.

@danielgreen
Copy link

@divinebovine Does your csproj specify a runtime identifier? I've run into a similar issue affecting CLI builds when the --runtime option is used.

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

No branches or pull requests

2 participants