I'm building from source now, I'll fix the socket options issue in the runtime for C# locally at least, and send you a patch.
The code generator is a "Custom Tool" style generator which fully integrates into the IDE. It automatically compiles the .etch by running the java compiler and then intelligently catenating the class library files (the ones you are not supposed to touch) into a single .cs file. That .cs file automatically gets deposited in the IDE as a file under the .etch (in a tree child), like the designer does with the forms and code (where the code is a child). Technically it is called a "Single File Code Generator" in visual studio terms, however it is just running code so you can do anything you want here, but the result has to be a byte[] of code that Visual Studio then puts into the project and manages for you. All you do is add the .etch to your project and it generates the class library code. Build the class library and you are done. Make changes to the Etch file in the IDE and save it, the generated code is regenerated by Visual Studio through the generator COM object. It takes the Main* and Impl* files and puts them in another location for reference. I can post the README and TUTORIAL files if you like, or see if I can find a place to put the project up for review. Let me know. I wanted to make an environment where you can modify the .etch file and not have to leave the IDE, and that's what I ended up with. It also conforms more closely with typical C# development patterns of using a class library. Most of the examples I have seen thus far tell you to generate the code and then make two copies of it, one for Client and one for Server (or is it Listener?) I'll also need to get approval here to contribute this back - shouldn't be a problem. - Jim -----Original Message----- From: scott comer [mailto:[email protected]] Sent: Thursday, March 11, 2010 11:07 AM To: [email protected]; [email protected] Subject: Re: sockopt error, C# runtime? hi james. sorry to hear you are having trouble. i'm having a similar problem with selector based java code from the 1.1 release under windows 7. it doesn't always happen for me. i think it is a race condition in windows tcp stack. please create an issue in jira for this. i will write myself a note to create one for the java side. this could be fixed in the pending 1.1 release, or in the 1.2 release. the workaround is to just attempt the start again after waiting a few tens of milliseconds. if you like, please try that technique for c# and let me know how that works... as to your code generator, i think you're talking about a vs plugin to call the compiler? or it is a version of the c# compiler which packages the code up slightly differently, or both? i think better support for the ide's is good, we would have to discuss in the group how best to package and distribute such a thing. thanks for getting involved! scott out On 3/11/2010 9:51 AM, James King wrote: > Hello, > > This is my first message... I pulled the 1.0.2 distribution and I have > been writing a code generator for Visual Studio 2008. While putting > together an example tutorial for using the code generator to show how > you don't have to leave the IDE any more, I tried to run the "example" > example. It failed curiously with the following on the client and > server. I am on Windows 7: > > System.Net.Sockets.SocketException: An unknown, invalid, or unsupported > option or level was specified in a getsockopt or setsockopt call > at System.Net.Sockets.Socket.SetSocketOption(SocketOptionLevel > optionLevel, SocketOptionName optionName, Int32 optionValue, Boolean > silent) > at System.Net.Sockets.Socket.SetSocketOption(SocketOptionLevel > optionLevel, SocketOptionName optionName, Int32 optionValue) > at Etch.Util.TcpTransport.SetUpSocket() in > c:\BambooAgent\xml-data\build-dir\ETCH-RELEASE\binding-csharp\runtime\sr > c\main\csharp\Etch\Util\TcpTransport.cs:line 193 > at Etch.Util.Connection`1.Run0(Boolean first) in > c:\BambooAgent\xml-data\build-dir\ETCH-RELEASE\binding-csharp\runtime\sr > c\main\csharp\Etch\Util\Connection.cs:line 116 > > This happens on the client and on the server. My next step is to go to > the trunk code with svn and set up a build environment. Is this a known > issue from the current binary distribution? I would also like to know > how I can contribute the Visual Studio code generator back to the > project. It allows you to add an .etch file into Visual Studio and > compiles everything except the Main* and Impl* into a single .cs file, > much like the designer does when editing a form. It will help bring > Etch closer to the C# class library style of project references instead > of copying core files around. > > Thanks, > > James E. King, III > Senior Software Engineer > Dell (EqualLogic) HIT Team > 300 Innovative Way, Suite 301 > Nashua, NH 03062 > [email protected] > >
