设计器错误“无法找到类型...” [英] Designer error "could not find type..."

查看:50
本文介绍了设计器错误“无法找到类型...”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个项目,我已经工作了几个星期。我一直在使用

BindingSource控件 - 我在这个特定的表单上有四个。


今天早上我去看了设计师报告得到:


找不到类型''LandarcBL.Budget''。请确保引用包含此类型的

程序集。如果此类型是您的开发项目的一部分,请确保项目已成功构建



隐藏编辑




System.ComponentModel.Design.Serialization.CodeDom SerializerBase.Error(IDesignerSerializationManager

manager,String exceptionText,String helpLink)

at

System.ComponentModel.Design.Serialization.CodeDom SerializerBase.DeserializeExpression(IDesignerSeri alizationManager

manager,String name,CodeExpression expression)

at

System.ComponentModel.Design.Serialization.CodeDom SerializerBase.DeserializeAssignStatement(IDesigne rSerializationManager

manager,CodeAssignStatement statement)

at

System.ComponentModel.Design.Serialization.CodeDom SerializerBase.DeserializeStatement(IDesignerSeria lizationManager

manager,CodeStatement statement)

当我点击编辑时需要我到MainFo rm.Designer.CS行:

this.budgetBindingSource.DataSource = typeof(LandarcBL.Budget);


当我将鼠标悬停在LandarcBL上时.Budget是向我展示了intellisense。

它当然发现它很好。


我可以点击F5然后运行表格就好了。我添加了另一个表单,添加了一个

BindingSource,将其DataSource设置为同一个类,并且该表单加载

设计师就好了。


今天早上我做了很多东西 - 运行表格,关闭VS,我不知道b $ b知道还有什么,它又开始工作了。现在没有任何影响

任何影响。


我发现很多关于谷歌这个问题的报告,但没有真正的解决方案

我的具体情况。


任何人都有任何想法吗?

I''ve got a project I''ve been working on for a few weeks. I''ve been using
the BindingSource control - I''ve got four of them on this particular form.

This morning I went to view the report in the designer and got:

Could not find type ''LandarcBL.Budget''. Please make sure that the
assembly that contains this type is referenced. If this type is a part of
your development project, make sure that the project has been successfully
built.
Hide Edit

at
System.ComponentModel.Design.Serialization.CodeDom SerializerBase.Error(IDesignerSerializationManager
manager, String exceptionText, String helpLink)
at
System.ComponentModel.Design.Serialization.CodeDom SerializerBase.DeserializeExpression(IDesignerSeri alizationManager
manager, String name, CodeExpression expression)
at
System.ComponentModel.Design.Serialization.CodeDom SerializerBase.DeserializeAssignStatement(IDesigne rSerializationManager
manager, CodeAssignStatement statement)
at
System.ComponentModel.Design.Serialization.CodeDom SerializerBase.DeserializeStatement(IDesignerSeria lizationManager
manager, CodeStatement statement)
When I click Edit it takes me to the MainForm.Designer.CS line:
this.budgetBindingSource.DataSource = typeof(LandarcBL.Budget);

When I hover the mouse over LandarcBL.Budget is shows me the intellisense.
It''s finding it just fine of course.

I can hit F5 and run the form just fine. I added another form, added a
BindingSource, set its DataSource to the same class and that form loads in
the designer just fine.

This morning I did a bunch of stuff - ran the form, closed VS, and I don''t
know what else, and it started working again. Now none of that is having
any affect.

I''ve found many reports of this problem with google but no real solution to
my exact circumstances.

Anyone have any ideas?

推荐答案

" Daniel Billingsley" ; <沓*************** @ newsgroup.nospam> aécritdansle

message de news: eP **** *********@TK2MSFTNGP15.phx.gbl ...


|我有一个项目,我已经工作了几个星期。我一直在使用

| BindingSource控件 - 我在这个特定的表单上有四个。

|

|今天早上我去看了设计师的报告,得到了:

|

|找不到类型''LandarcBL.Budget''。请确保

|引用包含此类型的程序集。如果这种类型是

|的一部分你的开发项目,确保项目已成功

|建成。

|隐藏编辑


我也想知道答案。


使用VS2005


我已经声明了一个类型:Carter.Framework.Test.CustomerList。我将CustomerListBindingSource的

DataSource属性设置为此值。和你一样,

我只是在一天左右回到表格并得到这个错误。改变

将DataSource改为CustomerList似乎让它工作 - 有时候:-(


似乎没有导致这种情况的一致性,但我会肯定

喜欢修理它。


乔安娜


-

乔安娜Carter [TeamB]

顾问软件工程师
"Daniel Billingsley" <Da***************@newsgroup.nospam> a écrit dans le
message de news: eP*************@TK2MSFTNGP15.phx.gbl...

| I''ve got a project I''ve been working on for a few weeks. I''ve been using
| the BindingSource control - I''ve got four of them on this particular form.
|
| This morning I went to view the report in the designer and got:
|
| Could not find type ''LandarcBL.Budget''. Please make sure that the
| assembly that contains this type is referenced. If this type is a part of
| your development project, make sure that the project has been successfully
| built.
| Hide Edit

I would like to know the answer to this as well.

Using VS2005

I have declared a type : Carter.Framework.Test.CustomerList. I set the
DataSource property of a CustomerListBindingSource to this value. Like you,
I just come back to the form a day or so later and get this error. Changing
the DataSource to just CustomerList seems to make it work - sometimes :-(

There seems to be no consistency to what causes this, but I would definitely
like to fix it.

Joanna

--
Joanna Carter [TeamB]
Consultant Software Engineer


你好Daniel Daniel,


什么是版本您使用的VS.NET,2003或2005?通常,

这样的问题可以通过重建整个解决方案来解决。


Luke
Hello Daniel,

What is the version of the VS.NET you work with, 2003 or 2005? Normally,
such a problem can be resolved by rebuilding the whole solution.

Luke


这是VS2005(C#)。我已关闭并重新打开VS几次,选择

Build / Clean从菜单中建立/重建解决方案好几次......全部都没有

可用。


" [MSFT]" lu *** ***@online.microsoft.com>在留言中写道

新闻:pv ************** @ TK2MSFTNGXA02.phx.gbl ...
It''s VS2005 (C#). I''ve closed and re-opened VS several times, selected
Build/Clean Build/Rebuild Solution from the menu several times... all to no
avail.

"[MSFT]" <lu******@online.microsoft.com> wrote in message
news:pv**************@TK2MSFTNGXA02.phx.gbl...
你好丹尼尔,
您使用的VS.NET版本是2003年还是2005年?通常情况下,这个问题可以通过重建整个解决方案来解决。

Luke
Hello Daniel,

What is the version of the VS.NET you work with, 2003 or 2005? Normally,
such a problem can be resolved by rebuilding the whole solution.

Luke



这篇关于设计器错误“无法找到类型...”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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