[MonoDevelop] CopyToOutputDirectory for external files

Sam Chuparkoff sdc at sadach.org
Thu Jan 15 00:09:49 EST 2009


The fix for Bug 459311 - Copying files to output directory in
MonoDevelop breaks copies of "linked" files or "External files" for
me.

Here is is a patch that adds a couple of new files to the unit tests
to demonstrate this problem. Prior to r123145, these checks would have
passed. Post r123145, I instead see files getting copied outside of
the output directory, like this:

bin/Release/foo/bar.txt
bin/Release/TextFile1.txt
bin/Release/ClassLibrary1.dll
bin/Release/ClassLibrary2.dll
bin/Release/ClassLibrary4.dll
bin/Release/VSLocalCopyTest.exe
bin/Release/folder/baz.txt
bin/solution-folder/app.config
bin/solution-folder/quux.txt

sdc

---
 .../MonoDevelop.Projects/LocalCopyTests.cs         |    4 ++++
 .../VSLocalCopyTest/VSLocalCopyTest.csproj         |    8 ++++++++
 .../vs-local-copy/solution-folder/app.config       |    3 +++
 .../vs-local-copy/solution-folder/quux.txt         |    1 +
 4 files changed, 16 insertions(+), 0 deletions(-)
 create mode 100644 main/tests/test-projects/vs-local-copy/solution-folder/app.config
 create mode 100644 main/tests/test-projects/vs-local-copy/solution-folder/quux.txt

diff --git a/main/tests/UnitTests/MonoDevelop.Projects/LocalCopyTests.cs b/main/tests/UnitTests/MonoDevelop.Projects/LocalCopyTests.cs
index a29a196..4497abb 100644
--- a/main/tests/UnitTests/MonoDevelop.Projects/LocalCopyTests.cs
+++ b/main/tests/UnitTests/MonoDevelop.Projects/LocalCopyTests.cs
@@ -63,6 +63,8 @@ namespace MonoDevelop.Projects
 				"TextFile1.txt",
 				"folder/baz.txt",
 				"foo/bar.txt",
+				"quux.txt",
+				"VSLocalCopyTest.exe.config",
 			});
 			
 			//FIXME: all of these should have mdb files in release mode.
@@ -75,6 +77,8 @@ namespace MonoDevelop.Projects
 				"TextFile1.txt",
 				"folder/baz.txt",
 				"foo/bar.txt",
+				"quux.txt",
+				"VSLocalCopyTest.exe.config",
 			});
 			
 			AssertOutputFiles (sol, "ClassLibrary1", "Debug", new string[] {
diff --git a/main/tests/test-projects/vs-local-copy/VSLocalCopyTest/VSLocalCopyTest.csproj b/main/tests/test-projects/vs-local-copy/VSLocalCopyTest/VSLocalCopyTest.csproj
index aae3c01..1a06466 100755
--- a/main/tests/test-projects/vs-local-copy/VSLocalCopyTest/VSLocalCopyTest.csproj
+++ b/main/tests/test-projects/vs-local-copy/VSLocalCopyTest/VSLocalCopyTest.csproj
@@ -49,6 +49,14 @@
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>
   </ItemGroup>
+  <ItemGroup>
+    <None Include="..\solution-folder\app.config">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <Content Include="..\solution-folder\quux.txt">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Content>
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.
diff --git a/main/tests/test-projects/vs-local-copy/solution-folder/app.config b/main/tests/test-projects/vs-local-copy/solution-folder/app.config
new file mode 100644
index 0000000..8675ceb
--- /dev/null
+++ b/main/tests/test-projects/vs-local-copy/solution-folder/app.config
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+</configuration>
\ No newline at end of file
diff --git a/main/tests/test-projects/vs-local-copy/solution-folder/quux.txt b/main/tests/test-projects/vs-local-copy/solution-folder/quux.txt
new file mode 100644
index 0000000..1bc3822
--- /dev/null
+++ b/main/tests/test-projects/vs-local-copy/solution-folder/quux.txt
@@ -0,0 +1 @@
+This is quux.txt
-- 
1.6.1



More information about the Monodevelop-list mailing list