Building C#

Added by Scott Graham almost 11 years ago

Hi

Just wondering if you have any suggestions on where I'd start to get C# code building along with my C++ (preferably along with with .csproj's too, to push my luck...)

scott


Replies (3)

RE: Building C# - Added by Chris Chapman almost 11 years ago

To be honest - this is something I'm interested in as well. Visual C# supports building from the command line, but I've only ever tried it from the project level before. I think that given the way C# is structured, it would have to be something along the lines of the .vsproj/.sln generation stuff that JamPlus already has - i.e. auto-generating a .csproj file and then building it as a whole.

In theory you can pick apart the .csproj files that you currently have and adapt the JamToWorkspace Lua scripts to generate similar files...

RE: Building C# - Added by Joshua Jensen almost 11 years ago

I have added a new sample at source:samples/csharp-windowsforms/. In its Jamfile, I have embedded rules to build a C# application. It is not complete enough to go into the source:bin/jammodules/ directory yet, and I don't use C# enough to make that happen.

I am not aware of a syntax to generate a makefile-style .csproj. However, it turns out that the makefile .vcproj files mostly work. I can debug the csharp-windowsforms/ sample without issue. Within the IDE, though, it complains about the LIB environment variable being wrong, but it compiles the resultant .exe anyway.

I set up the rules up for Visual Studio 2008 and the .NET Framework 3.5. You'll notice I have hardcoded paths. If you know how to get the paths in question from the registry (for example), that would be great. If there are other improvements, let me know. There isn't currently support in there to build a non-exe assembly, but it wouldn't be hard to add.

If we can make this full featured enough, let's drop it directly into the source:bin/jammodules/ directory as an official JamPlus module.

Thanks for your patience. I have been unavailable until now.

Josh

RE: Building C# - Added by Joshua Jensen over 10 years ago

As of JamPlus 0.3, there is a Jam module called CSharp that handles what this sample used to. It does so in a more generic, shippable manner.

Josh

(1-3/3)