Installation

  • Download file CsCppSetup.msi
  • Run it
  • Open C++ project
  • Select your project in Solution Explorer
  • Click a mouse right-button to open a context menu
  • Click Build customizations menu item
build_custom.gif
  • Tick a checkbox for cscpp files.
build_custom_dlg.gif
your VS IDE is ready to use CsCppUtility.exe

How to...

Add C# file to C++ project

  • Add new project item with .cs file extention (for example Test1.cs)
  • Click a mouse right-button on the just added new item Test1.cs and select Properties item
  • In Properties menu click on Item Type and select "C# to C++ converter"
select_cscpp.gif
  • type simple class declaration in text editor for example: class TestClass { }
  • Click a mouse right-button on Test1.cs again and select Compile item, it will generate 2 files, test1.cpp and test1.h
compile_cscpp.gif
  • add test1.cpp and test1.h to your project
  • Now you can edit your project file to place test1.cpp and test1.h under Test1.cs file in Solution Explorer. for that you need to unload your project and edit <Your>.vcxproj file. Add sub. node <DependentUpon>Test1.cs</DependentUpon> in <ClInclude Include="test1.h"></ClInclude> and in <ClCompile Include="test1.cpp"></ClCompile>
edit_proj.gif
  • Save and reload the edited file <Your>.vcxproj
  • Now you should see 2 nested files under Test1.cs file in Solution Explorer.
nest_view.gif

Last edited Nov 3, 2012 at 4:59 PM by AlexDev, version 7

Comments

No comments yet.