Skip to content

Commit a7c8f6a

Browse files
sbomermarek-safar
authored andcommitted
Build against Cecil submodule (#1477)
* Build against Cecil submodule * Depend on official cecil version With this change, the nuspec of the ref assembly package will list cecil verision 0.11.2 as a dependency (instead of 5.0.0-rc*). This allows consumers of the ref package to use the publicly released cecil.
1 parent 52fd372 commit a7c8f6a

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

Directory.Build.props

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@
2525
<IsPackable>false</IsPackable>
2626
<PackageLicenseExpression>MIT</PackageLicenseExpression>
2727
<_ToolsProjectTargets>$(ArtifactsToolsetDir)Common\Tools.proj.nuget.g.targets</_ToolsProjectTargets>
28-
<!-- Set this to false to build against the submodule. Convenient for experimenting locally. -->
29-
<UseCecilPackage Condition="'$(MonoBuild)' != '' And '$(UseCecilPackage)' == ''">false</UseCecilPackage>
30-
<UseCecilPackage Condition="'$(UseCecilPackage)' == ''">true</UseCecilPackage>
28+
<!-- Set this to true to build against the package instead of the submodule. -->
29+
<UseCecilPackage Condition="'$(UseCecilPackage)' == ''">false</UseCecilPackage>
3130
<!-- No symbols are produced for ref assemblies, but some parts of the SDK still expect pdbs, so we explicitly tell it there are none. -->
3231
<!-- Must be set after importing Arcade to override its defaults. -->
3332
<DebugType Condition=" '$(IsReferenceAssembly)' == 'true' ">none</DebugType>

eng/Versions.props

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
<MicrosoftBuildUtilitiesCoreVersion>15.4.8</MicrosoftBuildUtilitiesCoreVersion>
2323
<MicrosoftDotNetApiCompatVersion>5.0.0-beta.20506.7</MicrosoftDotNetApiCompatVersion>
2424
<MicrosoftDotNetCodeAnalysisVersion>5.0.0-beta.20471.1</MicrosoftDotNetCodeAnalysisVersion>
25-
<!-- We depend on (and redistribute) the official Mono.Cecil NuGet package built from https://github.com/jbevain/cecil -->
25+
<!-- This controls the version of the cecil package, or the version of cecil in the project graph
26+
when we build the cecil submodule. The reference assembly package will depend on this version of cecil.
27+
Keep this in sync with ProjectInfo.cs in the submodule. -->
2628
<MonoCecilVersion>0.11.3</MonoCecilVersion>
2729
<UseVSTestRunner>true</UseVSTestRunner>
2830
</PropertyGroup>

external/Mono.Cecil.overrides

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
<!-- Cecil sets PublicSign on windows, but we always want to
99
PublicSign. -->
1010
<PublicSign>true</PublicSign>
11+
<!-- When we build the cecil submodule, use the same version number
12+
as the package dependency. This way the linker ref assembly package
13+
will depend on the publicly available package. Note that we can't set
14+
just set Version here because Arcade will override it. -->
15+
<PackageVersion>$(MonoCecilVersion)</PackageVersion>
1116
</PropertyGroup>
1217

1318
<PropertyGroup Condition="'$(MonoBuild)' == ''">

0 commit comments

Comments
 (0)