I am developing a UWP App in C# and I would like to use a C++ function from a C++ "Windows Runtime Component" project in the same solution, however, when I add a project reference of the C++ project to the main app, I cant use it's namespace in C# files. When I write
using WindowsRuntimeComponent1;
the compiler says that the namespace can't be found. What am I doing wrong?
Here is the C++ header file "Class1.h" (Visual Studio Created Class1 by default, I didn't change anything)
#pragma once
namespace WindowsRuntimeComponent1
{
public ref class Class1 sealed
{
public:
Class1();
};
}