What's a csproj.in file? #3022
-
Forgive me if it's a dumb question, but what process do I follow/is required to be executed to turn the csproj.in files into csproj files so I can open the solution? It seems like they have variable placeholders inside but I've never looked so deeply at what a csproj is supposed to look like.. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
When using Make of CMake based build we will generate the .Net You can find them here: CMakeFor variables i.e. Lines 10 to 13 in 2cb85b4 Lines 30 to 50 in 2cb85b4 and we have a CMake function to generate it add_dotnet_example(File.cs) https://github.com/google/or-tools/blob/master/cmake/dotnet.cmake#L361-L422 configure_file(
${PROJECT_SOURCE_DIR}/ortools/dotnet/Sample.csproj.in
${DOTNET_EXAMPLE_DIR}/${EXAMPLE_NAME}.csproj
@ONLY) MakefileSame story but using or-tools/makefiles/Makefile.dotnet.mk Lines 67 to 74 in 2cb85b4 and recipe .csproj.in to .csproj or-tools/makefiles/Makefile.dotnet.mk Lines 566 to 585 in 2cb85b4 BTW you should not write a csproj.in by hand and for .csproj you can copy paste one of the example archive. |
Beta Was this translation helpful? Give feedback.
When using Make of CMake based build we will generate the .Net
Foo.csproj
project file from a template callSample.csproj.in
(note: this is a CMake convention to add .in for "template" files).You can find them here:
src: https://github.com/google/or-tools/tree/master/ortools/dotnet
CMake
For variables i.e.
@FOO@
you can take a look ator-tools/CMakeLists.txt
Lines 10 to 13 in 2cb85b4
or-tools/cmake/dotnet.cmake
Lines 30 to 50 in 2cb85b4