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/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/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/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