mail-archives/mono-list/2005-February/025571.html

173 строки
12 KiB
HTML
Исходник Постоянная ссылка Ответственный История

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Mono-list] Re: MySQL Connection from .NET Website (David P. Donahue)
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:joe_audette%40yahoo.com">
<META NAME="robots" CONTENT="index,nofollow">
<LINK REL="Previous" HREF="025570.html">
<LINK REL="Next" HREF="025575.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Mono-list] Re: MySQL Connection from .NET Website (David P. Donahue)
</H1>
<B>Joe Audette
</B>
<A HREF="mailto:joe_audette%40yahoo.com"
TITLE="[Mono-list] Re: MySQL Connection from .NET Website (David P. Donahue)">joe_audette@yahoo.com
</A><BR>
<I>Thu, 3 Feb 2005 06:52:22 -0800 (PST)</I>
<P><UL>
<LI> Previous message: <A HREF="025570.html">[Mono-list] Re: MySQL Connection from .NET Website (David P. Donahue)
</A></li>
<LI> Next message: <A HREF="025575.html">[Mono-list] Re: MySQL Connection from .NET Website (David P.
Donahue)
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#25571">[ date ]</a>
<a href="thread.html#25571">[ thread ]</a>
<a href="subject.html#25571">[ subject ]</a>
<a href="author.html#25571">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>--0-2010782795-1107442342=:20776
Content-Type: text/plain; charset=us-ascii
I have all my data access code in a separate class library project and I have to compile it on the linux machine to get it to work for the same reason.
On the windows machine I have the ByteFx source code compiled with Rebuild, but it references sharpziplib which is an already compiled dll that is probably not done with Rebuild.
&gt;<i>From the Build menu in VS.NET I use Rebuild Solution. I haven't tried this but my theory is if you get the source code to sharpziplib and compile it with Rebuild and make ByteFx reference the newly compile dll so that everything in the chain is compiled with rebuild it should work.
</I>
I've been too busy to try this theory myself. since all my data access code is in one class file, I just compile it on linux using monodevelop though you could also use the command line compiler. I don't have the ByteFx dll in my bin folder either since it is already in the GAC after installing it from the optional mono packages.
Hope it helps,
Joe
&quot;David P. Donahue&quot; &lt;<A HREF="mailto:ddonahue@ccs.neu.edu">ddonahue@ccs.neu.edu</A>&gt; wrote:
&quot;System.IO.FileNotFoundException: File
'/home/www/.www/test/bin/ByteFX.MySqlClient.dll' not found.&quot;
:<i>)
</I>
You are correct, I'm compiling with VS .NET 2003. Basically, what I
have here is a single-page C# site which does nothing more than attempt
to connect to the database and populate a data list from a very simple
query, all just for testing the basic functionality.
When compiling, I generally just go to the Build menu and choose Build
Solution. Per your advice, I looked around for other methods in the
interface. I found the Batch Build option under that same menu to have
an entry for Debug and an entry for Release. I checked the Release
entry, clicked the Build button, got the above error when trying to run
it from Mono. I then returned to Batch Build and clicked the Rebuild
button and tried again, but the same error above was returned.
Am I still doing something wrong? What are the proper steps in the VS
interface for building this the way I need it? Conversely, you
mentioned compiling under Linux. I've found information for compiling
an application with Mono, but what are the proper steps for compiling an
ASP .NET site with Mono?
Thank you for your help.
Regards,
David P. Donahue
<A HREF="mailto:ddonahue@ccs.neu.edu">ddonahue@ccs.neu.edu</A>
Joe Audette wrote:
&gt;<i> I've seen this many times. It says file not found but
</I>&gt;<i> more accurate would be &quot;Couldn't load assembly&quot;.
</I>&gt;<i>
</I>&gt;<i> Are you compiling it on windows with vs.net then
</I>&gt;<i> deploying it on linux?
</I>&gt;<i> If so, you will get that error unless you use release
</I>&gt;<i> build and rebuild (not just build). mono doesn't like
</I>&gt;<i> the vs.net incremental builds. Also if there is any
</I>&gt;<i> other dotnet assemblies in the dependency chain for
</I>&gt;<i> the MySQL .NET connector (I'm thinking sharpziplib
</I>&gt;<i> might be one) it also has to be compiled with release
</I>&gt;<i> rebuild.
</I>&gt;<i> Alternatively you can compile on the linux machine and
</I>&gt;<i> it should work.
</I>&gt;<i>
</I>&gt;<i> For the MySQL .NET connector, you might also consider
</I>&gt;<i> installing it in the GAC (Global Assembly Cache). I
</I>&gt;<i> haven't done this yet so I'm not sure how but I am
</I>&gt;<i> sure its possible.
</I>&gt;<i>
</I>&gt;<i> Your other option is don't use the .NET Connector, use
</I>&gt;<i> the previous version under the ByteFx.Data namespace.
</I>&gt;<i> It ships with mono and is already in the GAC if you
</I>&gt;<i> installed it. Thats what I use for mojoPortal running
</I>&gt;<i> MySQL.
</I>&gt;<i>
</I>&gt;<i> Hope that helps,
</I>&gt;<i>
</I>&gt;<i> Joe Audette
</I>&gt;<i>
</I>&gt;<i> <A HREF="http://www.mojoportal.com">http://www.mojoportal.com</A>
</I>&gt;<i> <A HREF="http://www.joeaudette.com">http://www.joeaudette.com</A>
</I>&gt;<i>
</I>&gt;<i> --- &quot;David P. Donahue&quot;
</I> wrote:
<A HREF="mailto:joe_audette@yahoo.com">joe_audette@yahoo.com</A>
<A HREF="http://www.joeaudette.com">http://www.joeaudette.com</A>
<A HREF="http://www.mojoportal.com">http://www.mojoportal.com</A>
---------------------------------
Do you Yahoo!?
The all-new My Yahoo! <20> What will yours do?
--0-2010782795-1107442342=:20776
Content-Type: text/html; charset=us-ascii
&lt;DIV&gt;
&lt;DIV&gt;I have all my data access code in a separate class library project and I have to compile it on the linux machine to get&amp;nbsp;it to work for the same reason.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;On the windows machine I have the ByteFx source code compiled with Rebuild, but it references sharpziplib which is an already compiled dll that is probably not done with Rebuild.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;From the Build menu in VS.NET I use Rebuild Solution. I haven't tried this but my theory is if you get the source code to sharpziplib and compile it with Rebuild and make ByteFx reference the newly compile dll so that everything in the chain is compiled with rebuild it should work. &lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;I've been too busy to try this theory myself. since all my data access code is in one class file, I just compile it on linux using monodevelop though you could also use the command line compiler. I don't have the ByteFx dll in my bin folder either since it is already in the GAC after installing it from the optional&amp;nbsp;mono packages.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Hope it helps,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Joe&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;&lt;B&gt;&lt;I&gt;&quot;David P. Donahue&quot; &amp;lt;<A HREF="mailto:ddonahue@ccs.neu.edu">ddonahue@ccs.neu.edu</A>&amp;gt;&lt;/I&gt;&lt;/B&gt; wrote:&lt;/DIV&gt;
&lt;BLOCKQUOTE class=replbq style=&quot;PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid&quot;&gt;&quot;System.IO.FileNotFoundException: File &lt;BR&gt;'/home/www/.www/test/bin/ByteFX.MySqlClient.dll' not found.&quot;&lt;BR&gt;&lt;BR&gt;:)&lt;BR&gt;&lt;BR&gt;You are correct, I'm compiling with VS .NET 2003. Basically, what I &lt;BR&gt;have here is a single-page C# site which does nothing more than attempt &lt;BR&gt;to connect to the database and populate a data list from a very simple &lt;BR&gt;query, all just for testing the basic functionality.&lt;BR&gt;&lt;BR&gt;When compiling, I generally just go to the Build menu and choose Build &lt;BR&gt;Solution. Per your advice, I looked around for other methods in the &lt;BR&gt;interface. I found the Batch Build option under that same menu to have &lt;BR&gt;an entry for Debug and an entry for Release. I checked the Release &lt;BR&gt;entry, clicked the Build button, got the above error when trying to run &lt;BR&gt;it from Mono. I then returned to Batch Build and clicked the Rebuild &lt;BR&gt;button and tried again, but the same error above
was returned.&lt;BR&gt;&lt;BR&gt;Am I still doing something wrong? What are the proper steps in the VS &lt;BR&gt;interface for building this the way I need it? Conversely, you &lt;BR&gt;mentioned compiling under Linux. I've found information for compiling &lt;BR&gt;an application with Mono, but what are the proper steps for compiling an &lt;BR&gt;ASP .NET site with Mono?&lt;BR&gt;&lt;BR&gt;Thank you for your help.&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;Regards,&lt;BR&gt;David P. Donahue&lt;BR&gt;<A HREF="mailto:ddonahue@ccs.neu.edu">ddonahue@ccs.neu.edu</A>&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;Joe Audette wrote:&lt;BR&gt;&amp;gt; I've seen this many times. It says file not found but&lt;BR&gt;&amp;gt; more accurate would be &quot;Couldn't load assembly&quot;.&lt;BR&gt;&amp;gt; &lt;BR&gt;&amp;gt; Are you compiling it on windows with vs.net then&lt;BR&gt;&amp;gt; deploying it on linux?&lt;BR&gt;&amp;gt; If so, you will get that error unless you use release&lt;BR&gt;&amp;gt; build and rebuild (not just build). mono doesn't like&lt;BR&gt;&amp;gt; the vs.net incremental builds. Also if there is any&lt;BR&gt;&amp;gt; other dotnet assemblies in the dependency chain for&lt;BR&gt;&amp;gt; the MySQL .NET connector (I'm thinking sharpziplib&lt;BR&gt;&amp;gt;
might be one) it also has to be compiled with release&lt;BR&gt;&amp;gt; rebuild.&lt;BR&gt;&amp;gt; Alternatively you can compile on the linux machine and&lt;BR&gt;&amp;gt; it should work.&lt;BR&gt;&amp;gt; &lt;BR&gt;&amp;gt; For the MySQL .NET connector, you might also consider&lt;BR&gt;&amp;gt; installing it in the GAC (Global Assembly Cache). I&lt;BR&gt;&amp;gt; haven't done this yet so I'm not sure how but I am&lt;BR&gt;&amp;gt; sure its possible.&lt;BR&gt;&amp;gt; &lt;BR&gt;&amp;gt; Your other option is don't use the .NET Connector, use&lt;BR&gt;&amp;gt; the previous version under the ByteFx.Data namespace.&lt;BR&gt;&amp;gt; It ships with mono and is already in the GAC if you&lt;BR&gt;&amp;gt; installed it. Thats what I use for mojoPortal running&lt;BR&gt;&amp;gt; MySQL.&lt;BR&gt;&amp;gt; &lt;BR&gt;&amp;gt; Hope that helps,&lt;BR&gt;&amp;gt; &lt;BR&gt;&amp;gt; Joe Audette&lt;BR&gt;&amp;gt; &lt;BR&gt;&amp;gt; <A HREF="http://www.mojoportal.com<BR">http://www.mojoportal.com&lt;BR</A>&gt;&amp;gt; <A HREF="http://www.joeaudette.com<BR">http://www.joeaudette.com&lt;BR</A>&gt;&amp;gt; &lt;BR&gt;&amp;gt; --- &quot;David P. Donahue&quot; &lt;<A HREF="mailto:DDONAHUE@CCS.NEU.EDU">DDONAHUE@CCS.NEU.EDU</A>&gt;wrote:&lt;BR&gt;&lt;/BLOCKQUOTE&gt;&lt;/DIV&gt;&lt;BR&gt;&lt;BR&gt;<A HREF="mailto:joe_audette@yahoo.com">joe_audette@yahoo.com</A>&lt;br&gt;<A HREF="http://www.joeaudette.com<br">http://www.joeaudette.com&lt;br</A>&gt;<A HREF="http://www.mojoportal.com<p">http://www.mojoportal.com&lt;p</A>&gt;
&lt;hr size=1&gt;Do you Yahoo!?&lt;br&gt;
The &lt;a href=&quot;<A HREF="http://my.yahoo.com"">http://my.yahoo.com&quot;</A>&gt;all-new My Yahoo!&lt;/a&gt; <20> What will yours do?
--0-2010782795-1107442342=:20776--
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI> Previous message: <A HREF="025570.html">[Mono-list] Re: MySQL Connection from .NET Website (David P. Donahue)
</A></li>
<LI> Next message: <A HREF="025575.html">[Mono-list] Re: MySQL Connection from .NET Website (David P.
Donahue)
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#25571">[ date ]</a>
<a href="thread.html#25571">[ thread ]</a>
<a href="subject.html#25571">[ subject ]</a>
<a href="author.html#25571">[ author ]</a>
</LI>
</UL>
</body></html>