It is Charles Then ,
If you find Mr. sprinkled here and there consider it a syntax error
Are memory mapped files really a .NET 4.0-only thing? I was on a C# project a few years back that used memory mapped files. Maybe they were using a 3rd party lib...
Yes sir indeed i am sure of that.you certainly might be using 3rd party lib..
http://msdn.microsoft.com/en-us/magazine/ee428166.aspxYou mention keeping the C# code and then using the .NET 4.0 C# compiler on that. There is actually a Cobra command line option that lets you do this in one step. "cobra -native-compiler:/PATH/TO/csc.exe ..." I think I've seen at least one person already doing this
I was reminded of that when trying 4.0 I did use that initially and thought it would work
but it gave as i allready mentioned BADimage error that from Cobra side suggesting something
like what i am trying to use is newer than what Cobra is made up of.
I could only think of one reason for that. That when i referenced .net 4.0
assemblies internally you might be trying to fetch and read inside of them
access and implement their object for C# files which then would be passed on to
C# compiler. and it might be this fetching or something along those lines causing mixing
of 2.0 with 4.0 and resulting in this error, before even reaching C# compiler. because if it would have reached C# compiler, there seems no reason for this.
So what to do since Cobra compiler would not accecpt 4.0 either to compile itself
or programms for 4.0.
knowing little what i know and Cobra internal working being a black box to me .I thought of taking cobra compiler out of the picture for a while and sending contents directly to C# compiler, but for that C# files were needed hence i -kif:yes(ed) the Cobra itself
during install-from-workspace process.
Yes, feel free to post files and/or more comments on the steps you followed to use .NET 4.0.
so i continue..
Now i included every file into a .proj keeping ditto with what is in the Source folder.
while -kif:(ing) Native_ert_Guidnumber.cobra.cs is produced and there are two places where
Cobra.Lang source is located
1) Snapshot
2) Cobra.Lang
at this point i had to drink water.
So i hit the compile button. getting reminded by errors that same things are decalred twice or
some duplication was happening. So i removed Cobra.Lang folder alltogether , now it worked but
for CobraInfo. it could not locate this Class anywhere i also looked franticaly here and there
to see where it might be i could niether see a file named that or implemented along with someother class.
at this point above water got evaporated quickly. and just when i was ready to blame the world.
I found it where the error had occured i could see CobraInfo sitting inside of a string as if entire class was to be written to a file.
A-han i thought Charles sure has sense of humour practising strings like that
i immidiatley created a cobraInfo file changed the string to C# equivalent just to see if it works and Ta-Da compilation succeded.
at this point above water reapeared along with endless shouting of yes yes inside of me.
i thought since CobraLang files have been compiled into the compiler no Cobra.Lang was needed
separatly soon to be proved wrong.
so i created a separate Project for Cobra.Lang this time including back the folder Cobra.Lang
from the Source Folder which i had earlier removed in compiler making.
now i removed all the _ert_guidstrings from Cobra.Lang_ert_guidstrings from the Cobra.Lang folder files. and compiled it and there it was Cobra.Lang ready. i refrenced it into the compiler project
recompiled it and every thing seems to work okay.
i have two assemblies now
1) CobraAsCSharp.exe
2) Cobra.Lang.dll
they seem to be doing okay for what little i used. i am posting it on SD4 plugin site
for use with SD4 so those who know better can rectify it for full use.
- Icon for Cobra
- Icon.jpg (9.63 KiB) Viewed 7113 times
How about this file to use as icon for cobra and for its files in Sharpdevelop
i think i need to streamline the pencil a little bit more on this file.
ThankingYou
RIGHT_THEN