I was under (the possibly false) impression that the new c++/cli compiler would allow me to write code (at least the managed part) in .cpp or .h files as I please. I thought it would be a multi pass compiler where symbols were gathered first with namespaces used to differentiate what would otherwise be symbol clashes. The code could then be laid out more like C# or Java.
What I have found is that I still have to #include code and prototype symbols as in native c++, otherwise I get the usual unknown and duplicate symbol errors. So please enlighten me as to what I am missing, what has changed, what is good practice in putting code into files and exposing it to other classes.

C++/CLI header files and code layout?
martin quirion
Make a new file extension eg. *.cppcli (that represents a compiler flag like the difference between C and C++) and compile these source to produce object files. They get treated as one compilation block, so there cannot be duplicate symbols. You don't #include them, instead, you access them for the whole project. This way, it is impossbile for #defines to influence compilation, and legacy .cpp and .h files treat (the code in) them as if all symbols were defined in a shared header. Hopefully this would allow legacy and new code layout to coexist with few issues.
Although the .cpp and .h file method of coding has uses, making and maintaining these files, and pre declaring symbols before use is cumbersome for modern programming style.
PDWLC
We have talked about switching over to a model that is closer to C# and Java but the problem is that this model tends to break if applied to existing C++ applications: getting the correct preprocessor semantics is by itself a huge task. So if we ever do support the C# compilation I suspect, that at least for the first release, it will be limited to managed code.
For now you need to ensure that each *.cpp files includes all the header files that it requires.