网站转换后出现问题. [英] Problems arrising after web site conversion.

查看:78
本文介绍了网站转换后出现问题.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将Visual Studio 2008网站转换为Visual Studio 2010网站.通常,所有.cs,.aspx和.designer.cs文件都在解决方案资源管理器中分组在一起.转换后,.designer.cs文件将在解决方案资源管理器中单独列出.为什么是这样?有办法解决吗?

在我新转换的网站上,每个页面后面的代码都会出错.我得到的错误都是相同的,并且它们指出以下内容:
''类型"不包含成员"的定义,并且找不到找到接受类型"类型的第一个参数的扩展方法名称"(您是否缺少using指令或程序集参考?)."我强烈怀疑此错误与我上面所解释的有关.奇怪的是,当我构建项目时,它成功构建,但是过了一会儿,它在设计时又显示了同样的错误.

I converted a Visual Studio 2008 web site to a Visual Studio 2010 web site. Usually all .cs, .aspx and .designer.cs files were grouped together in the Solution Explorer. After the conversion the .designer.cs files are separately listed in the Solution Explorer. Why is this? Is there a way to fix it?

With my newly converted web site, the code behind of every page gives errors. The errors that I get are all the same and they state the following:
"''type'' does not contain a definition for ''member'' and no extension method ''name'' accepting a first argument of type ''type'' could be found (are you missing a using directive or an assembly reference?)." I strongly suspect that this error is related to what I explained above. Strangely, when I build the project it builds successfully, but after a while it shows those same errors again at design time. Any help on this?

推荐答案

我想我已经找到解决问题的方法.我要做的就是删除所有.aspx.designer.cs文件.现在,我没有任何错误,并且该项目已成功构建. :-D
I think I figured out a solution to my problem. All I did was to delete all the .aspx.designer.cs files. Now I have no errors and the project builds successfully. :-D


好,我知道了,但这不是一个快速的解决方案.每个页面基本上都必须重做.我为每个页面创建了一个新页面,只需将代码复制过来并删除旧页面.在那里-问题解决了,但是花了一段时间. :)
Ok I got the solution, but it''s not a quick one. Every page basically has to be redone. I created a new page for every one, just copied the code over and deleted the old pages. There - problem solved, but it took a while. :)


这篇关于网站转换后出现问题.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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