Reputation: 11732
I have a solution including a C# and a C++ project. The C# depends on the C++ one, which is a library. When I make changes to the C# project and run the app, it's built automatically. But when I make changes to the C++ one and run, it's not built - I have to manually tell it to build first.
Can I make that automatic?
Upvotes: 3
Views: 1353
Reputation: 1
You could try to add a command to build the C++ project in the CustomBuildStep property in the C# project properties. Confused? OK Select your project on the Solution Explorer, right click it and choose "Project Properties..." Go to the Custom Build Step category and select Command Line In this property type:
make <yourprojectname
Hope this works!
Upvotes: 0
Reputation: 37174
Right-click your C# project in VS. Click "Project Dependencies". This opens a dialog that lets you mark other projects that the target project depends on. VS will automatically set the proper build order for when you build the whole solution.
Make sure your C++ project is set to build with the solution by right-clicking the Solution->Properties->Configuration Properties and making sure all of the projects are marked for build.
Upvotes: 2