forked from flaviofak/cecil
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDirectory.Build.props
91 lines (77 loc) · 4.29 KB
/
Directory.Build.props
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<Project>
<PropertyGroup>
<!-- Configuration definitions. -->
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<!-- Path definitions. -->
<BaseIntermediateOutputPath>$(MSBuildThisFileDirectory)\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
<IntermediateOutputPath>$(BaseIntermediateOutputPath)</IntermediateOutputPath>
<OutputPath>$(MSBuildThisFileDirectory)\bin\$(Configuration)\$(MSBuildProjectName)</OutputPath>
<!-- Sign information. -->
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)\cecil.snk</AssemblyOriginatorKeyFile>
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
<!-- Target framework definitions. -->
<ProjectTargetFrameworkForNetStandard>netstandard2.0</ProjectTargetFrameworkForNetStandard>
<ProjectTargetFrameworks>$(ProjectTargetFrameworkForNetStandard)</ProjectTargetFrameworks>
<TestProjectTargetFrameworkForNetStandard>net462</TestProjectTargetFrameworkForNetStandard>
<TestProjectTargetFrameworks>$(TestProjectTargetFrameworkForNetStandard)</TestProjectTargetFrameworks>
<!-- Compile-time constant for the target framework moniker. -->
<DefineConstants>$(DefineConstants);$(TargetFramework.TrimEnd('.0123456789').ToUpper())</DefineConstants>
</PropertyGroup>
<!-- This indicates to test projects that the current target is .Net Standard. -->
<PropertyGroup Condition=" '$(TargetFramework)' == '$(TestProjectTargetFrameworkForNetStandard)' " >
<DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants>
</PropertyGroup>
<!-- Product information. -->
<PropertyGroup>
<Product>StoneCo.Mono.Cecil</Product>
<AssemblyName>$(MSBuildProjectName)</AssemblyName>
<AssemblyTitle>$(MSBuildProjectName)</AssemblyTitle>
<Description>Cecil is a library written by Jb Evain to generate and inspect programs and libraries in the ECMA CIL format.</Description>
<Authors>Jb Evain</Authors>
<Copyright>Copyright © 2008 - 2015 Jb Evain</Copyright>
<VersionPrefix>0.10.0.0</VersionPrefix>
<VersionSuffix>beta6</VersionSuffix>
</PropertyGroup>
<!-- Split debug and release information. -->
<PropertyGroup Condition=" $(Configuration.Contains('Debug')) ">
<DefineDebug>true</DefineDebug>
<DebugSymbols>true</DebugSymbols>
<Optimize>false</Optimize>
</PropertyGroup>
<PropertyGroup Condition=" $(Configuration.Contains('Release')) ">
<DefineDebug>false</DefineDebug>
<DebugSymbols>true</DebugSymbols>
<Optimize>true</Optimize>
</PropertyGroup>
<!-- This optional import allows products that distribute Cecil to tweak settings that will affect its
build, without having to fork the project unnecessarily. The Mono.Cecil.overrides file is a plain
MSBuild file with additional properties, and can exist anywhere upwards from the current Cecil repo
clone path, making it very flexible even if the project is submoduled.
-->
<PropertyGroup>
<CecilOverrides Condition="'$(CecilOverrides)' == ''">$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), Mono.Cecil.overrides))\Mono.Cecil.overrides</CecilOverrides>
</PropertyGroup>
<Import Project="$(CecilOverrides)" Condition="Exists('$(CecilOverrides)')" />
<!-- This is an example of a custom override file -->
<!--
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<AssemblyName>$(AssemblyName.Replace('Mono', 'MyCompany'))</AssemblyName>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)MyCompany.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)MyCompany.AssemblyInfo.cs" />
</ItemGroup>
</Project>
The additional AssemblyInfo.cs added to the Compile group provides the InternalsVisibleTo so that
the Mdb/Pdb projects can compile successfully:
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
[assembly: InternalsVisibleTo ("MyCompany.Cecil.Pdb, PublicKey=....")]
[assembly: InternalsVisibleTo ("MyCompany.Cecil.Mdb, PublicKey=...")]
[assembly: InternalsVisibleTo ("MyCompany.Cecil.Rocks, PublicKey=...")]
[assembly: InternalsVisibleTo ("MyCompany.Cecil.Tests, PublicKey=...")]
-->
</Project>