Asp.net mvc 4 在ASP.NET MVC解决方案中找不到类库项目
我的解决方案包含7个项目,其中一个是网站(ASP.NET MVC)。我刚刚在我的解决方案下添加了一个新的类库项目“MyUtility”,以全局公开通用功能:Asp.net mvc 4 在ASP.NET MVC解决方案中找不到类库项目,asp.net-mvc-4,Asp.net Mvc 4,我的解决方案包含7个项目,其中一个是网站(ASP.NET MVC)。我刚刚在我的解决方案下添加了一个新的类库项目“MyUtility”,以全局公开通用功能: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Net; using System.IO; namespace MyUtility
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Net;
using System.IO;
namespace MyUtility
{
public class MyHttpProxy
{
public static void postToUrl(string url, string post_string)
{
// ...
}
}
}
在我的网站项目中,我添加了对MyUtility的引用,但上面有一个黄色警告图标
构建解决方案时,我遇到错误:
找不到类型或命名空间名称“ClubSUtility”(是否为“”)
缺少使用指令或程序集引用?)
我错过了什么?提前感谢您的帮助。我找到了原因,新项目MyUtility使用的是.NET Framework 4.5,而其他项目使用的是4.0。更改属性面板中的设置解决了此问题