473,387 Members | 1,512 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Designer error "could not find type..."

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?
Jan 6 '06 #1
11 6542
"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
Jan 6 '06 #2
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

Jan 9 '06 #3
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...
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

Jan 9 '06 #4
A have stumbled across a solution - for my case anyway.

I remove all the ".DataSource = " lines on the BindingSources in the
MainForm.Designer.cs code. That allowed the form to load.

Then when I went to reset the DataSource for the BindingSources in the
designer I kept getting an error "...not sent to an insance". I googled
that and found a suggestion that the project DataSources were messed up.

Sure enough, I removed a couple of DataSources that weren't really used and
everything is back to normal.

"Daniel Billingsley" <Da***************@newsgroup.nospam> wrote in message
news:%2******************@TK2MSFTNGP15.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...
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


Jan 9 '06 #5
Hello,

Glad to hear that the problem has been removed. From the description, it
seems the source code of the project has been corrupted somewhere. And
re-creating some components fixed the issue.

Luke

Jan 10 '06 #6
"Luke Zhang [MSFT]" <lu******@online.microsoft.com> a écrit dans le message
de news: D1**************@TK2MSFTNGXA02.phx.gbl...

| Glad to hear that the problem has been removed. From the description, it
| seems the source code of the project has been corrupted somewhere. And
| re-creating some components fixed the issue.

Hi Luke

Actually, all that this procedure of removing, correcting and replacing the
references only removes the problem for that session. Next time, or maybe a
couple of times later, the problem comes back just the same.

Unfortunately, this does not yet appear to be reliably reproducible.

Joanna

--
Joanna Carter [TeamB]
Consultant Software Engineer
Jan 10 '06 #7
I had this problem (or one very similar) back in December; my workaround
(not fix) was to cut the data-binding code from the designer code into my
own method that is called in the ctor outside of InitializeComponent().

The downside is that I can't amend my bindings in the IDE, but generally
once I have set them up I'm doing much of this anyway... and when I do need
to change them I can do it in source-code easily enough. Plus it gives me
more flexibility to use converters etc.

Marc

"Joanna Carter [TeamB]" <jo****@not.for.spam> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
"Luke Zhang [MSFT]" <lu******@online.microsoft.com> a écrit dans le
message
de news: D1**************@TK2MSFTNGXA02.phx.gbl...

| Glad to hear that the problem has been removed. From the description, it
| seems the source code of the project has been corrupted somewhere. And
| re-creating some components fixed the issue.

Hi Luke

Actually, all that this procedure of removing, correcting and replacing
the
references only removes the problem for that session. Next time, or maybe
a
couple of times later, the problem comes back just the same.

Unfortunately, this does not yet appear to be reliably reproducible.

Joanna

--
Joanna Carter [TeamB]
Consultant Software Engineer

Jan 10 '06 #8
"Marc Gravell" <mg******@rm.com> a écrit dans le message de news:
uI**************@TK2MSFTNGP15.phx.gbl...

|I had this problem (or one very similar) back in December; my workaround
| (not fix) was to cut the data-binding code from the designer code into my
| own method that is called in the ctor outside of InitializeComponent().
|
| The downside is that I can't amend my bindings in the IDE, but generally
| once I have set them up I'm doing much of this anyway... and when I do
need
| to change them I can do it in source-code easily enough. Plus it gives me
| more flexibility to use converters etc.

I suppose the only real downside to this is not being able to layout the
columns in a grid by using the designer provided columns. Presumably this
works with database driven datasources ? If so, then it really ought to work
with objects as well; if not, then it is obviously a pretty major bug that
really should be fixed.

Joanna

--
Joanna Carter [TeamB]
Consultant Software Engineer
Jan 10 '06 #9
Not to mention the bug where the IDE gets confused and thinks there are
multiple "column1" (etc) definitions and then refuses to load...

I've only really used this approach with objects. Generally I find that if I
lay the bindings out *once* in the IDE (and then cut the bindings code etc),
I actually find it *easier*, not harder, to use. I can live without seeing
the bindings at design time (re your grid point, most of the time when I am
using columns, the exact columns and sequence is dynamic anyway, so the
designer isn't much use), and I find that not having all those extra
variables around makes life much easier.

And yes I know you can turn off the variable declaration in 2005 (for some
elements), but they still annoy me. Another benefit of the approach of
cutting the binding code is that I can essentially write a void
SetupBindings(BindingSource source) method, and bind via that from the
calling code; this means I can then share a BindingSource at runtime, which
allows me to do some very neat things:
* Multiple non-modal forms all using the same cursor position without any
extra code
* Complex forms where each tab has been written as a control; each control
can (again) use the same BindingSource

It means I have a lot less code to mess with when I change the current
object being displayed.

Now... back to reading your OPF stuff... <g>

Marc

"Joanna Carter [TeamB]" <jo****@not.for.spam> wrote in message
news:er*************@TK2MSFTNGP12.phx.gbl...
"Marc Gravell" <mg******@rm.com> a écrit dans le message de news:
uI**************@TK2MSFTNGP15.phx.gbl...

|I had this problem (or one very similar) back in December; my workaround
| (not fix) was to cut the data-binding code from the designer code into
my
| own method that is called in the ctor outside of InitializeComponent().
|
| The downside is that I can't amend my bindings in the IDE, but generally
| once I have set them up I'm doing much of this anyway... and when I do
need
| to change them I can do it in source-code easily enough. Plus it gives
me
| more flexibility to use converters etc.

I suppose the only real downside to this is not being able to layout the
columns in a grid by using the designer provided columns. Presumably this
works with database driven datasources ? If so, then it really ought to
work
with objects as well; if not, then it is obviously a pretty major bug that
really should be fixed.

Joanna

--
Joanna Carter [TeamB]
Consultant Software Engineer

Jan 10 '06 #10
Yeah, my fix was temporary. And I've seen that one too where the
DataGridView goes off wild reloading all the columns even though I've
explicity set them already.

The BindingSource bindings are getting hosed about once or twice a day, and
I have to go through the procedure of removing the binding code and then
resetting it. I'm not going to use the IDE any more for that either (at
least as a permanent setup).

It's pretty pathetic though because that destroys a big chuch of the benefit
of using the BindingSource components in the first place. You have to
wonder how such significant bugs get through.

"Marc Gravell" <mg******@rm.com> wrote in message
news:ep****************@tk2msftngp13.phx.gbl...
Not to mention the bug where the IDE gets confused and thinks there are
multiple "column1" (etc) definitions and then refuses to load...

I've only really used this approach with objects. Generally I find that if
I lay the bindings out *once* in the IDE (and then cut the bindings code
etc), I actually find it *easier*, not harder, to use. I can live without
seeing the bindings at design time (re your grid point, most of the time
when I am using columns, the exact columns and sequence is dynamic anyway,
so the designer isn't much use), and I find that not having all those
extra variables around makes life much easier.

And yes I know you can turn off the variable declaration in 2005 (for some
elements), but they still annoy me. Another benefit of the approach of
cutting the binding code is that I can essentially write a void
SetupBindings(BindingSource source) method, and bind via that from the
calling code; this means I can then share a BindingSource at runtime,
which allows me to do some very neat things:
* Multiple non-modal forms all using the same cursor position without any
extra code
* Complex forms where each tab has been written as a control; each control
can (again) use the same BindingSource

It means I have a lot less code to mess with when I change the current
object being displayed.

Now... back to reading your OPF stuff... <g>

Marc

"Joanna Carter [TeamB]" <jo****@not.for.spam> wrote in message
news:er*************@TK2MSFTNGP12.phx.gbl...
"Marc Gravell" <mg******@rm.com> a écrit dans le message de news:
uI**************@TK2MSFTNGP15.phx.gbl...

|I had this problem (or one very similar) back in December; my workaround
| (not fix) was to cut the data-binding code from the designer code into
my
| own method that is called in the ctor outside of InitializeComponent().
|
| The downside is that I can't amend my bindings in the IDE, but
generally
| once I have set them up I'm doing much of this anyway... and when I do
need
| to change them I can do it in source-code easily enough. Plus it gives
me
| more flexibility to use converters etc.

I suppose the only real downside to this is not being able to layout the
columns in a grid by using the designer provided columns. Presumably this
works with database driven datasources ? If so, then it really ought to
work
with objects as well; if not, then it is obviously a pretty major bug
that
really should be fixed.

Joanna

--
Joanna Carter [TeamB]
Consultant Software Engineer


Jan 11 '06 #11
"Marc Gravell" <mg******@rm.com> a écrit dans le message de news:
ep****************@tk2msftngp13.phx.gbl...

| Now... back to reading your OPF stuff... <g>

Please bear in mind that it is a bit old now and I really must update it to
C# sometime :-)

Joanna

--
Joanna Carter [TeamB]
Consultant Software Engineer
Jan 12 '06 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Brian Fulford | last post by:
I am trying to deploy a web app with a deployment project since I am including Crystal Reports for .Net. I attached all the merge modules, etc but I am getting a build error when I try to build...
3
by: stash | last post by:
Help - Please! I am trying to run the V8 db2setup script *again* (maybe for the third or fourth time) and it will not re-create the sqllib directory. It always stops with this error: ERROR:Could...
0
by: Daniel Wilson | last post by:
I have a small Windows Form app in Visual C++ .NET 2003. I opened it up today and got the following message on the tab for my form. An error occured while loading the document. Fix the error,...
0
by: Johann Blake | last post by:
I installed "Visual Studio.NET 2003 Special Upgrade for Version 2002 customers". At the time of this posting, this is the latest version available. When I go to create a Smart Device application...
8
by: eminemence | last post by:
Hi, I have been trying to get STLPort work for Symbian. I am using CodeWarrior compiler and it spews this errors namely *************************************************************************...
1
by: amindi | last post by:
Hi, I wrote a VB6 program to read some data records from a Ms Access database and to write them into a SQL server database.(I use Ms Access 2000 and SQL server 2000).After reading each record in...
0
by: Jon Paal | last post by:
error : "Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'." using VWD 2005 with sqlexpress 2005 I am trying to create membership roles and users......
3
by: Nitinkcv | last post by:
Hi, While trying to run my app im getting the error Could not find a part of the path "c:\inetpub\wwwroot\Do not Delete\dbglobal.config". I checked and found that there is no Important_Do not...
1
by: ipramod | last post by:
Hi, I have a codebase which contains project for all the DLL's and another project for all UI presentations. When I try to open an aspx page on Visual Studio editor, I get following error on...
2
by: Sejoro | last post by:
Hello, I am trying to write a program that opens a file; reads through it; outputs the text; then outputs the number of lines, words, and characters. Problem is, every time I try to compile, no...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.