Skip to content

Commit

Permalink
[mono] Update to target net471 instead of net461
Browse files Browse the repository at this point in the history
This was prompted by changes in the build
(microsoft.net.build.extensions*), which caused lot of reference
assemblies to be local-copied because we were referencing ns2.0
libraries but targeting <4.7.1 .

The change didn't cause any immediate issues, build and tests work fine
and testing with some basic projects seems to work fine too.
  • Loading branch information
radical committed Aug 3, 2018
1 parent 35d0ec6 commit 8b67c5a
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -408,10 +408,10 @@ function Build {
msbuildToUse=$(QQ "$bootstrapRoot/netcoreapp2.1/MSBuild/MSBuild.dll")
elif [ "$hostType" = "mono" ]
then
msbuildToUse="$bootstrapRoot/net461/MSBuild/15.0/Bin/MSBuild.dll"
msbuildToUse="$bootstrapRoot/net471/MSBuild/15.0/Bin/MSBuild.dll"
msbuildHost="mono"

properties="$properties /p:MSBuildExtensionsPath=$bootstrapRoot/net461/MSBuild/"
properties="$properties /p:MSBuildExtensionsPath=$bootstrapRoot/net471/MSBuild/"
else
ErrorHostType
fi
Expand Down
2 changes: 1 addition & 1 deletion mono/build/install.proj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<MSBuildInstallBinDir>$(MonoInstallPrefix)\lib\mono\msbuild\$(TargetMSBuildToolsVersion)\bin</MSBuildInstallBinDir>
<XBuildDir>$(MonoInstallPrefix)\lib\mono\xbuild</XBuildDir>

<MSBuildBinSrcDir>$(RepoRoot)artifacts\2\$(Configuration)\bin\MSBuild.Bootstrap\net461\</MSBuildBinSrcDir>
<MSBuildBinSrcDir>$(RepoRoot)artifacts\2\$(Configuration)\bin\MSBuild.Bootstrap\net471\</MSBuildBinSrcDir>

<AllInstalledFiles_FileCanonical>$(MSBuildThisFileDirectory)\all_files.canon.txt</AllInstalledFiles_FileCanonical>
<AllInstalledFiles_File>$(MSBuildThisFileDirectory)\all_files.new.txt</AllInstalledFiles_File>
Expand Down
2 changes: 1 addition & 1 deletion mono/tasks/build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<OutputType>Library</OutputType>
<AssemblyName>Mono.Build.Tasks</AssemblyName>
<DebugType>full</DebugType>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<ProjectReference Include="..\Samples\TaskWithDependency\TaskWithDependency.csproj" Private="false" ReferenceOutputAssembly="false" OutputItemType="TaskWithDependencyResolvedProjectReferencePath">
<SetTargetFramework Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">TargetFramework=net46</SetTargetFramework>
<SetTargetFramework Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' and '$(MonoBuild)' == 'true'">TargetFramework=net461</SetTargetFramework>
<SetTargetFramework Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' and '$(MonoBuild)' == 'true'">TargetFramework=net471</SetTargetFramework>
<SetTargetFramework Condition="'$(TargetFrameworkIdentifier)' != '.NETFramework'">TargetFramework=netstandard2.0</SetTargetFramework>
</ProjectReference>
<ProjectReference Include="..\Samples\PortableTask\PortableTask.csproj" Private="false" ReferenceOutputAssembly="false" OutputItemType="PortableTaskResolvedProjectReferencePath" SetTargetFramework="TargetFramework=netstandard1.3" />
Expand Down
4 changes: 2 additions & 2 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@

<!-- Defaults for target frameworks and architecture -->
<LibraryTargetFrameworks>net46;netstandard2.0</LibraryTargetFrameworks>
<LibraryTargetFrameworks Condition="'$(MonoBuild)'=='true'">net461</LibraryTargetFrameworks>
<LibraryTargetFrameworks Condition="'$(MonoBuild)'=='true'">net471</LibraryTargetFrameworks>
<PlatformTarget>AnyCPU</PlatformTarget>

<!-- Target frameworks for Exe and unit test projects (ie projects with runtime output) -->
<RuntimeOutputTargetFrameworks>netcoreapp2.0;netcoreapp2.1</RuntimeOutputTargetFrameworks>
<RuntimeOutputTargetFrameworks Condition="'$(OsEnvironment)'=='windows'">net46;$(RuntimeOutputTargetFrameworks)</RuntimeOutputTargetFrameworks>
<RuntimeOutputTargetFrameworks Condition="'$(MonoBuild)' == 'true'">net461</RuntimeOutputTargetFrameworks>
<RuntimeOutputTargetFrameworks Condition="'$(MonoBuild)' == 'true'">net471</RuntimeOutputTargetFrameworks>

<!-- Don't automatically append target framework to output path, since we want to put the Platform Target beforehand, if it's not AnyCPU -->
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
Expand Down
2 changes: 1 addition & 1 deletion src/MSBuild.Bootstrap/MSBuild.Bootstrap.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
TF=net461 here and let this set up the `bootstrap/` folder. And to avoid the
`MSBuild` project doing the same, we will disable the `bootstrap` bits from there,
for mono. -->
<TargetFramework Condition="'$(MonoBuild)' == 'true'">net461</TargetFramework>
<TargetFramework Condition="'$(MonoBuild)' == 'true'">net471</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Package/Localization/Localization.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="RoslynTools.RepoToolset">
<PropertyGroup>
<TargetFramework Condition="$(MonoBuild) != 'true'">netcoreapp2.1</TargetFramework>
<TargetFramework Condition="$(MonoBuild) == 'true'">net461</TargetFramework>
<TargetFramework Condition="$(MonoBuild) == 'true'">net471</TargetFramework>
<NuspecFile>Microsoft.Build.Localization.nuspec</NuspecFile>
<NoPackageAnalysis>true</NoPackageAnalysis>
</PropertyGroup>
Expand Down

0 comments on commit 8b67c5a

Please sign in to comment.