With both Rhino 6 & 7 plug-ins I want to add a new configuration, let’s say “Debug Bis”, like in the following pictures (right-click solution → Configuration Manager…):
Then I try to compile the new configuration and it fails:
Build started...
1>------ Build started: Project: Rhino7Sample, Configuration: Debug Bis x64 ------
1>C:\Program Files\Rhino 7 SDK\PropertySheets\Rhino.Cpp.PlugIn.props(16,3): error MSB4019: The imported project "C:\Program Files\Rhino 7 SDK\PropertySheets\BuildConfigurations\Rhino.Cpp.x64.Debug Bis.PlugIn.props" was not found. Confirm that the expression in the Import declaration "C:\Program Files\Rhino 7 SDK\PropertySheets\BuildConfigurations\Rhino.Cpp.x64.Debug Bis.PlugIn.props" is correct, and that the file exists on disk.
1>Done building project "Rhino7Sample.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
File C:\Program Files\Rhino 7 SDK\PropertySheets\Rhino.Cpp.PlugIn.props
contains this:
<?xml version="1.0" encoding="utf-8"?>
<!--
*******************************************************************************
Rhino.Cpp.PlugIn.props
Copyright (C) 2014, Robert McNeel & Associates
Defines the properties for Rhino C++ plug-ins.
*******************************************************************************
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="Rhino.Common.props" />
<Import Project="$(RhinoPropertySheetDir)\BuildConfigurations\Rhino.Cpp.$(Platform).$(Configuration).PlugIn.props" />
</Project>
Hence the problem: because $(Configuration)
is Debug Bis
, compiler is looking for file Rhino.Cpp.x64.Debug Bis.PlugIn.props
which doesn’t exist: it should look for Rhino.Cpp.x64.Debug.PlugIn.props
instead.
This also happens with the latest Rhino 6 SDK. This didn’t happen some years ago, when transitioning from Rhino 5 to 6 when we made Debug v5 and Debug v6. Now we need to have Debug v6, Debug v7, Release v6, Release v7 and we encounter this issue.
How to properly fix this issue in a way that is automatic when creating new configurations?
Pablo