In plain C++, templated class methods are only instantiated if they are actually used within the linkage scope. I suspect that the C++/CLI implementation may be doing the equivalent -- not generating code for Test() if it's not being used in the C++ assembly.
The answer to your question is actually very simple. When you compile your mixed assembly - C++/CLI there are some rules that the compiler follows to exporting native functions outside the assembly and outputting meta data for them.
One of them is that native methods don't get exposed out of the assembly unless explicitly specified. To explicitly specify a native method to be exposed via meta data, you use the #pragma make_public( Your Class Here )
.
Other one is that template functions cannot be exposed out of the assembly. So in your case you can't expose the template class.
BUT in your case I am almost positive that you don't need template class, but a generic one which is absolutely OK to be exported.
Why do you need templates? Do you understand the difference between template<> and generic<>? One is compile time unit, the other is runtime.
Try using
generic<class T>
public ref class B
{
public:
void Test(){}
};
public ref class A : public B<System::Int32>
{
};