Page 1 of 1

assembly wpdotnet could not be loaded when precompiling

PostPosted: May 19th, 2013, 1:41 pm
by deming14points
Hi,

I'd like to remove all php files by precompiling wpdonet.

I then installed Phalanger and I created a batch file under my wpdotnet install with
"C:\Program Files (x86)\Phalanger 3.0\Bin\phpc" /target:web /root:. /recurse:. /out:Bin /static+ /debug-

as explained here
http://www.php-compiler.net/blog/2012/w ... c314894195

When running I got this error when precompiling "assembly wpdotnet could not be loaded ... An attempt was made to load from network ... "

Whereas it is not true, all files are local to the server :!:

Re: assembly wpdotnet could not be loaded when precompiling

PostPosted: May 19th, 2013, 2:16 pm
by Jakub Misek
Hi,

Great you are trying wordpress on .NET!

web.config contains reference to WpDotNet assembly. So ensure, there is Bin\WpDotNet.dll file.

If not, just remove that reference from web.config. Otherwise, try to change that reference from
Code: Select all
<add assembly="WpDotNet"/>
to
Code: Select all
<add url="bin\wpdotnet.dll"/>


Thanks,

Re: assembly wpdotnet could not be loaded when precompiling

PostPosted: May 20th, 2013, 6:24 pm
by deming14points
Hello,

Thanks for your support: it works better. I removed all assembly reference in web.config then It compiled.


Still when browsing on wordpress I got error "Your PHP installation appears to be missing the MySQL extension which is required by WordPress."

I then tried to add "Bin\PhpNetMysql.dll" but on compilation I got error "... could not be loaded. The given assembly name or codebase was invalid".

Re: assembly wpdotnet could not be loaded when precompiling

PostPosted: May 20th, 2013, 6:26 pm
by Jakub Misek
Hi,

Great!

PhpNetMysql.dll has dependency. I understand that .NET exception is not much descriptive ...

PhpNetMysql.dll requires MySQL.Data.dll. Just copy this file into Bin.

Thanks,

Re: assembly wpdotnet could not be loaded when precompiling

PostPosted: May 27th, 2013, 10:06 pm
by deming14points
>PhpNetMysql.dll requires MySQL.Data.dll. Just copy this file into Bin.

Well MySQL.Data.dll is already in Bin.

Re: assembly wpdotnet could not be loaded when precompiling

PostPosted: May 28th, 2013, 10:32 am
by Jakub Misek
Also you have to ensure, the assembly is listed in your web.config

Code: Select all
<classLibrary><add assembly='PhpNetMySql' />...

Re: assembly wpdotnet could not be loaded when precompiling

PostPosted: June 8th, 2013, 1:37 am
by deming14points
PhpNetMySql is already added :

Code: Select all
      <classLibrary>
         <clear/>
         <add assembly="WpDotNet"/>
         <add assembly='PhpNetCurl' />
         <add assembly='PhpNetIconv' />
        <add assembly='PhpNetMbstring' />
         <add assembly="PhpNetClassLibrary, Version=3.0.0.0, Culture=neutral, PublicKeyToken=4af37afe3cde05fb" section="bcl"/>
         <add assembly="PhpNetMySql, Version=3.0.0.0,Culture=Neutral,PublicKeyToken=2771987119c16a03" section="mysql"/>
         
         <!-- Phalanger Professional Managed extensions -->
<!--          <add assembly="PhpNetCurl.dll, Version=3.0.0.0, Culture=neutral, PublicKeyToken=d4cd94916abb991b" section="curl" />
         <add assembly="PhpNetXml.dll, Version=3.0.0.0, Culture=neutral, PublicKeyToken=d4cd94916abb991b" section="xml" />
         <add assembly="PhpNetGd2.dll, Version=3.0.0.0, Culture=neutral, PublicKeyToken=d4cd94916abb991b" section="image" />
         <add assembly="PhpNetZlib.dll, Version=3.0.0.0, Culture=neutral, PublicKeyToken=d4cd94916abb991b" section="zlib" />
 -->      
         <!-- PHP Native extensions (Windows only) -->
<!--       <add assembly="php_curl.mng, Version=3.0.0.0, Culture=neutral, PublicKeyToken=4ef6ed87c53048a3" section="curl"/>
          <add assembly="php_xml.mng, Version=3.0.0.0, Culture=neutral, PublicKeyToken=4ef6ed87c53048a3" section="xml"/>
         <add assembly="php_gd2.mng, Version=3.0.0.0, Culture=neutral, PublicKeyToken=4ef6ed87c53048a3" section="image"/>
         <add assembly="php_image.mng, Version=3.0.0.0, Culture=neutral, PublicKeyToken=4ef6ed87c53048a3" section="image"/>
         <add assembly="php_zlib.mng, Version=3.0.0.0, Culture=neutral, PublicKeyToken=4ef6ed87c53048a3" section="zlib"/>
-->
 
      </classLibrary>

Re: assembly wpdotnet could not be loaded when precompiling

PostPosted: June 18th, 2013, 10:19 am
by Jakub Misek
It is possible, the assembly could not be loaded; in such case your first request to WordPress page would show an ASP.NET error message.

Otherwise I'm not sure what could be wrong. Could you please add
Code: Select all
phpinfo();
e.g. to index.php file, and check whether there is MySQL extension loaded? (or attach the output here)

Thanks!