Setting up a development environment?

A place for developers to discuss development of OSA
Post Reply
Message
Author
mlinnen
Posts: 9
Joined: Sun Nov 29, 2015 3:25 pm

Setting up a development environment?

#1 Post by mlinnen » Sat Dec 05, 2015 7:39 am

I was looking into setting up a dev machine so that I can debug a few issues I am having as well as test a plugin I intend to write. I ran into a couple issues when doing this.

I pulled down the latest code from github on the master branch and the first issue I ran into was that the Powershell Plugin will not compile. This isn't a big deal for me right now since I am not using powershell at the moment but I thought others might be so I am mentioning it. For me excluding the Powershell project from the solution is enough. The compile error I was getting was related to System.Management.Automation.

Code: Select all

6>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3274: The primary reference "System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" could not be resolved because it was built against the ".NETFramework,Version=v4.5" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".
6>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3275: The primary reference "System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" could not be resolved because it has an indirect dependency on the assembly "Microsoft.Management.Infrastructure.Native, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" which was built against the ".NETFramework,Version=v4.5" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".
6>C:\Users\Mike\Documents\GitHub\Open-Source-Automation\Plugins\OSAE.PowerShellProcessor\CmdLets\CmdLets.cs(6,29,6,39): error CS0234: The type or namespace name 'Automation' does not exist in the namespace 'System.Management' (are you missing an assembly reference?)
If I change the Powershell project to use .Net 4.5 instead of .Net 4.0 it seems to compile fine but I have not tested the plugin at all.

My next issue was really just trying to figure out how to create a database for testing purposes. I created the registry entries that are used to connect to the MySQL DB and I also installed MySQL and created the "osae" database user. In the DB folder of the source I see an number of SQL scripts but I don't see "osae_047.sql". Is the "osae.sql" script for release 47?

Thanks
Mike

Vaughn
Site Admin
Posts: 1432
Joined: Thu May 13, 2010 2:17 pm

Re: Setting up a development environment?

#2 Post by Vaughn » Sat Dec 05, 2015 11:47 am

You need to Install powershell on the machine, since the Powershell plugin is pointing to a Dll in references that is installed by Powershell itself.
Once Powershell is installed, you can verify the path for the System.Management.Automation reference path @:

C:\Program Files\Reference Assemblies\Microsoft\WindowsPowerShell\v1.0\System.Management.Automation.dll


As for the DB, the osae.sql is 047, once osa 047 is released, a backup of the osae.sql is made and named osae_047, but since it is being released now, there is no backup yet.

Post Reply