install MySql connector on Ubuntu Server, Mono - mono

Connector is installed in gac:
nn#sv3:~/mysqlconnector.net/v4.5$ gacutil -l |grep MySql
MySql.Data, Version=6.9.7.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d
I have added MySql.Data to machine config:
nn#sv3:/$ cat /etc/mono/4.5/machine.config |grep MySql
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient"
type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.7.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
When I try to comile with ref to MySql.Data I get:
nn#sv3:/$ sudo ./build.sh
error CS0006: Metadata file `MySql.Data.dll' could not be found
I have tried to changed ref with full path and both MySql.Data and MySql.Data.dll
Here is the compile command:
dmcs -target:library -out:SQLtest.dll -pkg:dotnet -lib:/usr/lib/mono/2.0 -lib:/usr/lib/mono/4.5 -r:MySql.Data -r:*.cs
Have also tried to use v4.0 with same result.
What am I missing to get this working?

Related

mod_wsgi-express: error: Invalid command was specified

I am trying to run wsgi application (hello.wsgi) on localhost through apache24 with mod_wsgi module but it shows this:
cd c:/apache24/bin
mod_wsgi-express start-server hello.wsgi
Usage: mod_wsgi-express command [params]
Commands:
module-config
module-location
mod_wsgi-express: error: Invalid command was specified.
Please help me!
On Windows the start-server command is not available. Using pip install mod_wsgi on Windows is only for getting the mod_wsgi module compiled. Once you have it compiled, run:
mod_wsgi-express module-config
Copy the output from that into your Apache configuration file to have it load the mod_wsgi module. Then configure Apache manually to host your specific WSGI application.
See section "Connecting into Apache installation" in:
https://pypi.python.org/pypi/mod_wsgi
for more details about the module-config command.

Mono Method 'SqlParameter.set_TypeName' not found. & fastcgi

Trying to run a site that is built under v4.5 profile.
I’m building with the latest docker image:
docker run --name=monobuild -it -v `pwd`/src:/var/src -v `pwd`/out/temp:/var/out -w /var/src/ -e MONO_IOMAP=case mono:latest xbuild /var/src/Api.Admin.sln /p:Configuration=Local /p:OutDir=/var/out/
I had this same error when compiling but I forgot how I got it to go away.
Now I’m getting it when attempting to run it in this docker image: https://github.com/seif/docker-mono-fastcgi-nginx
I suspect it’s not loading up the v4.5 libs but I have no clue of how to configure fastcgi to do this.
The error screen gives : Version Information: 4.0.4 (Stable 4.0.4.1/5ab4c0d Tue Aug 25 23:11:51 UTC 2015); ASP.NET Version: 4.0.30319.17020
I’ve had a hell of a time trying to get this to run in apache/nginx. Any help would be super appreciated.
The Web.config has:
<httpRuntime targetFramework="4.5" />
<compilation targetFramework="4.5" />

WebSVN throws XML error: no element found (3) after upgrading to SVN 1.8.8

We were on SVN 1.6.11 and just upgraded to 1.8.8 today. We can check files in and out using https:// and file://
Our install of WebSVN 2.3.3 was working before, but now give a blank page with this error:
XML error: no element found (3) at line 3 column 0 byte 28\ncmd: svn --non-interactive --config-dir /tmp log --xml --verbose -r HEAD:1 'file:///home/ckhronos/svn/repos/#HEAD' --limit 2
If we run:
svn --non-interactive --config-dir /tmp log --xml --verbose -r HEAD:1 'file:///path/to/repos/#HEAD' --limit 2
from the command line we get a reasonable output:
<?xml version="1.0" encoding="UTF-8"?>
<log>
<logentry
revision="26184">
<author>authorname</author>
<date>2014-04-02T16:09:30.683040Z</date>
<msg>Short message.
</msg>
</logentry>
<logentry
revision="26183">
<author>authorname</author>
<date>2014-04-02T15:46:03.903486Z</date>
<paths>
<path
prop-mods="false"
text-mods="true"
kind="file"
action="M">/path/to/file/edited.txt</path>
</paths>
<msg>Long message here</msg>
</logentry>
</log>
We are running CentOS 6.5 with PHP 5.4. We build subversion from source. Would anyone know why we might be getting this error?
There were two version of SVN on the server. One was the old 1.6.11 in /usr/bin/svn and the other the new 1.8.8 version at /usr/local/bin/svn. From the command line I was getting out put from the new /usr/local/bin/svn version. In PHP, where that command was run from, it was loading in the old version of svn.
Once I updated the path to point to the proper version of svn, all was fine.
Incidentally I found this bug by using:
echo stream_get_contents($pipes[2]);
To see what the real output was from the script.

build error mono 3.4.0 centos

get source from downloads
make && make install
mkdir -p -- /usr/lib/mono/xbuild/Microsoft/Portable/v4.0
/usr/bin/install -c -c -m 644 targets/Microsoft.Portable.Common.targets /usr/lib/mono/xbuild/Microsoft/Portable/v4.0/Microsoft.Portable.Common.targets
/usr/bin/install: cannot stat `targets/Microsoft.Portable.Common.targets': No such file or directory
the mono 3.4 archive is missing a file named Microsoft.Portable.Common.targets which should be located at path mcs/tools/xbuild/targets/Microsoft.Portable.Common.targets with the following content:
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\Microsoft.Portable.Core.props" />
<Import Project="..\Microsoft.Portable.Core.targets" />
</Project>
See this bug:
https://bugzilla.xamarin.com/show_bug.cgi?id=18690
Just a small note (as much for my self) which I made a mistake with as the path specified I found a little confusing. If you installed in extracted in /usr/local/src/mono-3.4/ the path of the file you need to put the content in is:
/usr/local/src/mono-3.4/mcs/tools/xbuild/targets/Microsoft.Portable.Common.targets
not
/usr/local/src/mono-3.4/mcs/tools/xbuild/targets/.content/Microsoft.Portable.Common.targets
or
/usr/local/src/mono-3.4/mcs/tools/xbuild/targets/.content

Exec Task in MSBuild for execution of command on remote machine

I am using following command to install a service via MSBuild file. This works great
<Exec Command= 'c:\test\myService.Appservices.exe install' ContinueOnError='false' />
But the above command install the service on local machine. I want to install the service on a remote machine. How can I specify the machine name using this command?
As per Mike Vine's comment, MSBuild doesn't include tools for remote execution. You could however use something like psexec. e.g.
<Exec Command='psexec -accepteula -s \\RemoteServer "C:\Path To EXE on Remote Machine\my.EXE"' IgnoreExitCode="false" ContinueOnError="false" Timeout="600000" >
<Output TaskParameter="ExitCode" PropertyName="exitCode1"/>
</Exec>