Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

Commit 7f94fdf

Browse files
committed
Fix assembly resolution for Mono projects targeting .NET 4
1 parent 758cc93 commit 7f94fdf

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

samples/Mono/Mono.Build.Tasks/SharpDevelop.Build.Mono.Dmcs.targets

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@
2828
</AssemblySearchPaths>
2929
</PropertyGroup>
3030

31-
<Target Name="GetFrameworkPaths">
31+
<Target
32+
Name="GetFrameworkPaths"
33+
Returns="@(_ExplicitReference)">
3234
<!-- Get the path to the target Mono Framework directory. -->
3335
<GetMonoFrameworkPath TargetFrameworkVersion="$(MonoTargetFrameworkVersion)">
3436
<Output TaskParameter="Path" PropertyName="TargetFrameworkDirectory"/>
@@ -40,14 +42,18 @@
4042
<Output TaskParameter="Path" PropertyName="TargetFrameworkSDKDirectory"/>
4143
<Output TaskParameter="Path" ItemName="_TargetFrameworkSDKDirectoryItem"/>
4244
</GetMonoFrameworkSDKPath>
45+
46+
<ItemGroup>
47+
<_ExplicitReference Remove="1"/>
48+
<_ExplicitReference Include="$(TargetFrameworkDirectory)\mscorlib.dll"/>
49+
</ItemGroup>
4350
</Target>
4451

4552
<!-- Modify what the ResolveAssemblyReferences tasks depends on so the
4653
AssemblySearchPaths can be modified to use the Mono GAC -->
4754
<PropertyGroup>
4855
<ResolveAssemblyReferencesDependsOn>
4956
GetFrameworkPaths;
50-
GetReferenceAssemblyPaths;
5157
PrepareForBuild;
5258
AddMonoAssemblySearchPaths
5359
</ResolveAssemblyReferencesDependsOn>
@@ -61,6 +67,9 @@
6167
</AddMonoAssemblySearchPaths>
6268
</Target>
6369

70+
<Target Name="GetReferenceAssemblyPaths">
71+
</Target>
72+
6473
<Target
6574
Name="CoreCompile"
6675
Inputs="$(MSBuildAllProjects);
@@ -108,6 +117,6 @@
108117
WarningLevel="$(WarningLevel)"
109118
Win32Icon="$(ApplicationIcon)"
110119
Win32Resource="$(Win32Resource)" />
111-
</Target>
120+
</Target>
112121

113122
</Project>

0 commit comments

Comments
 (0)