C ++ project using C # assemblies: how to speed up compilation time?

I have a mixed C ++ / C # project. The original project is C ++ and expanded using C # assemblies. In the beginning, this was fine, but as part of C # grows, I am having a big problem:

The compilation time of the C ++ part becomes a problem.

Why? Simple: every time I change something in an aC # project, the C ++ compiler is not sure if this is important (which means that it cannot know if I changed part of the interface or only the internal implementation) and recompiles the whole Project C ++ .

This becomes a huge problem, since I need to use the C ++ part to test the C # part, and now I have to wait a few minutes for each small code change.

I need to find a way that I do not need to recompile the entire C ++ program, but only those parts that depend on the C # assembly or nothing if the C # assembly interface has not changed.

Is there any way to achieve this?

[Update] I am using Visual Studio 2010 Premium.

+3
source share
1 answer

You can extract interfaces from your C # classes and put these interfaces in a separate C # project. Since these interfaces will not change every time the implementation (in your original C # project) changes the projects in C ++, there is no need to rebuild.

+2
source

Source: https://habr.com/ru/post/1748538/


All Articles