Start a new topic
Answered

dcc.exe use Path.Combine instead

I have been playing with the dcc.exe on my mac using the latest mono (.net framework 4.5)...


Now i dont know if the whole dcc.exe (or more likely one of the assemblies being used by dcc.exe) wil run to completion because im getting stuck on the backslash..


For both the command line and msbuild it looks like your are hard coding "backslashes" in your path...


So if i compile dcc.exe program.cs... you are taking the current directory

and adding "\" filename... so it looks something like: /Users/Mackey/TestDuo\program.cs which gets file not found.


If you use Path.Combine(GetCurrentDirectory(), filename) - where filename = "Program.cs"


it while be right on mac/mono "/Users/Mackey/TestDuo/Program.cs'



Best Answer

Hi there, check out DuoCode 0.6 with full support for Mono / xbuild!


More info here: http://blog.duoco.de/2015/05/18/duocode-0.6-with-mono-visual-studio-2015-rc-support/


I know this is just experimenting... but just take a look at this


error CS2001: Source file '/Users/Mackey/Projects/AnotherDuo/AnotherDuo\','' could not be found.

error CS2001: Source file '/Users/Mackey/Projects/AnotherDuo/AnotherDuo\'))' could not be found.

error CS2001: Source file '/Users/Mackey/Projects/AnotherDuo/AnotherDuo\MyClass.cs' could not be found.

error CS2001: Source file '/Users/Mackey/Projects/AnotherDuo/AnotherDuo\Properties/AssemblyInfo.cs' could not be found.


it looks like you a hard coding "\" either AFTER the path you get from the system OR BEFORE a reference to a file. 


Note: '/Users/Mackey/Projects/AnotherDuo/AnotherDuo\Properties/AssemblyInfo.cs'


because the "\" is after the path... BUT the rest of the filename has proper slashes 'Properties/AssemblyInfo.cs' you HAVE to be doing something like:


Directory.GetCurrentDirectoy() + "\" + FileInfo.name


Or something like that.


If in you guys think about Path.Combine those two variable together... I think i can get alot further along

with my MacOS using Mono Testing...


Now dont get me wrong.. Windows is kool, Visual Studio is also kool.... But im a MAC guy (Heck my first name is Mackey)


I really love developing on my Nice big 12 core 64GIG Dual Flat screen MAC system (I run a Virtual Machine for my windows and visual studio stuff). 


The dcc.exe look a normal .net main classed assembly that is your using other .net assemblies. I see no

native code. So unless those YOU or the OTHER Code Analysis assemblies  are using NATIVE windows dllimport or something, i see no reason why it shouldnt work on Mac using latest .net 4.5 mono framework

i see no reason why it should not work... Just gott get past the hard coded backslash first




Answer

Hi there, check out DuoCode 0.6 with full support for Mono / xbuild!


More info here: http://blog.duoco.de/2015/05/18/duocode-0.6-with-mono-visual-studio-2015-rc-support/

Login or Signup to post a comment