This repository was archived by the owner on Jul 12, 2022. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 235235Network Trash Folder
236236Temporary Items
237237.apdisk
238+
239+ # Local msbuild copy to run on Mono
240+ src /ExternalApis /
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ SRC=" src"
4+ EXTERNAL_APIS_DIR=" $SRC /ExternalApis"
5+ # see https://github.com/mono/msbuild/blob/xplat-c9/cibuild.sh
6+ MSBUILD_DOWNLOAD_URL=" https://github.com/radical/msbuild/releases/download/v0.03/mono_msbuild_d25dd923839404bd64cc63f420e75acf96fc75c4.zip"
7+ MSBUILD_ZIP=" $EXTERNAL_APIS_DIR /msbuild.zip"
8+ MSBUILD_EXE=" $EXTERNAL_APIS_DIR /MSBuild/msbuild.exe"
9+
10+ downloadMSBuildForMono ()
11+ {
12+ if [ ! -e " $MSBUILD_EXE " ]
13+ then
14+ mkdir -p $EXTERNAL_APIS_DIR
15+
16+ echo " ** Downloading MSBUILD from $MSBUILD_DOWNLOAD_URL "
17+ curl -sL -o $MSBUILD_ZIP " $MSBUILD_DOWNLOAD_URL "
18+
19+ unzip -q $MSBUILD_ZIP -d $EXTERNAL_APIS_DIR
20+ find " $EXTERNAL_APIS_DIR /msbuild" -name " *.exe" -exec chmod " +x" ' {}' ' ;'
21+ rm $MSBUILD_ZIP
22+ fi
23+ }
24+
25+ downloadMSBuildForMono
Original file line number Diff line number Diff line change 55 </startup >
66 <runtime >
77 <assemblyBinding xmlns =" urn:schemas-microsoft-com:asm.v1" >
8+ <probing privatePath =" ./msbuild" />
89 <dependentAssembly >
910 <assemblyIdentity name =" Microsoft.CodeAnalysis" publicKeyToken =" 31bf3856ad364e35" culture =" neutral" />
1011 <bindingRedirect oldVersion =" 0.0.0.0-1.0.0.0" newVersion =" 1.0.0.0" />
Original file line number Diff line number Diff line change 105105 <Analyzer Include =" ..\packages\Microsoft.CodeAnalysis.Analyzers.1.0.0\analyzers\dotnet\cs\Microsoft.CodeAnalysis.CSharp.Analyzers.dll" />
106106 </ItemGroup >
107107 <Import Project =" $(MSBuildToolsPath)\Microsoft.CSharp.targets" />
108+ <Target Name =" CopyMSBuildForMono"
109+ AfterTargets =" AfterBuild"
110+ Condition =" '$(OS)' == 'Unix' " >
111+ <ItemGroup >
112+ <_CopyItems Include =" ..\ExternalApis\msbuild\*.*" />
113+ </ItemGroup >
114+ <Copy
115+ SourceFiles =" @(_CopyItems)"
116+ DestinationFolder =" $(TargetDir)\msbuild"
117+ />
118+ </Target >
119+ <Target Name =" AfterClean"
120+ Condition =" '$(OS)' == 'Unix' " >
121+ <ItemGroup >
122+ <LocalMonoMSBuild Include =" $(TargetDir)\msbuild" />
123+ </ItemGroup >
124+ <RemoveDir Directories =" @(LocalMonoMSBuild)" />
125+ </Target >
108126 <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
109127 Other similar extension points exist, see Microsoft.Common.targets.
110128 <Target Name="BeforeBuild">
You can’t perform that action at this time.
0 commit comments