diff --git a/makefiles/Makefile.cpp.mk b/makefiles/Makefile.cpp.mk
index 3b6feeb646..e329135b23 100755
--- a/makefiles/Makefile.cpp.mk
+++ b/makefiles/Makefile.cpp.mk
@@ -364,10 +364,12 @@ test_cc_linear_solver_samples: \
.PHONY: test_cc_constraint_solver_samples # Build and Run all C++ CP Samples (located in ortools/constraint_solver/samples)
test_cc_constraint_solver_samples: \
- rcc_simple_ls_program \
- rcc_rabbits_and_pheasants_cp \
rcc_minimal_jobshop_cp \
- rcc_nurses_cp
+ rcc_nurses_cp \
+ rcc_rabbits_and_pheasants_cp \
+ rcc_simple_ls_program \
+ rcc_tsp \
+ rcc_vrp
.PHONY: test_cc_sat_samples # Build and Run all C++ Sat Samples (located in ortools/sat/samples)
test_cc_sat_samples: \
@@ -391,8 +393,8 @@ test_cc_sat_samples: \
.PHONY: check_cc_pimpl
check_cc_pimpl: \
test_cc_algorithms_samples \
- test_cc_graph_samples \
test_cc_constraint_solver_samples \
+ test_cc_graph_samples \
test_cc_linear_solver_samples \
test_cc_sat_samples \
\
@@ -400,8 +402,6 @@ check_cc_pimpl: \
rcc_stigler_diet \
rcc_constraint_programming_cp \
rcc_integer_programming \
- rcc_tsp \
- rcc_vrp \
rcc_knapsack \
rcc_max_flow \
rcc_min_cost_flow ;
diff --git a/makefiles/Makefile.dotnet.mk b/makefiles/Makefile.dotnet.mk
index 71a6cdda9d..e6d529fa4c 100644
--- a/makefiles/Makefile.dotnet.mk
+++ b/makefiles/Makefile.dotnet.mk
@@ -482,6 +482,13 @@ rdotnet_%.cs: \
"$(DOTNET_BIN)" build ortools$Salgorithms$Ssamples$S$*.csproj
"$(DOTNET_BIN)" run --no-build --project ortools$Salgorithms$Ssamples$S$*.csproj -- $(ARGS)
+rdotnet_%.cs: \
+ ortools/constraint_solver/samples/%.cs \
+ ortools/constraint_solver/samples/%.csproj \
+ $(DOTNET_ORTOOLS_NUPKG) FORCE
+ "$(DOTNET_BIN)" build ortools$Sconstraint_solver$Ssamples$S$*.csproj
+ "$(DOTNET_BIN)" run --no-build --project ortools$Sconstraint_solver$Ssamples$S$*.csproj -- $(ARGS)
+
rdotnet_%.cs: \
ortools/graph/samples/%.cs \
ortools/graph/samples/%.csproj \
@@ -506,6 +513,11 @@ rdotnet_%.cs: \
.PHONY: test_dotnet_algorithms_samples # Build and Run all .Net LP Samples (located in ortools/algorithms/samples)
test_dotnet_algorithms_samples: ;
+.PHONY: test_dotnet_constraint_solver_samples # Build and Run all .Net CP Samples (located in ortools/constraint_solver/samples)
+test_dotnet_constraint_solver_samples:
+ $(MAKE) run SOURCE=ortools/constraint_solver/samples/Tsp.cs
+ $(MAKE) run SOURCE=ortools/constraint_solver/samples/Vrp.cs
+
.PHONY: test_dotnet_graph_samples # Build and Run all .Net LP Samples (located in ortools/graph/samples)
test_dotnet_graph_samples: ;
$(MAKE) run SOURCE=ortools/graph/samples/SimpleMaxFlowProgram.cs
@@ -538,6 +550,7 @@ test_dotnet_sat_samples:
.PHONY: check_dotnet_pimpl
check_dotnet_pimpl: \
test_dotnet_algorithms_samples \
+ test_dotnet_constraint_solver_samples \
test_dotnet_graph_samples \
test_dotnet_linear_solver_samples \
test_dotnet_sat_samples \
@@ -571,8 +584,6 @@ test_dotnet_examples_csharp: \
rdotnet_csls_api.cs \
rdotnet_csrabbitspheasants.cs \
rdotnet_cstsp.cs \
- rdotnet_tsp.cs \
- rdotnet_vrp.cs \
\
rdotnet_3_jugs_regular.cs \
rdotnet_a_puzzle.cs \
diff --git a/makefiles/Makefile.java.mk b/makefiles/Makefile.java.mk
index 04332d4c10..c6425237a2 100755
--- a/makefiles/Makefile.java.mk
+++ b/makefiles/Makefile.java.mk
@@ -331,6 +331,13 @@ $(CLASS_DIR)/%: $(SRC_DIR)/ortools/algorithms/samples/%.java $(JAVA_OR_TOOLS_LIB
-cp $(LIB_DIR)$Scom.google.ortools.jar$(CPSEP)$(LIB_DIR)$Sprotobuf.jar \
ortools$Salgorithms$Ssamples$S$*.java
+$(CLASS_DIR)/%: $(SRC_DIR)/ortools/constraint_solver/samples/%.java $(JAVA_OR_TOOLS_LIBS) | $(CLASS_DIR)
+ -$(DELREC) $(CLASS_DIR)$S$*
+ -$(MKDIR_P) $(CLASS_DIR)$S$*
+ "$(JAVAC_BIN)" -d $(CLASS_DIR)$S$* \
+ -cp $(LIB_DIR)$Scom.google.ortools.jar$(CPSEP)$(LIB_DIR)$Sprotobuf.jar \
+ ortools$Sconstraint_solver$Ssamples$S$*.java
+
$(CLASS_DIR)/%: $(SRC_DIR)/ortools/graph/samples/%.java $(JAVA_OR_TOOLS_LIBS) | $(CLASS_DIR)
-$(DELREC) $(CLASS_DIR)$S$*
-$(MKDIR_P) $(CLASS_DIR)$S$*
@@ -364,6 +371,11 @@ rjava_%: $(LIB_DIR)/%$J FORCE
.PHONY: test_java_algorithms_samples # Build and Run all Java Algorithms Samples (located in ortools/algorithms/samples)
test_java_algorithms_samples: \
+.PHONY: test_java_constraint_solver_samples # Build and Run all Java CP Samples (located in ortools/constraint_solver/samples)
+test_java_constraint_solver_samples: \
+ rjava_Tsp \
+ rjava_Vrp \
+
.PHONY: test_java_graph_samples # Build and Run all Java Graph Samples (located in ortools/graph/samples)
test_java_graph_samples: \
@@ -395,14 +407,13 @@ test_java_sat_samples: \
.PHONY: check_java_pimpl
check_java_pimpl: \
test_java_algorithms_samples \
+ test_java_constraint_solver_samples \
test_java_graph_samples \
test_java_linear_solver_samples \
test_java_sat_samples \
\
rjava_LinearProgramming \
rjava_IntegerProgramming \
- rjava_Tsp \
- rjava_Vrp \
rjava_Knapsack
.PHONY: test_java_tests # Build and Run all Java Tests (located in examples/tests)
diff --git a/examples/dotnet/tsp.cs b/ortools/constraint_solver/samples/Tsp.cs
similarity index 100%
rename from examples/dotnet/tsp.cs
rename to ortools/constraint_solver/samples/Tsp.cs
diff --git a/examples/dotnet/tsp.csproj b/ortools/constraint_solver/samples/Tsp.csproj
similarity index 79%
rename from examples/dotnet/tsp.csproj
rename to ortools/constraint_solver/samples/Tsp.csproj
index 9560c07d58..e8c4ced7b5 100644
--- a/examples/dotnet/tsp.csproj
+++ b/ortools/constraint_solver/samples/Tsp.csproj
@@ -4,7 +4,7 @@
7.2
netcoreapp2.1
false
- ../../packages;$(RestoreSources);https://api.nuget.org/v3/index.json
+ ../../../packages;$(RestoreSources);https://api.nuget.org/v3/index.json
@@ -14,7 +14,7 @@
-
+
diff --git a/examples/java/Tsp.java b/ortools/constraint_solver/samples/Tsp.java
similarity index 100%
rename from examples/java/Tsp.java
rename to ortools/constraint_solver/samples/Tsp.java
diff --git a/examples/dotnet/vrp.cs b/ortools/constraint_solver/samples/Vrp.cs
similarity index 100%
rename from examples/dotnet/vrp.cs
rename to ortools/constraint_solver/samples/Vrp.cs
diff --git a/examples/dotnet/vrp.csproj b/ortools/constraint_solver/samples/Vrp.csproj
similarity index 79%
rename from examples/dotnet/vrp.csproj
rename to ortools/constraint_solver/samples/Vrp.csproj
index 3b26ff5cb9..fb99f95278 100644
--- a/examples/dotnet/vrp.csproj
+++ b/ortools/constraint_solver/samples/Vrp.csproj
@@ -4,7 +4,7 @@
7.2
netcoreapp2.1
false
- ../../packages;$(RestoreSources);https://api.nuget.org/v3/index.json
+ ../../../packages;$(RestoreSources);https://api.nuget.org/v3/index.json
@@ -14,7 +14,7 @@
-
+
diff --git a/examples/java/Vrp.java b/ortools/constraint_solver/samples/Vrp.java
similarity index 100%
rename from examples/java/Vrp.java
rename to ortools/constraint_solver/samples/Vrp.java
diff --git a/examples/cpp/tsp.cc b/ortools/constraint_solver/samples/tsp.cc
similarity index 100%
rename from examples/cpp/tsp.cc
rename to ortools/constraint_solver/samples/tsp.cc
diff --git a/examples/cpp/vrp.cc b/ortools/constraint_solver/samples/vrp.cc
similarity index 100%
rename from examples/cpp/vrp.cc
rename to ortools/constraint_solver/samples/vrp.cc
diff --git a/tools/Makefile.cc.java.dotnet b/tools/Makefile.cc.java.dotnet
index b221c57d72..359abc5ea7 100644
--- a/tools/Makefile.cc.java.dotnet
+++ b/tools/Makefile.cc.java.dotnet
@@ -493,6 +493,9 @@ dotnet:
# Linear Solver
$(MAKE) run SOURCE=examples/dotnet/SimpleLpProgram.cs
$(MAKE) run SOURCE=examples/dotnet/SimpleMipProgram.cs
+# Constraint Solver
+ $(MAKE) run SOURCE=examples/dotnet/Tsp.cs
+ $(MAKE) run SOURCE=examples/dotnet/Vrp.cs
# Sat
$(MAKE) run SOURCE=examples/dotnet/NursesSat.cs
$(MAKE) run SOURCE=examples/dotnet/JobshopSat.cs
@@ -502,8 +505,6 @@ dotnet:
# Misc
$(MAKE) run SOURCE=examples/dotnet/cslinearprogramming.cs
$(MAKE) run SOURCE=examples/dotnet/csintegerprogramming.cs
- $(MAKE) run SOURCE=examples/dotnet/tsp.cs
- $(MAKE) run SOURCE=examples/dotnet/vrp.cs
$(MAKE) run SOURCE=examples/dotnet/assignment.cs
$(MAKE) run SOURCE=examples/dotnet/alldifferent_except_0.cs
$(MAKE) run SOURCE=examples/dotnet/all_interval.cs
@@ -632,8 +633,8 @@ dotnet:
test_dotnet: detect_dotnet
$(MAKE) run SOURCE=examples/dotnet/SimpleLpProgram.cs
$(MAKE) run SOURCE=examples/dotnet/SimpleMipProgram.cs
- $(MAKE) run SOURCE=examples/dotnet/tsp.cs
- $(MAKE) run SOURCE=examples/dotnet/vrp.cs
+ $(MAKE) run SOURCE=examples/dotnet/Tsp.cs
+ $(MAKE) run SOURCE=examples/dotnet/Vrp.cs
$(MAKE) run SOURCE=examples/dotnet/JobshopSat.cs
$(MAKE) run SOURCE=examples/dotnet/NursesSat.cs