When I use configure_file() to generate AssemblyInfo.cs, which I allow
to go to the CMAKE_CURRENT_BINARY_DIR, Visual Studio 2017 reports:

Warning The file
'E:\code\layout-composer-build\Properties\AssemblyInfo.cs' could not
be added to the project.  Cannot add a link to the file
E:\code\layout-composer-build\Properties\AssemblyInfo.cs. This file is
within the project directory tree.

When I define a target using C# language, it adds this for files under
the same directory as the generated CSPROJ file:

<Compile Include="E:\code\layout-composer-build\Properties\AssemblyInfo.cs">
  <Link>build\Properties\AssemblyInfo.cs</Link>
</Compile>

The CSPROJ file is located: E:\code\layout-composer-build\LayoutComposer.csproj

Is there a way to make the <Link> element not needed in this scenario?
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers

Reply via email to