diff --git a/msbuild/zeroc.icebuilder.msbuild.cpp.targets b/msbuild/zeroc.icebuilder.msbuild.cpp.targets index c955bd6..9881de7 100644 --- a/msbuild/zeroc.icebuilder.msbuild.cpp.targets +++ b/msbuild/zeroc.icebuilder.msbuild.cpp.targets @@ -101,9 +101,18 @@ running the SliceCompile target so that the Visual Studio extension has a chance to add the items to the project in a persistent way. If the extension is not enabled or we are building from the command line we just add the missing items in a transient way. + + First create a property `_SliceCompileGeneratedItems` to hold the paths of all generated items, then we + create a ItemGroup to add a ClCompile item for each generated item that is not part of the project. Using an + intermediate property for the ClCompile Include avoids _SliceCompile item metadata being copied to the + generated ClCompile item. --> + + + + - diff --git a/msbuild/zeroc.icebuilder.msbuild.csharp.targets b/msbuild/zeroc.icebuilder.msbuild.csharp.targets index 8fcde6e..7f06df0 100644 --- a/msbuild/zeroc.icebuilder.msbuild.csharp.targets +++ b/msbuild/zeroc.icebuilder.msbuild.csharp.targets @@ -87,9 +87,19 @@ running the SliceCompile target so that the Visual Studio extension has a chance to add these items to the project in a persistent way. If the extension is not enabled or we are building from the command line we just add the missing items in a transient way. + + First create a property `_SliceCompileGeneratedItems` to hold the paths of all generated items, then we + create a ItemGroup to add a Compile item for each generated item that is not part of the project. Using an + intermediate property for the Compile Include avoids _SliceCompile item metadata being copied to the + generated Compile item. --> + + + + + -