Add unit test for AggregateException.GetBaseException that works on .net but is broke...
[mono.git] / mcs / tools / xbuild / xbuild / 3.5 / Microsoft.Common.targets
index fd16d14a145ef3903e2d41757730bce958e1de52..6d91c7767391a9247e248cdaf98feed82b266b05 100644 (file)
@@ -1,6 +1,9 @@
 <Project DefaultTargets="Build" InitialTargets="_ValidateEssentialProperties" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 
+       <Import Project="$(MSBuildProjectFullPath).user" Condition="Exists('$(MSBuildProjectFullPath).user')"/>
+       
        <PropertyGroup>
+               <OutputType Condition="'$(OutputType)' == ''">Exe</OutputType>
                <TargetExt Condition="'$(OutputType)' == 'Winexe'">.exe</TargetExt>
                <TargetExt Condition="'$(OutputType)' == 'Exe'">.exe</TargetExt>
                <TargetExt Condition="'$(OutputType)' == 'Library'">.dll</TargetExt>
@@ -12,7 +15,7 @@
        </PropertyGroup>
 
        <PropertyGroup>
-               <AssemblyName Condition="'$(AssemblyName)' == ''">$(RootNamespace)</AssemblyName>
+               <AssemblyName Condition="'$(AssemblyName)' == ''">$(MSBuildProjectName)</AssemblyName>
                <OutputPath Condition="'$(OutputPath)' != '' and !HasTrailingSlash('$(OutputPath)')">$(OutputPath)\</OutputPath> 
                <OutputPath Condition=" '$(Platform)'=='' and '$(Configuration)'=='' and '$(OutputPath)'=='' ">bin\Debug\</OutputPath>
                <WarningLevel Condition="'$(WarningLevel)' == ''" >2</WarningLevel>
                </AllowedReferenceAssemblyFileExtensions>
 
                <AllowedReferenceRelatedFileExtensions Condition=" '$(AllowedReferenceRelatedFileExtensions)' == '' ">
-                       .mdb
+                       .exe.mdb;
+                       .dll.mdb;
+                       .xml
                </AllowedReferenceRelatedFileExtensions>
 
                <AssemblySearchPaths Condition="'$(AssemblySearchPaths)' == ''">
                        {CandidateAssemblyFiles};
                        $(ReferencePath);
+                       @(AdditionalReferencePath);
                        {HintPathFromItem};
                        {TargetFrameworkDirectory};
                        {PkgConfig};
        </Target>
 
        <Target
-               Name="AssignProjectConfigurations"
+               Name="AssignProjectConfiguration"
                Condition="'@(ProjectReference)' != ''">
 
                <!-- assign configs if building a solution file -->
                ProjectReferenceWithConfigurationNonExistent: Projects non-existent on disk -->
 
        <Target Name="SplitProjectReferencesByExistent"
-               DependsOnTargets="AssignProjectConfigurations">
+               DependsOnTargets="AssignProjectConfiguration">
 
                <CreateItem Include="@(ProjectReferenceWithConfiguration)" Condition="'@(ProjectReferenceWithConfiguration)' != ''">
                        <Output TaskParameter="Include" ItemName="ProjectReferenceWithConfigurationExistent"
                </Copy>
        </Target>
 
-<!--
-       Not needed at the moment
        <Target Name="_ComputeNonExistentFileProperty" Condition='false'>
                <CreateProperty Value="__NonExistentSubDir__\__NonExistentFile__">
                        <Output TaskParameter="Value" PropertyName="NonExistentFile"/>
                </CreateProperty>
        </Target>
--->
 
        <PropertyGroup>
                <BuildDependsOn>
                        <Output TaskParameter="Lines" ItemName="PreviousFileWrites"/>
                </ReadLinesFromFile>
 
-               <RemoveDuplicates Inputs="@(PreviousFileWrites);@(FileWrites->'%(FullPath)')">
-                       <Output TaskParameter="Filtered" ItemName="CombinedFileWrites"/>
-               </RemoveDuplicates>
-
                <!-- CopyLocal files: In case all the projects build to common output
                     directory, then other projects might depend on some of these
                     CopyLocal files, so delete only the ones under *this* project
                        <Output TaskParameter="InPath" ItemName="FileWrites"/>
                </FindUnderPath>
 
+               <RemoveDuplicates Inputs="@(PreviousFileWrites);@(FileWrites->'%(FullPath)')">
+                       <Output TaskParameter="Filtered" ItemName="CombinedFileWrites"/>
+               </RemoveDuplicates>
+
                <WriteLinesToFile
                        File="$(IntermediateOutputPath)$(CleanFile)"
                        Lines="@(CombinedFileWrites)"
        </Target>
 
        <Target Name="CleanReferencedProjects"
-               DependsOnTargets="AssignProjectConfigurations">
+               DependsOnTargets="AssignProjectConfiguration">
 
                <!-- If building from .sln.proj or from IDE, clean will get handled by them,
                     else we are building a project directly, from the command line, so