diff options
author | Lluis Sanchez <lluis@xamarin.com> | 2014-03-13 20:37:55 +0400 |
---|---|---|
committer | Lluis Sanchez <lluis@xamarin.com> | 2014-03-13 20:37:55 +0400 |
commit | fef4f9ec3a21947f6cd1aae7b3b6979491a58f59 (patch) | |
tree | 65c490389fa195a267ffe5e2e9f6182cbccc963e /main/tests | |
parent | e8898799f6d4a4fb6b868b2659e29d7c0b02ad69 (diff) |
Add unit tests
Added unit tests for the Project.RefreshReferenceStatus method.
Added unit tests for support for loading unsupported projects.
Diffstat (limited to 'main/tests')
19 files changed, 797 insertions, 0 deletions
diff --git a/main/tests/UnitTests/MonoDevelop.Projects/ProjectTests.cs b/main/tests/UnitTests/MonoDevelop.Projects/ProjectTests.cs index f8a7b550b2..da52d8e085 100644 --- a/main/tests/UnitTests/MonoDevelop.Projects/ProjectTests.cs +++ b/main/tests/UnitTests/MonoDevelop.Projects/ProjectTests.cs @@ -30,6 +30,7 @@ using System.IO; using NUnit.Framework; using UnitTests; using MonoDevelop.Core; +using System.Linq; namespace MonoDevelop.Projects { @@ -281,5 +282,154 @@ namespace MonoDevelop.Projects { return path.Replace ('/', Path.DirectorySeparatorChar); } + + [Test] + public void RefreshReferences () + { + string solFile = Util.GetSampleProject ("reference-refresh", "ConsoleProject.sln"); + + Solution sol = (Solution) Services.ProjectService.ReadWorkspaceItem (Util.GetMonitor (), solFile); + DotNetProject project = sol.GetAllSolutionItems<DotNetProject> ().FirstOrDefault (); + + Assert.AreEqual (4, project.References.Count); + + ProjectReference r; + + r = project.References.FirstOrDefault (re => re.Reference.StartsWith ("System,")); + Assert.IsNotNull (r); + Assert.AreEqual (r.ReferenceType, ReferenceType.Package); + Assert.IsTrue (r.IsValid); + + r = project.References.FirstOrDefault (re => re.Reference.StartsWith ("System.Xml,")); + Assert.IsNotNull (r); + Assert.AreEqual (r.ReferenceType, ReferenceType.Package); + Assert.IsTrue (r.IsValid); + + r = project.References.FirstOrDefault (re => re.Reference == "test"); + Assert.IsNotNull (r); + Assert.AreEqual (r.ReferenceType, ReferenceType.Assembly); + Assert.AreEqual (r.GetReferencedFileNames(project.DefaultConfiguration.Selector).Single (), project.BaseDirectory.Combine ("test.dll").FullPath.ToString ()); + Assert.IsTrue (r.IsValid); + + r = project.References.FirstOrDefault (re => re.Reference == "gtk-sharp"); + Assert.IsNotNull (r); + Assert.AreEqual (r.ReferenceType, ReferenceType.Assembly); + Assert.AreEqual (r.GetReferencedFileNames(project.DefaultConfiguration.Selector).Single (), project.BaseDirectory.Combine ("gtk-sharp.dll").FullPath.ToString ()); + Assert.IsTrue (r.IsValid); + + // Refresh without any change + + project.RefreshReferenceStatus (); + + Assert.AreEqual (4, project.References.Count); + + r = project.References.FirstOrDefault (re => re.Reference.StartsWith ("System,")); + Assert.IsNotNull (r); + Assert.AreEqual (r.ReferenceType, ReferenceType.Package); + Assert.IsTrue (r.IsValid); + + r = project.References.FirstOrDefault (re => re.Reference.StartsWith ("System.Xml,")); + Assert.IsNotNull (r); + Assert.AreEqual (r.ReferenceType, ReferenceType.Package); + Assert.IsTrue (r.IsValid); + + r = project.References.FirstOrDefault (re => re.Reference == "test"); + Assert.IsNotNull (r); + Assert.AreEqual (r.ReferenceType, ReferenceType.Assembly); + Assert.AreEqual (r.GetReferencedFileNames(project.DefaultConfiguration.Selector).Single (), project.BaseDirectory.Combine ("test.dll").FullPath.ToString ()); + Assert.IsTrue (r.IsValid); + + r = project.References.FirstOrDefault (re => re.Reference == "gtk-sharp"); + Assert.IsNotNull (r); + Assert.AreEqual (r.ReferenceType, ReferenceType.Assembly); + Assert.AreEqual (r.GetReferencedFileNames(project.DefaultConfiguration.Selector).Single (), project.BaseDirectory.Combine ("gtk-sharp.dll").FullPath.ToString ()); + Assert.IsTrue (r.IsValid); + + // Refresh after deleting test.dll + + File.Move (project.BaseDirectory.Combine ("test.dll"), project.BaseDirectory.Combine ("test.dll.tmp")); + project.RefreshReferenceStatus (); + + Assert.AreEqual (4, project.References.Count); + + r = project.References.FirstOrDefault (re => re.Reference.StartsWith ("System,")); + Assert.IsNotNull (r); + Assert.AreEqual (r.ReferenceType, ReferenceType.Package); + Assert.IsTrue (r.IsValid); + + r = project.References.FirstOrDefault (re => re.Reference.StartsWith ("System.Xml,")); + Assert.IsNotNull (r); + Assert.AreEqual (r.ReferenceType, ReferenceType.Package); + Assert.IsTrue (r.IsValid); + + r = project.References.FirstOrDefault (re => re.Reference == "test"); + Assert.IsNotNull (r); + Assert.AreEqual (r.ReferenceType, ReferenceType.Package); + Assert.IsFalse (r.IsValid); + + r = project.References.FirstOrDefault (re => re.Reference == "gtk-sharp"); + Assert.IsNotNull (r); + Assert.AreEqual (r.ReferenceType, ReferenceType.Assembly); + Assert.AreEqual (r.GetReferencedFileNames(project.DefaultConfiguration.Selector).Single (), project.BaseDirectory.Combine ("gtk-sharp.dll").FullPath.ToString ()); + Assert.IsTrue (r.IsValid); + + // Refresh after deleting gtk-sharp.dll + + File.Move (project.BaseDirectory.Combine ("gtk-sharp.dll"), project.BaseDirectory.Combine ("gtk-sharp.dll.tmp")); + project.RefreshReferenceStatus (); + + Assert.AreEqual (4, project.References.Count); + + r = project.References.FirstOrDefault (re => re.Reference.StartsWith ("System,")); + Assert.IsNotNull (r); + Assert.AreEqual (r.ReferenceType, ReferenceType.Package); + Assert.IsTrue (r.IsValid); + + r = project.References.FirstOrDefault (re => re.Reference.StartsWith ("System.Xml,")); + Assert.IsNotNull (r); + Assert.AreEqual (r.ReferenceType, ReferenceType.Package); + Assert.IsTrue (r.IsValid); + + r = project.References.FirstOrDefault (re => re.Reference == "test"); + Assert.IsNotNull (r); + Assert.AreEqual (r.ReferenceType, ReferenceType.Package); + Assert.IsFalse (r.IsValid); + + r = project.References.FirstOrDefault (re => re.Reference.StartsWith ("gtk-sharp,")); + Assert.IsNotNull (r); + Assert.AreEqual (r.ReferenceType, ReferenceType.Package); + Assert.AreEqual ("gtk-sharp.dll", Path.GetFileName (r.GetReferencedFileNames(project.DefaultConfiguration.Selector).Single ())); + Assert.IsTrue (r.IsValid); + + // Refresh after restoring gtk-sharp.dll and test.dll + + File.Move (project.BaseDirectory.Combine ("test.dll.tmp"), project.BaseDirectory.Combine ("test.dll")); + File.Move (project.BaseDirectory.Combine ("gtk-sharp.dll.tmp"), project.BaseDirectory.Combine ("gtk-sharp.dll")); + project.RefreshReferenceStatus (); + + Assert.AreEqual (4, project.References.Count); + + r = project.References.FirstOrDefault (re => re.Reference.StartsWith ("System,")); + Assert.IsNotNull (r); + Assert.AreEqual (r.ReferenceType, ReferenceType.Package); + Assert.IsTrue (r.IsValid); + + r = project.References.FirstOrDefault (re => re.Reference.StartsWith ("System.Xml,")); + Assert.IsNotNull (r); + Assert.AreEqual (r.ReferenceType, ReferenceType.Package); + Assert.IsTrue (r.IsValid); + + r = project.References.FirstOrDefault (re => re.Reference == "test"); + Assert.IsNotNull (r); + Assert.AreEqual (r.ReferenceType, ReferenceType.Assembly); + Assert.AreEqual (r.GetReferencedFileNames(project.DefaultConfiguration.Selector).Single (), project.BaseDirectory.Combine ("test.dll").FullPath.ToString ()); + Assert.IsTrue (r.IsValid); + + r = project.References.FirstOrDefault (re => re.Reference.StartsWith ("gtk-sharp,")); + Assert.IsNotNull (r); + Assert.AreEqual (r.ReferenceType, ReferenceType.Assembly); + Assert.AreEqual (r.GetReferencedFileNames(project.DefaultConfiguration.Selector).Single (), project.BaseDirectory.Combine ("gtk-sharp.dll").FullPath.ToString ()); + Assert.IsTrue (r.IsValid); + } } } diff --git a/main/tests/UnitTests/MonoDevelop.Projects/SolutionTests.cs b/main/tests/UnitTests/MonoDevelop.Projects/SolutionTests.cs index c4b500af74..e2f10a4d1f 100644 --- a/main/tests/UnitTests/MonoDevelop.Projects/SolutionTests.cs +++ b/main/tests/UnitTests/MonoDevelop.Projects/SolutionTests.cs @@ -27,11 +27,13 @@ using System; using System.IO; +using System.Linq; using System.Collections.Generic; using NUnit.Framework; using UnitTests; using MonoDevelop.Core; using MonoDevelop.Projects.Formats.MSBuild; +using MonoDevelop.Core.ProgressMonitoring; namespace MonoDevelop.Projects { @@ -678,5 +680,29 @@ namespace MonoDevelop.Projects { return Path.GetFileName (Path.GetDirectoryName (lib.GetOutputFileName ((SolutionConfigurationSelector)conf))); } + + [Test] + public void LoadKnownUnsupportedProjects () + { + string solFile = Util.GetSampleProject ("unsupported-project", "console-with-libs.sln"); + + Solution sol = (Solution) Services.ProjectService.ReadWorkspaceItem (Util.GetMonitor (), solFile); + var app = sol.GetAllSolutionItems<SolutionEntityItem> ().FirstOrDefault (it => it.FileName.FileName == "console-with-libs.csproj"); + var lib1 = sol.GetAllSolutionItems<SolutionEntityItem> ().FirstOrDefault (it => it.FileName.FileName == "library1.csproj"); + var lib2 = sol.GetAllSolutionItems<SolutionEntityItem> ().FirstOrDefault (it => it.FileName.FileName == "library2.csproj"); + + Assert.IsInstanceOf<DotNetAssemblyProject> (app); + Assert.IsInstanceOf<UnknownSolutionItem> (lib1); + Assert.IsInstanceOf<UnknownProject> (lib2); + + var p = (UnknownProject)lib2; + + Assert.AreEqual (2, p.Files.Count); + + p.AddFile (p.BaseDirectory.Combine ("Test.cs"), BuildAction.Compile); + sol.Save (new NullProgressMonitor ()); + + Assert.AreEqual (Util.GetXmlFileInfoset (p.FileName + ".saved"), Util.GetXmlFileInfoset (p.FileName)); + } } } diff --git a/main/tests/test-projects/reference-refresh/ConsoleProject.sln b/main/tests/test-projects/reference-refresh/ConsoleProject.sln new file mode 100755 index 0000000000..199aa24543 --- /dev/null +++ b/main/tests/test-projects/reference-refresh/ConsoleProject.sln @@ -0,0 +1,23 @@ +
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleProject", "ConsoleProject\ConsoleProject.csproj", "{4A9E3523-48F0-4BDF-A0F4-49DAD4431FAB}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {4A9E3523-48F0-4BDF-A0F4-49DAD4431FAB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4A9E3523-48F0-4BDF-A0F4-49DAD4431FAB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4A9E3523-48F0-4BDF-A0F4-49DAD4431FAB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4A9E3523-48F0-4BDF-A0F4-49DAD4431FAB}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(MonoDevelopProperties) = preSolution
+ StartupItem = ConsoleProject\ConsoleProject.csproj
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/main/tests/test-projects/reference-refresh/ConsoleProject/ConsoleProject.csproj b/main/tests/test-projects/reference-refresh/ConsoleProject/ConsoleProject.csproj new file mode 100644 index 0000000000..dc3138334e --- /dev/null +++ b/main/tests/test-projects/reference-refresh/ConsoleProject/ConsoleProject.csproj @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>8.0.50727</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{4A9E3523-48F0-4BDF-A0F4-49DAD4431FAB}</ProjectGuid> + <OutputType>Exe</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>ConsoleProject</RootNamespace> + <AssemblyName>ConsoleProject</AssemblyName> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>True</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>False</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>True</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + <Reference Include="System.Xml" /> + <Reference Include="gtk-sharp"> + <HintPath>gtk-sharp.dll</HintPath> + </Reference> + <Reference Include="test"> + <HintPath>test.dll</HintPath> + </Reference> + </ItemGroup> + <ItemGroup> + <Compile Include="Program.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\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. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> diff --git a/main/tests/test-projects/reference-refresh/ConsoleProject/Program.cs b/main/tests/test-projects/reference-refresh/ConsoleProject/Program.cs new file mode 100755 index 0000000000..cd4be63967 --- /dev/null +++ b/main/tests/test-projects/reference-refresh/ConsoleProject/Program.cs @@ -0,0 +1,14 @@ +using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace ConsoleProject
+{
+ class Program
+ {
+ static void Main (string[] args)
+ {
+ Console.WriteLine ("Hello world");
+ }
+ }
+}
diff --git a/main/tests/test-projects/reference-refresh/ConsoleProject/Properties/AssemblyInfo.cs b/main/tests/test-projects/reference-refresh/ConsoleProject/Properties/AssemblyInfo.cs new file mode 100755 index 0000000000..be1e50670d --- /dev/null +++ b/main/tests/test-projects/reference-refresh/ConsoleProject/Properties/AssemblyInfo.cs @@ -0,0 +1,33 @@ +using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle ("ConsoleProject")]
+[assembly: AssemblyDescription ("")]
+[assembly: AssemblyConfiguration ("")]
+[assembly: AssemblyCompany ("")]
+[assembly: AssemblyProduct ("ConsoleProject")]
+[assembly: AssemblyCopyright ("Copyright © 2008")]
+[assembly: AssemblyTrademark ("")]
+[assembly: AssemblyCulture ("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible (false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid ("a1b85c5f-e506-462a-911c-cbe67c035c93")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+[assembly: AssemblyVersion ("1.0.0.0")]
+[assembly: AssemblyFileVersion ("1.0.0.0")]
diff --git a/main/tests/test-projects/reference-refresh/ConsoleProject/gtk-sharp.dll b/main/tests/test-projects/reference-refresh/ConsoleProject/gtk-sharp.dll Binary files differnew file mode 100755 index 0000000000..641fe42822 --- /dev/null +++ b/main/tests/test-projects/reference-refresh/ConsoleProject/gtk-sharp.dll diff --git a/main/tests/test-projects/reference-refresh/ConsoleProject/test.dll b/main/tests/test-projects/reference-refresh/ConsoleProject/test.dll Binary files differnew file mode 100755 index 0000000000..02664f9cf6 --- /dev/null +++ b/main/tests/test-projects/reference-refresh/ConsoleProject/test.dll diff --git a/main/tests/test-projects/unsupported-project/console-with-libs.sln b/main/tests/test-projects/unsupported-project/console-with-libs.sln new file mode 100644 index 0000000000..3a1c54554b --- /dev/null +++ b/main/tests/test-projects/unsupported-project/console-with-libs.sln @@ -0,0 +1,33 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "console-with-libs", "console-with-libs\console-with-libs.csproj", "{EAB80A13-FC3E-4E53-8950-E6B9F19E4C90}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "library1", "library1\library1.csproj", "{7F63CBE6-2FE7-47A7-8930-EA078DA05062}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "library2", "library2\library2.csproj", "{42A9AAF1-DCB8-4F3F-9B20-5F17D4EAAD20}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {42A9AAF1-DCB8-4F3F-9B20-5F17D4EAAD20}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {42A9AAF1-DCB8-4F3F-9B20-5F17D4EAAD20}.Debug|Any CPU.Build.0 = Debug|Any CPU + {42A9AAF1-DCB8-4F3F-9B20-5F17D4EAAD20}.Release|Any CPU.ActiveCfg = Release|Any CPU + {42A9AAF1-DCB8-4F3F-9B20-5F17D4EAAD20}.Release|Any CPU.Build.0 = Release|Any CPU + {7F63CBE6-2FE7-47A7-8930-EA078DA05062}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7F63CBE6-2FE7-47A7-8930-EA078DA05062}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7F63CBE6-2FE7-47A7-8930-EA078DA05062}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7F63CBE6-2FE7-47A7-8930-EA078DA05062}.Release|Any CPU.Build.0 = Release|Any CPU + {EAB80A13-FC3E-4E53-8950-E6B9F19E4C90}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EAB80A13-FC3E-4E53-8950-E6B9F19E4C90}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EAB80A13-FC3E-4E53-8950-E6B9F19E4C90}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EAB80A13-FC3E-4E53-8950-E6B9F19E4C90}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(MonoDevelopProperties) = preSolution + StartupItem = console-with-libs\console-with-libs.csproj + name = console-with-libs + EndGlobalSection +EndGlobal diff --git a/main/tests/test-projects/unsupported-project/console-with-libs/Program.cs b/main/tests/test-projects/unsupported-project/console-with-libs/Program.cs new file mode 100644 index 0000000000..e6ef050783 --- /dev/null +++ b/main/tests/test-projects/unsupported-project/console-with-libs/Program.cs @@ -0,0 +1,38 @@ +// Main.cs +// +// Author: +// Lluis Sanchez Gual <lluis@novell.com> +// +// Copyright (c) 2008 Novell, Inc (http://www.novell.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// +// +using System; + +namespace consolewithlib +{ + class MainClass + { + public static void Main(string[] args) + { + Console.WriteLine("Hello World!"); + } + } +} diff --git a/main/tests/test-projects/unsupported-project/console-with-libs/Properties/AssemblyInfo.cs b/main/tests/test-projects/unsupported-project/console-with-libs/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..b0f5040c6e --- /dev/null +++ b/main/tests/test-projects/unsupported-project/console-with-libs/Properties/AssemblyInfo.cs @@ -0,0 +1,51 @@ +// AssemblyInfo.cs +// +// Author: +// Lluis Sanchez Gual <lluis@novell.com> +// +// Copyright (c) 2008 Novell, Inc (http://www.novell.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// +// +using System.Reflection; +using System.Runtime.CompilerServices; + +// Information about this assembly is defined by the following attributes. +// Change them to the values specific to your project. + +[assembly: AssemblyTitle("console-with-libs")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". +// If the build and revision are set to '*' they will be updated automatically. + +[assembly: AssemblyVersion("1.0.*")] + +// The following attributes are used to specify the signing key for the assembly, +// if desired. See the Mono documentation for more information about signing. + +[assembly: AssemblyDelaySign(false)] +[assembly: AssemblyKeyFile("")] diff --git a/main/tests/test-projects/unsupported-project/console-with-libs/console-with-libs.csproj b/main/tests/test-projects/unsupported-project/console-with-libs/console-with-libs.csproj new file mode 100644 index 0000000000..dacd4caf48 --- /dev/null +++ b/main/tests/test-projects/unsupported-project/console-with-libs/console-with-libs.csproj @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>10.0.0</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{EAB80A13-FC3E-4E53-8950-E6B9F19E4C90}</ProjectGuid> + <OutputType>Exe</OutputType> + <AssemblyName>console-with-libs</AssemblyName> + <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <Optimize>true</Optimize> + <OutputPath>bin\Debug</OutputPath> + <DefineConstants>DEBUG</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow> + <Execution> + <Execution clr-version="Net_2_0" xmlns="" /> + </Execution> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <Optimize>true</Optimize> + <OutputPath>bin\Release</OutputPath> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <Execution> + <Execution clr-version="Net_2_0" xmlns="" /> + </Execution> + <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow> + </PropertyGroup> + <ItemGroup> + <Compile Include="Program.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + </ItemGroup> + <ItemGroup> + <Reference Include="System" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\library1\library1.csproj"> + <Project>{7F63CBE6-2FE7-47A7-8930-EA078DA05062}</Project> + <Name>library1</Name> + </ProjectReference> + <ProjectReference Include="..\library2\library2.csproj"> + <Project>{42A9AAF1-DCB8-4F3F-9B20-5F17D4EAAD20}</Project> + <Name>library2</Name> + </ProjectReference> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> +</Project> diff --git a/main/tests/test-projects/unsupported-project/library1/MyClass.cs b/main/tests/test-projects/unsupported-project/library1/MyClass.cs new file mode 100644 index 0000000000..789d1b07ae --- /dev/null +++ b/main/tests/test-projects/unsupported-project/library1/MyClass.cs @@ -0,0 +1,41 @@ +// MyClass.cs +// +// Author: +// Lluis Sanchez Gual <lluis@novell.com> +// +// Copyright (c) 2008 Novell, Inc (http://www.novell.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// +// + +using System; + +namespace library1 +{ + + + public class MyClass + { + + public MyClass() + { + } + } +} diff --git a/main/tests/test-projects/unsupported-project/library1/Properties/AssemblyInfo.cs b/main/tests/test-projects/unsupported-project/library1/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..dbc7743054 --- /dev/null +++ b/main/tests/test-projects/unsupported-project/library1/Properties/AssemblyInfo.cs @@ -0,0 +1,51 @@ +// AssemblyInfo.cs +// +// Author: +// Lluis Sanchez Gual <lluis@novell.com> +// +// Copyright (c) 2008 Novell, Inc (http://www.novell.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// +// +using System.Reflection; +using System.Runtime.CompilerServices; + +// Information about this assembly is defined by the following attributes. +// Change them to the values specific to your project. + +[assembly: AssemblyTitle("library1")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". +// If the build and revision are set to '*' they will be updated automatically. + +[assembly: AssemblyVersion("1.0.*")] + +// The following attributes are used to specify the signing key for the assembly, +// if desired. See the Mono documentation for more information about signing. + +[assembly: AssemblyDelaySign(false)] +[assembly: AssemblyKeyFile("")] diff --git a/main/tests/test-projects/unsupported-project/library1/library1.csproj b/main/tests/test-projects/unsupported-project/library1/library1.csproj new file mode 100644 index 0000000000..895f76f480 --- /dev/null +++ b/main/tests/test-projects/unsupported-project/library1/library1.csproj @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>10.0.0</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{7F63CBE6-2FE7-47A7-8930-EA078DA05062}</ProjectGuid> + <ProjectTypeGuids>{32F31D43-81CC-4C15-9DE6-3FC5453562B6};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> + <OutputType>Library</OutputType> + <AssemblyName>library1</AssemblyName> + <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <Optimize>true</Optimize> + <OutputPath>bin\Debug</OutputPath> + <DefineConstants>DEBUG</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <Execution> + <Execution clr-version="Net_2_0" xmlns="" /> + </Execution> + <ConsolePause>false</ConsolePause> + <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <Optimize>true</Optimize> + <OutputPath>bin\Release</OutputPath> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <Execution> + <Execution clr-version="Net_2_0" xmlns="" /> + </Execution> + <ConsolePause>false</ConsolePause> + <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow> + </PropertyGroup> + <ItemGroup> + <Compile Include="MyClass.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + </ItemGroup> + <ItemGroup> + <Reference Include="System" /> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> +</Project>
\ No newline at end of file diff --git a/main/tests/test-projects/unsupported-project/library2/MyClass.cs b/main/tests/test-projects/unsupported-project/library2/MyClass.cs new file mode 100644 index 0000000000..47ce7c5a20 --- /dev/null +++ b/main/tests/test-projects/unsupported-project/library2/MyClass.cs @@ -0,0 +1,41 @@ +// MyClass.cs +// +// Author: +// Lluis Sanchez Gual <lluis@novell.com> +// +// Copyright (c) 2008 Novell, Inc (http://www.novell.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// +// + +using System; + +namespace library2 +{ + + + public class MyClass + { + + public MyClass() + { + } + } +} diff --git a/main/tests/test-projects/unsupported-project/library2/Properties/AssemblyInfo.cs b/main/tests/test-projects/unsupported-project/library2/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..6eb8385596 --- /dev/null +++ b/main/tests/test-projects/unsupported-project/library2/Properties/AssemblyInfo.cs @@ -0,0 +1,51 @@ +// AssemblyInfo.cs +// +// Author: +// Lluis Sanchez Gual <lluis@novell.com> +// +// Copyright (c) 2008 Novell, Inc (http://www.novell.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// +// +using System.Reflection; +using System.Runtime.CompilerServices; + +// Information about this assembly is defined by the following attributes. +// Change them to the values specific to your project. + +[assembly: AssemblyTitle("library2")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". +// If the build and revision are set to '*' they will be updated automatically. + +[assembly: AssemblyVersion("1.0.*")] + +// The following attributes are used to specify the signing key for the assembly, +// if desired. See the Mono documentation for more information about signing. + +[assembly: AssemblyDelaySign(false)] +[assembly: AssemblyKeyFile("")] diff --git a/main/tests/test-projects/unsupported-project/library2/library2.csproj b/main/tests/test-projects/unsupported-project/library2/library2.csproj new file mode 100644 index 0000000000..0fe53cf5a3 --- /dev/null +++ b/main/tests/test-projects/unsupported-project/library2/library2.csproj @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>10.0.0</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{42A9AAF1-DCB8-4F3F-9B20-5F17D4EAAD20}</ProjectGuid> + <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> + <OutputType>Library</OutputType> + <AssemblyName>library2</AssemblyName> + <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <Optimize>true</Optimize> + <OutputPath>bin\Debug</OutputPath> + <DefineConstants>DEBUG</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <Execution> + <Execution clr-version="Net_2_0" xmlns="" /> + </Execution> + <ConsolePause>false</ConsolePause> + <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <Optimize>true</Optimize> + <OutputPath>bin\Release</OutputPath> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <Execution> + <Execution clr-version="Net_2_0" xmlns="" /> + </Execution> + <ConsolePause>false</ConsolePause> + <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow> + </PropertyGroup> + <ItemGroup> + <Compile Include="MyClass.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + </ItemGroup> + <ItemGroup> + <Reference Include="System" /> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> +</Project>
\ No newline at end of file diff --git a/main/tests/test-projects/unsupported-project/library2/library2.csproj.saved b/main/tests/test-projects/unsupported-project/library2/library2.csproj.saved new file mode 100644 index 0000000000..6add90b4f4 --- /dev/null +++ b/main/tests/test-projects/unsupported-project/library2/library2.csproj.saved @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>8.0.30703</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{42A9AAF1-DCB8-4F3F-9B20-5F17D4EAAD20}</ProjectGuid> + <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> + <OutputType>Library</OutputType> + <AssemblyName>library2</AssemblyName> + <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <Optimize>true</Optimize> + <OutputPath>bin\Debug</OutputPath> + <DefineConstants>DEBUG</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <Execution> + <Execution clr-version="Net_2_0"/> + </Execution> + <ConsolePause>false</ConsolePause> + <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <Optimize>true</Optimize> + <OutputPath>bin\Release</OutputPath> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <Execution> + <Execution clr-version="Net_2_0" /> + </Execution> + <ConsolePause>false</ConsolePause> + <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow> + </PropertyGroup> + <ItemGroup> + <Compile Include="MyClass.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="Test.cs" /> + </ItemGroup> + <ItemGroup> + <Reference Include="System" /> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> +</Project>
\ No newline at end of file |