无法在asp.net5中生成脚手架控制器? [英] Unable to generate scaffolding controller in asp.net5?

查看:127
本文介绍了无法在asp.net5中生成脚手架控制器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

I am getting below error when I try to run From :

c:\visual studio 2015\Projects\AppTest\src\AppTest

I am New to .Net and I am not able to figure it out. I tried updating webtools of VS2015 also still No luck. Any Suggestions?

What I have tried:

PM> dnx  gen controller -name BooksController --dataContext MyDBContext --model Book
Finding the generator 'controller'...
dnx : Could not load file or assembly 'AppTest' or one of its dependencies. General Exception (Exception from HRESULT: 0x80131500)

推荐答案

尝试使用以下选项:



1.检查您是否正确引用程序集(AppTest.dll),它必须是正确的版本。

例如,假设您有一个名为AppTest.dll的程序集,它需要旧版本的AppTest程序集,但它添加了不同的程序集。然后它抛出错误无法加载程序集。



2.删除dll。然后清理解决方案并添加相同的DLL。重新启动视觉工作室并重新构建。



3.删除临时文件C:\ Windows \Microsoft®.NET.\\Framework\v4.0.30319\Temporary ASP.NET文件
Try with below options:

1. Check if you are referencing of assembly(AppTest.dll) properly and it must be correct version.
For example let's say you have an assembly called AppTest.dll which needs an old version of AppTest assembly, but it is added different one. Then it throws error "could not load assembly".

2. Remove the dll. Then clean the solution and Add the same DLLs. Restart your visual studio and build again.

3. Remove Temporary Files C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files


这篇关于无法在asp.net5中生成脚手架控制器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆