Anyone know why I keep getting this error when I try to bind a gridview or details view control to a csla data source on my web form? I am currently using the 2.1.3 Framework.
Could not load type "[type name] " from assembly "[assembly]" ... public key token = null
I've searched online and seen similar errors in the past but with older versions of the framework.
I add the csla data source first, set the TypeAssemblyName and TypeName properties, then drag the gridview control onto my form and attempt to set datasourceID to my cslaDataSource.
I must be missing a step? Or not setting a property somewhere?
Thanks for any suggestions.
If you would like, you can try the test version 2.1.4 from www.lhotka.net/cslanet/download.aspx, which may address your issue.
Thanks Rocky, I tried it, but didn't see an improvement. The message did change a bit. Instead of saying it can't my [type] from my [assemblyName], it says it can't load my [type] from Microsoft.VisualStudio.Web,...
Thanks, yes I did "Close all open designers, Clean solution, Close VS, Open VS, Rebuild solution" process, several times. My assembly name is the name of my class project and the type name is the name of the class inside the project.
project name: TimeCard.Business
class name: TimeCardCollection
Type Assembly Name: TimeCard.Business
Type Name: TimeCard.Business.TimeCardCollection
VS2005, no SP1.
Hmm, I am at a loss then.
I did JUST put a new 2.1.4 (C# only) online for download. This
one has a configuration window (you can click a configure link on the control’s
quick access menu) that might help resolve the issue. This configuration window
lists all the available business classes referenced by your web site, which
helps avoid some issues (like case sensitive type names, etc).
Can you try this new version please?
Rocky
From: IraD
[mailto:cslanet@lhotka.net]
Sent: Monday, February 12, 2007 2:36 PM
To: rocky@lhotka.net
Subject: Re: [CSLA .NET] CSLA Data Source - Could not load type
"[type name] " from assembly "[assembly]"
Thanks, yes I did "Close all open designers, Clean solution, Close VS,
Open VS, Rebuild solution" process, several times. My assembly
name is the name of my class project and the type name is the name of the class
inside the project.
project name: TimeCard.Business
class name: TimeCardCollection
Type Assembly Name: TimeCard.Business
Type Name: TimeCard.Business.TimeCardCollection
VS2005, no SP1.
You have referenced your assembly in your web project right?
And you are specifying the full type name (including namespace)
for the TypeName property? Like
MyCompany.MyApplication.Customer
Or whatever is equivalent for you?
When you say [type] in your post, is the control showing your
actual type name?
Rocky
From: blp4383
[mailto:cslanet@lhotka.net]
Sent: Monday, February 12, 2007 1:56 PM
To: rocky@lhotka.net
Subject: Re: [CSLA .NET] CSLA Data Source - Could not load type
"[type name] " from assembly "[assembly]"
Thanks Rocky, I tried it, but didn't see an improvement. The message
did change a bit. Instead of saying it can't my [type] from my
[assemblyName], it says it can't load my [type] from
Microsoft.VisualStudio.Web,...
Yes, the reference appears to be correct. The control is showing the actual type name.
I should add this - When we add to our project a class module that we wrote in CSLA class, we get the same problem.
When we add our new class module to the project that we build in CSLA class, then it works. Or at least it did before we rebuilt, redownloaded, etc.
The two projects had different versions of CSLA, I think the one built in class was 2.0.x and the new ones have been 2.1.x.
This makes us think that there is some simple specification somewhere that we did make in class, but have failed to make in our later project.
Turned out to be root name space /assembly name confusion. Sorry to trouble you!
~ Newbie...
Copyright (c) Marimer LLC