Skip to content

Commit 988ad37

Browse files
authored
Improve Core DLL for distribution (#15)
1 parent 2b925df commit 988ad37

File tree

5 files changed

+137
-5
lines changed

5 files changed

+137
-5
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
3+
<Costura IncludeDebugSymbols='false'>
4+
<IncludeAssemblies>
5+
Mono.*
6+
Stubble.*
7+
System.Runtime.CompilerServices.Unsafe
8+
System.Threading.Tasks.Extensions
9+
</IncludeAssemblies>
10+
</Costura>
11+
</Weavers>
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
3+
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
4+
<xs:element name="Weavers">
5+
<xs:complexType>
6+
<xs:all>
7+
<xs:element name="Costura" minOccurs="0" maxOccurs="1">
8+
<xs:complexType>
9+
<xs:all>
10+
<xs:element minOccurs="0" maxOccurs="1" name="ExcludeAssemblies" type="xs:string">
11+
<xs:annotation>
12+
<xs:documentation>A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks</xs:documentation>
13+
</xs:annotation>
14+
</xs:element>
15+
<xs:element minOccurs="0" maxOccurs="1" name="IncludeAssemblies" type="xs:string">
16+
<xs:annotation>
17+
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks.</xs:documentation>
18+
</xs:annotation>
19+
</xs:element>
20+
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged32Assemblies" type="xs:string">
21+
<xs:annotation>
22+
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with line breaks.</xs:documentation>
23+
</xs:annotation>
24+
</xs:element>
25+
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged64Assemblies" type="xs:string">
26+
<xs:annotation>
27+
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with line breaks.</xs:documentation>
28+
</xs:annotation>
29+
</xs:element>
30+
<xs:element minOccurs="0" maxOccurs="1" name="PreloadOrder" type="xs:string">
31+
<xs:annotation>
32+
<xs:documentation>The order of preloaded assemblies, delimited with line breaks.</xs:documentation>
33+
</xs:annotation>
34+
</xs:element>
35+
</xs:all>
36+
<xs:attribute name="CreateTemporaryAssemblies" type="xs:boolean">
37+
<xs:annotation>
38+
<xs:documentation>This will copy embedded files to disk before loading them into memory. This is helpful for some scenarios that expected an assembly to be loaded from a physical file.</xs:documentation>
39+
</xs:annotation>
40+
</xs:attribute>
41+
<xs:attribute name="IncludeDebugSymbols" type="xs:boolean">
42+
<xs:annotation>
43+
<xs:documentation>Controls if .pdbs for reference assemblies are also embedded.</xs:documentation>
44+
</xs:annotation>
45+
</xs:attribute>
46+
<xs:attribute name="DisableCompression" type="xs:boolean">
47+
<xs:annotation>
48+
<xs:documentation>Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option.</xs:documentation>
49+
</xs:annotation>
50+
</xs:attribute>
51+
<xs:attribute name="DisableCleanup" type="xs:boolean">
52+
<xs:annotation>
53+
<xs:documentation>As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off.</xs:documentation>
54+
</xs:annotation>
55+
</xs:attribute>
56+
<xs:attribute name="LoadAtModuleInit" type="xs:boolean">
57+
<xs:annotation>
58+
<xs:documentation>Costura by default will load as part of the module initialization. This flag disables that behavior. Make sure you call CosturaUtility.Initialize() somewhere in your code.</xs:documentation>
59+
</xs:annotation>
60+
</xs:attribute>
61+
<xs:attribute name="IgnoreSatelliteAssemblies" type="xs:boolean">
62+
<xs:annotation>
63+
<xs:documentation>Costura will by default use assemblies with a name like 'resources.dll' as a satellite resource and prepend the output path. This flag disables that behavior.</xs:documentation>
64+
</xs:annotation>
65+
</xs:attribute>
66+
<xs:attribute name="ExcludeAssemblies" type="xs:string">
67+
<xs:annotation>
68+
<xs:documentation>A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with |</xs:documentation>
69+
</xs:annotation>
70+
</xs:attribute>
71+
<xs:attribute name="IncludeAssemblies" type="xs:string">
72+
<xs:annotation>
73+
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |.</xs:documentation>
74+
</xs:annotation>
75+
</xs:attribute>
76+
<xs:attribute name="Unmanaged32Assemblies" type="xs:string">
77+
<xs:annotation>
78+
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with |.</xs:documentation>
79+
</xs:annotation>
80+
</xs:attribute>
81+
<xs:attribute name="Unmanaged64Assemblies" type="xs:string">
82+
<xs:annotation>
83+
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with |.</xs:documentation>
84+
</xs:annotation>
85+
</xs:attribute>
86+
<xs:attribute name="PreloadOrder" type="xs:string">
87+
<xs:annotation>
88+
<xs:documentation>The order of preloaded assemblies, delimited with |.</xs:documentation>
89+
</xs:annotation>
90+
</xs:attribute>
91+
</xs:complexType>
92+
</xs:element>
93+
</xs:all>
94+
<xs:attribute name="VerifyAssembly" type="xs:boolean">
95+
<xs:annotation>
96+
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
97+
</xs:annotation>
98+
</xs:attribute>
99+
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
100+
<xs:annotation>
101+
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
102+
</xs:annotation>
103+
</xs:attribute>
104+
<xs:attribute name="GenerateXsd" type="xs:boolean">
105+
<xs:annotation>
106+
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
107+
</xs:annotation>
108+
</xs:attribute>
109+
</xs:complexType>
110+
</xs:element>
111+
</xs:schema>

source/MetadataProcessor.Core/MetadataProcessor.Core.csproj

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="..\packages\Costura.Fody.3.3.3\build\Costura.Fody.props" Condition="Exists('..\packages\Costura.Fody.3.3.3\build\Costura.Fody.props')" />
34
<PropertyGroup>
45
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
56
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -33,6 +34,9 @@
3334
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
3435
</PropertyGroup>
3536
<ItemGroup>
37+
<Reference Include="Costura, Version=3.3.3.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
38+
<HintPath>..\packages\Costura.Fody.3.3.3\lib\net40\Costura.dll</HintPath>
39+
</Reference>
3640
<Reference Include="Microsoft.CSharp" />
3741
<Reference Include="Mono.Cecil, Version=0.11.1.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e, processorArchitecture=MSIL">
3842
<HintPath>..\packages\Mono.Cecil.0.11.1\lib\net40\Mono.Cecil.dll</HintPath>
@@ -111,13 +115,20 @@
111115
<None Include="packages.config" />
112116
<Compile Include="SkeletonGenerator\SkeletonTemplates.cs" />
113117
</ItemGroup>
114-
<ItemGroup />
118+
<ItemGroup>
119+
<Content Include="FodyWeavers.xml">
120+
<SubType>Designer</SubType>
121+
</Content>
122+
</ItemGroup>
115123
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
116124
<Import Project="..\packages\Nerdbank.GitVersioning.3.0.28\build\Nerdbank.GitVersioning.targets" Condition="Exists('..\packages\Nerdbank.GitVersioning.3.0.28\build\Nerdbank.GitVersioning.targets')" />
117125
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
118126
<PropertyGroup>
119127
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
120128
</PropertyGroup>
121129
<Error Condition="!Exists('..\packages\Nerdbank.GitVersioning.3.0.28\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Nerdbank.GitVersioning.3.0.28\build\Nerdbank.GitVersioning.targets'))" />
130+
<Error Condition="!Exists('..\packages\Fody.4.0.2\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.4.0.2\build\Fody.targets'))" />
131+
<Error Condition="!Exists('..\packages\Costura.Fody.3.3.3\build\Costura.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Costura.Fody.3.3.3\build\Costura.Fody.props'))" />
122132
</Target>
133+
<Import Project="..\packages\Fody.4.0.2\build\Fody.targets" Condition="Exists('..\packages\Fody.4.0.2\build\Fody.targets')" />
123134
</Project>

source/MetadataProcessor.Core/package.nuspec

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@
2121
<copyright>Copyright (c) 2019 The nanoFramework project contributors</copyright>
2222
<references></references>
2323
<tags>nanoFramework, nano Framework, NETNF, NETMF, Micro Framework, .net</tags>
24-
<dependencies>
25-
<dependency id="Mono.Cecil" version="0.11.1" />
26-
<dependency id="Stubble.Core" version="1.6.3" />
27-
</dependencies>
24+
<dependencies></dependencies>
2825
</metadata>
2926
<files>
3027
<file src="bin\Release\nanoFramework.Tools.MetadataProcessor.Core.dll" target="lib/net461" />

source/MetadataProcessor.Core/packages.config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3+
<package id="Costura.Fody" version="3.3.3" targetFramework="net461" />
4+
<package id="Fody" version="4.0.2" targetFramework="net461" developmentDependency="true" />
35
<package id="Mono.Cecil" version="0.11.1" targetFramework="net461" />
46
<package id="Nerdbank.GitVersioning" version="3.0.28" targetFramework="net461" developmentDependency="true" />
57
<package id="Stubble.Core" version="1.6.3" targetFramework="net461" />

0 commit comments

Comments
 (0)