fantaxp7 191 Posted February 16, 2016 Posted February 16, 2016 Sorry no luck https://www.dropbox.com/s/knohzh8opm40i09/server-63591224989.txt?dl=0
chef 3810 Posted February 16, 2016 Author Posted February 16, 2016 Ops! It looks like visual studio went ahead and references "Visual Basic" namespace again... I'll be in touch. 1
chef 3810 Posted February 17, 2016 Author Posted February 17, 2016 Here is a Dll which gets rid of that reference... @@fantaxp7 https://dl.dropboxusercontent.com/u/46151346/SampleProject/SampleProject/bin/Debug/Vera%20Smart%20Home%20Automation.zip
fantaxp7 191 Posted February 17, 2016 Posted February 17, 2016 Here is a Dll which gets rid of that reference... @@fantaxp7 https://dl.dropboxusercontent.com/u/46151346/SampleProject/SampleProject/bin/Debug/Vera%20Smart%20Home%20Automation.zip Still no luck https://www.dropbox.com/s/mvbti22cscyxk6k/server-63591265287.txt?dl=0
GlennNZ 92 Posted February 17, 2016 Posted February 17, 2016 Hi I've been following vaguely - but does seem strange not sure relates to dependencies? I notice that RottenTomatos also running as Plugin on the Mono system - does this work? using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Linq; using System.Threading; using System.Threading.Tasks; Above are the using from the RottenTomatoes Code - if it works think can rule some of those dependencies as issue? ?Vb.net issue @fantaxp7 Could you try the following dll Plugin (which is my one for FrontView+ in c# and creates a few new APIendpoints) but also uses quite a few dependencies. Should get Plugin settings page, select client and should generate Xml. If this one works may be useful at narrowing down issues - may be specific vb.net issue? Glenn MediaBrowser.Plugins.FrontView.zip 1
chef 3810 Posted February 17, 2016 Author Posted February 17, 2016 I think you are right, it is Visual Basic. There is no reference in the code, but the dll must somehow compile using the dependency because that is the language. I wonder if I can convert the whole plugin to c#...
GlennNZ 92 Posted February 17, 2016 Posted February 17, 2016 Its a compiled language (so isn't needed) - would have thought that is possible to turn off. Checking now... 1
GlennNZ 92 Posted February 17, 2016 Posted February 17, 2016 (edited) Here: http://www.codeproject.com/Articles/14953/Compile-VB-NET-code-without-Microsoft-VisualBasic Old, but may be relevant Edited February 17, 2016 by GlennNZ 1
chef 3810 Posted February 17, 2016 Author Posted February 17, 2016 Good find. I'll try the commandline options and see if it helps when building the dll. Luckily I went through and removed all of the vb6 style code so there shouldn't be any errors in the compile.
GlennNZ 92 Posted February 17, 2016 Posted February 17, 2016 (edited) This one is even better: With the same Mono issue: http://www.xtremevbtalk.com/archive/index.php/t-300807.html & Seems can do from within Code https://msdn.microsoft.com/en-us/library/microsoft.build.tasks.vbc.novbruntimereference.aspx?cs-save-lang=1&cs-lang=vb#code-snippet-1 Edited February 17, 2016 by GlennNZ 1
chef 3810 Posted February 17, 2016 Author Posted February 17, 2016 I wonder if every class has to have the "NoVBRuntime" property in it? This is super interesting stuff. Going to have to test a bunch of possibilities. 1
chef 3810 Posted February 17, 2016 Author Posted February 17, 2016 (edited) Okay this is kind of wierd. I am using visual studio 2012, with resharper installed. It is running on Windows 8.1. The namespace "NoVBRuntimeReference" doesnt exsist in MIcrosoft.Build or in any sub class. Upon further investigation I found out that you can manually add the property to the vbproj file as a node in the XML. Then reload the project with that node enabled. somethinh else popped up in my solution. There are Global VisualBasic references in the setting portion of the solution... Hopefully that doesn't create any problems because I am not using the settings in visual studio; instead we use the emby configuration file to save information. Blah, blah coding... Technical jargon... Lol. Edited February 18, 2016 by chef
AdrianW 1058 Posted February 18, 2016 Posted February 18, 2016 (edited) Totally OT - but every time I read this thread title, the following lyrics play in my head: Vera, Vera... Edited February 18, 2016 by AdrianW
chef 3810 Posted February 18, 2016 Author Posted February 18, 2016 (edited) And upon even more testing, I can confirm that adding the "NoVBRuntimeReference" is a bad idea. It completely disables the compiler. But if @@fantaxp7 would try this version, which removes any global references to "VisualBasic" which show up in resources in the compiler: https://dl.dropboxusercontent.com/u/46151346/SampleProject/SampleProject/bin/Debug/Vera%20Smart%20Home%20Automation.zip Edited February 18, 2016 by chef
GlennNZ 92 Posted February 18, 2016 Posted February 18, 2016 (edited) Check out DotPeek .net Dll Reviewer -https://d1opms6zj7jotq.cloudfront.net/resharper/dotPeek32_10.0.2.exe (Free) As Below on new Dll (as above) shows VisualBasic Reference still there? (and it has a find usages - check - with shows 5 usages in AssemblyReference - debug) Edited February 18, 2016 by GlennNZ
chef 3810 Posted February 18, 2016 Author Posted February 18, 2016 (edited) I am starting to hate VisualBasic. The Compiler will always grab the reference when building the DLL. Even If I use a Command Line with MSBUILD. I'm afraid that we might have to accept that this plugin won't be cross platform in the state it is in. VB.net wasn't a good choice of languages to use. Edited February 18, 2016 by chef
fantaxp7 191 Posted February 18, 2016 Posted February 18, 2016 And upon even more testing, I can confirm that adding the "NoVBRuntimeReference" is a bad idea. It completely disables the compiler. But if @@fantaxp7 would try this version, which removes any global references to "VisualBasic" which show up in resources in the compiler: https://dl.dropboxusercontent.com/u/46151346/SampleProject/SampleProject/bin/Debug/Vera%20Smart%20Home%20Automation.zip No luck
chef 3810 Posted February 19, 2016 Author Posted February 19, 2016 I started to convert this plugin to c#. I started about three hours ago. I have fixed 35 of the 96 errors which didn't convert properly. Luckily it is the weekend and I can hopefully have it built.
chef 3810 Posted February 20, 2016 Author Posted February 20, 2016 (edited) I did it! @@fantaxp7 ! it took me all day to learn C#. But i did it. Slayed the mighty beast! Here is a version which is built in C#. It will create a configuration XML and fill in the data. There is no HTML configuration yet, but that is easy because I have become good enough at this stuff. Please test this CS version of the plugin and report back! https://dl.dropboxusercontent.com/u/46151346/MiOSEmbyZWaveControllerCS/MiOSEmbyZWaveControllerCS/bin/Debug/MiOSEmbyZWaveControllerCS.zip Edited February 20, 2016 by chef
chef 3810 Posted February 21, 2016 Author Posted February 21, 2016 (edited) This one has a fully functioning Configuration UI attached to the C# code which is nice. However I am not sure how the event arguments working out. I gotta check those next. @@fantaxp7 I would love to know if this works for you. The only HTML problem is that the Device List doesn't populate you have to press the "Refresh Devices" Button. https://dl.dropboxusercontent.com/u/46151346/MiOSEmbyZWaveControllerCS/MiOSEmbyZWaveControllerCS/bin/Debug/MiOSEmbyZWaveControllerCS.zip Edited February 21, 2016 by chef
fantaxp7 191 Posted February 22, 2016 Posted February 22, 2016 This one has a fully functioning Configuration UI attached to the C# code which is nice. However I am not sure how the event arguments working out. I gotta check those next. @@fantaxp7 I would love to know if this works for you. The only HTML problem is that the Device List doesn't populate you have to press the "Refresh Devices" Button. https://dl.dropboxusercontent.com/u/46151346/MiOSEmbyZWaveControllerCS/MiOSEmbyZWaveControllerCS/bin/Debug/MiOSEmbyZWaveControllerCS.zip 1
fantaxp7 191 Posted February 22, 2016 Posted February 22, 2016 Just to clarify that smile is a "we're back in business smile" So glad you were able to figure it out. Thanks for not giving up! 1
fantaxp7 191 Posted February 22, 2016 Posted February 22, 2016 A few notes, @@chef 1. I selected a device, set up the scenes I wanted, then when I went to hit save I noticed that the save bar was completely gray. 2. After hitting save and coming back later to I don't see the device as setup and saved. Thanks
chef 3810 Posted February 22, 2016 Author Posted February 22, 2016 (edited) A few notes, @@chef 1. I selected a device, set up the scenes I wanted, then when I went to hit save I noticed that the save bar was completely gray. 2. After hitting save and coming back later to I don't see the device as setup and saved. Thanks Okay, I may have to look at the save button, because I ran into trouble with it as well and did a quick re-code which wasn't completely tested. Does the configuration xml get written and saved too? C# is better, I am glad this has worked out. If anything, it has forced me to catch up with the rest of the coders out there. This is just the begining. We need to change the plugin name as well. "MiosZwavecontroller" will leave any doubt from the last plugin behind it. This is great, we have a Cross platform utility, with "pause/unpause" events working (thanks to @@GlennNZ ). Edited February 22, 2016 by chef
fantaxp7 191 Posted February 22, 2016 Posted February 22, 2016 Okay, I may have to look at the save button, because I ran into trouble with it as well and did a quick re-code which wasn't completely tested. Does the configuration xml get written and saved too? C# is better, I am glad this has worked out. If anything, it has forced me to catch up with the rest of the coders out there. This is just the begining. We need to change the plugin name as well. "MiosZwavecontroller" will leave any doubt from the last plugin behind it. This is great, we have a Cross platform utility, with "pause/unpause" events working (thanks to @@GlennNZ ). Yes it did get written. Or at least written too by looking at the date, it has the old name not MiosZwavecontroller it so it could have been left over?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now