HomeGenie Forum

General Category => General Discussion => Topic started by: mrx23dot on August 13, 2014, 02:12:18 PM

Title: Compiling HG in SharpDevelop on Windows
Post by: mrx23dot on August 13, 2014, 02:12:18 PM
Hi,

When I open HomeGenie_VS10HomeGenie_VS10.sln in SharpDevelop I get the following error msg. (attached)

After settings each subproject to compile to 32bit, I was able to compile.

In debug session the HG symbol shows up, icon created on tray, but when I click on Start HG Service it fails.

Any one has experience HG on SharpDevelop?
(I don't want to install >4GB Visual Studio)
Title: Re: Compiling HG in SharpDevelop on Windows
Post by: Gene on August 14, 2014, 01:51:50 PM
Why don't you use Xamarin Studio/Monodevelop?

http://xamarin.com/download (http://xamarin.com/download)

g.
Title: Re: Compiling HG in SharpDevelop on Windows
Post by: mrx23dot on August 14, 2014, 05:49:54 PM
Because it needs:
java
Android SDK!?
GTK
sum: 1,5GB

SharpDevelop is 50MB
Also we should be able to simply build it from console, because we have installed .NET.

So why we need Webapplication.targets folder? Can it be put in near source code?
Title: Re: Compiling HG in SharpDevelop on Windows
Post by: bkenobi on August 14, 2014, 06:07:39 PM
I tried to install Xamarin Studio but encountered a number of errors on install.  I ended up installing VS C# Express (2010?).  It works, but I get some errors when loading files indicating version compatibility issues.  Things compile, so I guess they are warnings rather than errors.
Title: Re: Compiling HG in SharpDevelop on Windows
Post by: mrx23dot on August 14, 2014, 07:18:30 PM
As my last resort I installed VS C# Express 2010, but is says can't open solution file because it was made in newer VS.
Newer VS can be 5-8GB, so I say F*** Microsoft.

Here is the way it should be (from command line):
http://stackoverflow.com/questions/7412137/building-c-sharp-console-project-without-visual-studio (http://stackoverflow.com/questions/7412137/building-c-sharp-console-project-without-visual-studio)
Title: Re: Compiling HG in SharpDevelop on Windows
Post by: mrx23dot on August 14, 2014, 07:33:39 PM
one possible solution for Microsoft.WebApplication.targets error is to intall  Visual Web Developer Express 2010

http://stackoverflow.com/questions/20987283/sharp-develop-cant-open-web-applications-written-with-vs-2010?rq=1 (http://stackoverflow.com/questions/20987283/sharp-develop-cant-open-web-applications-written-with-vs-2010?rq=1)

http://stackoverflow.com/questions/3980909/microsoft-webapplication-targets-was-not-found-on-the-build-server-whats-your (http://stackoverflow.com/questions/3980909/microsoft-webapplication-targets-was-not-found-on-the-build-server-whats-your)
Title: Re: Compiling HG in SharpDevelop on Windows
Post by: bkenobi on August 14, 2014, 08:49:07 PM
I should note that I was getting errors with VS as well.  I was only able to compile the XTenLib library which was my goal.  I was not able to compile the whole project but gave up the effort once I realized I only needed one file.
Title: Re: Compiling HG in SharpDevelop on Windows
Post by: mrx23dot on August 14, 2014, 09:10:47 PM
Gene this what you should do:

(from http://tinyurl.com/m3ljap8 (http://tinyurl.com/m3ljap8))

If you don't like to modify anything on build server, and still want project to build right out of source control, it might be a good idea to put required binaries under source control. You'll need to modify imports section in your project file to look like this:

<Import Project="$(SolutionDir)BuildTargetsWebApplicationsWebApplication.target" />
<Import Condition="false" Project="$(MSBuildExtensionsPath32)MicrosoftVisualStudiov10.0WebApplicationsMicrosoft.WebApplication.targets" />

First line is actual import from the new location that is relative to the solution dir. And second one is turned off (Condition="false") original line, that allows for Visual Studio to still consider your project being valid Web Application Project (that's the trick VS 2010 SP1 does itself).

Don't forget to copy C:Program Files (x86)MicrosoftVisualStudiov10.0WebApplications to BuildTargets folder under your source control.
Title: Re: Compiling HG in SharpDevelop on Windows
Post by: mrx23dot on August 25, 2014, 11:22:49 PM
Hi Gene,

I was able to compile on SharpDevelop, normal webpage shows up in debug run,
I have added my new interface into HomeGenieService.cs, but it doesn't show up in web page.
Do I need to manually insert into main.html? And where else do I need to?