改变了.net框架版本 [英] changed .net framework version

查看:74
本文介绍了改变了.net框架版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前在MVC .Net Framework 4.5中开发了一个项目,现在我将我的版本更改为4.0&我有几个错误,请帮我解决这个问题



1.

I currently develop a project in MVC .Net Framework 4.5 now I change my version to 4.0 & I got several errors plz help me to solve this

1.

Error   3   The type or namespace name 'RAMS' could not be found (are you missing a using directive or an assembly reference?)  D:\Avanzar Solution\PROJECT\RAMSSYSTEM\Controllers\HomeController.cs    13  7   RAMSSYSTEM



2.


2.

Error	4	The type name 'TableAttribute' could not be found. This type has been forwarded to assembly 'System.ComponentModel.DataAnnotations, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Consider adding a reference to that assembly.	D:\Avanzar Solution\PROJECT\RAMSSYSTEM\Models\AccountModels.cs	21	6	RAMSSYSTEM



3.


3.

Error	4	The type name 'TableAttribute' could not be found. This type has been forwarded to assembly 'System.ComponentModel.DataAnnotations, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Consider adding a reference to that assembly.	D:\Avanzar Solution\PROJECT\RAMSSYSTEM\Models\AccountModels.cs	21	6	RAMSSYSTEM







感谢提前.... :)




THANKS IN ADVANCE.... :)

推荐答案

您需要在项目中添加对System.ComponentModel.DataAnnotation的引用。至于另一个问题,如果您有多个项目构成您的解决方案,您将必须将它们全部从.NET 4.5转换为.NET 4以协同工作。
You need to add a reference to System.ComponentModel.DataAnnotation to your project. As for the other issue, if you have multiple projects making up your solution, you will have to convert them all from .NET 4.5 to .NET 4 to work together.


您正在引用这些在某处组装。删除引用,它应该没问题。



编辑:

或者像Pete建议的那样,添加所需的程序集如果您使用的是相关课程
You are referencing these assemblies somewhere. Remove the reference and it should be fine.


Or the other way, as Pete suggested, is to add the required assembly if you are using related classes


这篇关于改变了.net框架版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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