PDA

View Full Version : [FIXED] [V0.8.0] Mono: System.Web.UI.CssClassPropertyAttribute Cannot Be Loaded



josmar52789
Jan 06, 2009, 2:32 PM
On Mono 2.0.1, placing the following code into a page renders an error 500.

The error is Could not load type 'System.Web.UI.CssClassPropertyAttribute' from assembly 'Coolite.Ext.Web'.



<%@ Page Language="C#" %>
<%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<script runat="server">


</script>


<html xmlns="http://www.w3.org/1999/xhtml" lang="en-us">

<head runat="server">
<style type="text/css">
.tip-target {
width: 120px;
height: 40px;
text-align:center;
padding: 5px 0;
border:1px dotted #99bbe8;
background:#dfe8f6;
color: #15428b;
cursor:default;
margin:10px;
font:bold 11px tahoma,arial,sans-serif;
float:left;
}
</style>

</head>

<body>

<form id="form1" runat="server">
<div id="main">

<ext:ScriptManager id="scriptmanager1" runat="server" />

<div id="track-tip" class="tip-target">Track Mouse


<ext:ToolTip
runat="server"
Target="track-tip"
Html="This tip will follow the mouse while it is over the element"
Title="Mouse Track"
Width="200"
TrackMouse="true" />




</form>

</body>

</html>

josmar52789
Jan 06, 2009, 7:03 PM
I can confirm that this bug appears on multiple Linux operating systems and with different Coolite controls. In fact, simply adding the ScriptManager control causes the error to occur.

geoffrey.mcgill
Jan 06, 2009, 7:14 PM
Hmmm...

This is interesting because the CssClassPropertyAttribute should only be applicable during Visual Studio Design Mode. As well, the Attribute does not function properly (bug?) during VS design mode.



The [CssClassProperty] has been applied to several properties in the Toolkit, but it's only there for forwards compatibility, meaning we're hoping Microsoft fixes the related VS parsing bug some day. 


We could remove the attribute and I don't think anything will be affected... the Attribute doesn't work anyways. 


I guess there's just a difference in the Mono vs MS implementations.

josmar52789
Jan 06, 2009, 7:24 PM
I am in contact now with the Mono development team so that I can make sure the System.Web.UI.CssClassPropertyAttribute is implemented in Mono 2.0.1. As far as I know, it should be - but I can get a confirmation from them.



If this is removed from Coolite - how long will it take for us
to get a release with this property removed? Our clients are looking
forward to migrating to Coolite 0.7 because of all the new features,
but we cannot move forward with such a big bug...

josmar52789
Jan 06, 2009, 8:47 PM
I have received confirmation from the Mono development team that this attribute is not in Mono 2.0.1, but rather will be implemented in the Mono 2.2 release set for June 2009.

Since this attribute is causing complete incompatibility with Mono now, can it be removed from Coolite?

geoffrey.mcgill
Jan 07, 2009, 10:46 AM
I have received confirmation from the Mono development team that this attribute is not in Mono 2.0.1, but rather will be implemented in the Mono 2.2 release set for June 2009.

Thanks for the update. 


Since this attribute is causing complete incompatibility with Mono now, can it be removed from Coolite?

Ya, no problem. As I mentioned above, the Attribute does nothing with the current .NET and VS releases and we were only included to provide forwards compatibility.


Maybe with the VS10+.NET4 release we can add the Attribute back in. In theory (when it works) the Attribute is a helpful addition.

geoffrey.mcgill
Jan 07, 2009, 10:55 AM
Ok, I removed the [CssClassProperty] Attribute from all the properties in the Toolkit. 

The new revisions have been commited to SVN and will be publicly available with the v0.8.0 release.

josmar52789
Jan 07, 2009, 6:43 PM
Have they been committed to SVN as of 4:42pm EST on January 7, 2009?

After building from source on the read-only SVN, I still seem to have the error...

geoffrey.mcgill
Jan 07, 2009, 6:46 PM
Hmmm.

I just did a global search and the [CssClassProperty] Attribute does not appear anywhere in the Project.


Are you getting a specific line# on the exception? or class name?

josmar52789
Jan 07, 2009, 7:52 PM
Yes, I am still getting that error....

Can you verify for me the process to build from source? Step by step to make sure I'm building it correctly?

josmar52789
Jan 07, 2009, 8:07 PM
I've attached the errors that I'm receiving on the command line and in the browser.

geoffrey.mcgill
Jan 07, 2009, 8:17 PM
When using VS it's common to get these type of errors when the .dll's are cached. Maybe the old .dll is getting cached somehow?

I'm reviewing the attachments to see if I can spot anything else. 


If you search the source code for "CssClassProperty" does it find anything?

josmar52789
Jan 08, 2009, 1:45 AM
Can you tell me how you removed any references to the System.Web.UI.CssClassPropertyAttribute type?

When I did a search for the text in the version 0.7 release, I couldn't even find it in there (I downloaded the Manual w/ Source version and opened the solution in VS C# 2008).

geoffrey.mcgill
Jan 08, 2009, 6:20 AM
The [CssClassProperty] Attribute was applied to some Properties in the Toolkit. If the [CssClassProperty] is removed/deleted from all Properties, then it no longer exists in the project.

josmar52789
Jan 08, 2009, 2:58 PM
Okay, I didn't realize that the SVN on the Google Code website is not the full source code or something? I'm not a subscriber, so apparently I don't have access to the "real" SVN? Correct me if I'm wrong...

Never the less, I did download the Manual w/ Source, did a "Find and Replace" on the code and commented out all references to CssClassAttribute. I built the project, and was finally able to again use Coolite without being prompted with the error.

There are some other bugs I've found with Coolite on Mono, but I'll place those into a different bug report for accountability purposes.

Thanks

yaser82
Feb 09, 2009, 11:27 AM
Hi,
I'm having the same error when I tried to deploy my website, and I'm not using Mono..Is there any possible workaround for this? Please if there is then I'll be more than thankful as I need this so bad.
Thanks
I'm using the Coolite 0.7.0

yaser82
Feb 09, 2009, 12:37 PM
Sorry, Can not load assembly from Syste.Web not Coolite.Ext.Web..Thanks and sorry again

geoffrey.mcgill
Feb 10, 2009, 5:25 AM
@yaser82 - I believe this thread is focused on a Mono issue. It would be best if you could start a new thread in the Help forum. thx.