Skip to content

Commit 05a6471

Browse files
committed
Add FodyWeavers
1 parent ea096fe commit 05a6471

5 files changed

Lines changed: 198 additions & 0 deletions

File tree

source/.vs/Symlinker/v17/.suo

7.5 KB
Binary file not shown.

source/Symlinker/FodyWeavers.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
2+
<Costura />
3+
</Weavers>

source/Symlinker/FodyWeavers.xsd

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
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="ExcludeRuntimeAssemblies" type="xs:string">
21+
<xs:annotation>
22+
<xs:documentation>A list of runtime assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks</xs:documentation>
23+
</xs:annotation>
24+
</xs:element>
25+
<xs:element minOccurs="0" maxOccurs="1" name="IncludeRuntimeAssemblies" type="xs:string">
26+
<xs:annotation>
27+
<xs:documentation>A list of runtime assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks.</xs:documentation>
28+
</xs:annotation>
29+
</xs:element>
30+
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged32Assemblies" type="xs:string">
31+
<xs:annotation>
32+
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with line breaks.</xs:documentation>
33+
</xs:annotation>
34+
</xs:element>
35+
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged64Assemblies" type="xs:string">
36+
<xs:annotation>
37+
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with line breaks.</xs:documentation>
38+
</xs:annotation>
39+
</xs:element>
40+
<xs:element minOccurs="0" maxOccurs="1" name="PreloadOrder" type="xs:string">
41+
<xs:annotation>
42+
<xs:documentation>The order of preloaded assemblies, delimited with line breaks.</xs:documentation>
43+
</xs:annotation>
44+
</xs:element>
45+
</xs:all>
46+
<xs:attribute name="CreateTemporaryAssemblies" type="xs:boolean">
47+
<xs:annotation>
48+
<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>
49+
</xs:annotation>
50+
</xs:attribute>
51+
<xs:attribute name="IncludeDebugSymbols" type="xs:boolean">
52+
<xs:annotation>
53+
<xs:documentation>Controls if .pdbs for reference assemblies are also embedded.</xs:documentation>
54+
</xs:annotation>
55+
</xs:attribute>
56+
<xs:attribute name="IncludeRuntimeReferences" type="xs:boolean">
57+
<xs:annotation>
58+
<xs:documentation>Controls if runtime assemblies are also embedded.</xs:documentation>
59+
</xs:annotation>
60+
</xs:attribute>
61+
<xs:attribute name="UseRuntimeReferencePaths" type="xs:boolean">
62+
<xs:annotation>
63+
<xs:documentation>Controls whether the runtime assemblies are embedded with their full path or only with their assembly name.</xs:documentation>
64+
</xs:annotation>
65+
</xs:attribute>
66+
<xs:attribute name="DisableCompression" type="xs:boolean">
67+
<xs:annotation>
68+
<xs:documentation>Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option.</xs:documentation>
69+
</xs:annotation>
70+
</xs:attribute>
71+
<xs:attribute name="DisableCleanup" type="xs:boolean">
72+
<xs:annotation>
73+
<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>
74+
</xs:annotation>
75+
</xs:attribute>
76+
<xs:attribute name="LoadAtModuleInit" type="xs:boolean">
77+
<xs:annotation>
78+
<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>
79+
</xs:annotation>
80+
</xs:attribute>
81+
<xs:attribute name="IgnoreSatelliteAssemblies" type="xs:boolean">
82+
<xs:annotation>
83+
<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>
84+
</xs:annotation>
85+
</xs:attribute>
86+
<xs:attribute name="ExcludeAssemblies" type="xs:string">
87+
<xs:annotation>
88+
<xs:documentation>A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with |</xs:documentation>
89+
</xs:annotation>
90+
</xs:attribute>
91+
<xs:attribute name="IncludeAssemblies" type="xs:string">
92+
<xs:annotation>
93+
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |.</xs:documentation>
94+
</xs:annotation>
95+
</xs:attribute>
96+
<xs:attribute name="ExcludeRuntimeAssemblies" type="xs:string">
97+
<xs:annotation>
98+
<xs:documentation>A list of runtime assembly names to exclude from the default action of "embed all Copy Local references", delimited with |</xs:documentation>
99+
</xs:annotation>
100+
</xs:attribute>
101+
<xs:attribute name="IncludeRuntimeAssemblies" type="xs:string">
102+
<xs:annotation>
103+
<xs:documentation>A list of runtime assembly names to include from the default action of "embed all Copy Local references", delimited with |.</xs:documentation>
104+
</xs:annotation>
105+
</xs:attribute>
106+
<xs:attribute name="Unmanaged32Assemblies" type="xs:string">
107+
<xs:annotation>
108+
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with |.</xs:documentation>
109+
</xs:annotation>
110+
</xs:attribute>
111+
<xs:attribute name="Unmanaged64Assemblies" type="xs:string">
112+
<xs:annotation>
113+
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with |.</xs:documentation>
114+
</xs:annotation>
115+
</xs:attribute>
116+
<xs:attribute name="PreloadOrder" type="xs:string">
117+
<xs:annotation>
118+
<xs:documentation>The order of preloaded assemblies, delimited with |.</xs:documentation>
119+
</xs:annotation>
120+
</xs:attribute>
121+
</xs:complexType>
122+
</xs:element>
123+
</xs:all>
124+
<xs:attribute name="VerifyAssembly" type="xs:boolean">
125+
<xs:annotation>
126+
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
127+
</xs:annotation>
128+
</xs:attribute>
129+
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
130+
<xs:annotation>
131+
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
132+
</xs:annotation>
133+
</xs:attribute>
134+
<xs:attribute name="GenerateXsd" type="xs:boolean">
135+
<xs:annotation>
136+
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
137+
</xs:annotation>
138+
</xs:attribute>
139+
</xs:complexType>
140+
</xs:element>
141+
</xs:schema>

source/Symlinker/Symlinker.csproj

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="..\packages\Costura.Fody.5.7.0\build\Costura.Fody.props" Condition="Exists('..\packages\Costura.Fody.5.7.0\build\Costura.Fody.props')" />
34
<PropertyGroup>
45
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
56
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -51,6 +52,8 @@
5152
<CreateDesktopShortcut>true</CreateDesktopShortcut>
5253
<PublishWizardCompleted>true</PublishWizardCompleted>
5354
<BootstrapperEnabled>true</BootstrapperEnabled>
55+
<NuGetPackageImportStamp>
56+
</NuGetPackageImportStamp>
5457
</PropertyGroup>
5558
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
5659
<DebugSymbols>true</DebugSymbols>
@@ -86,13 +89,20 @@
8689
<StartupObject>Symlinker.Program</StartupObject>
8790
</PropertyGroup>
8891
<ItemGroup>
92+
<Reference Include="Costura, Version=5.7.0.0, Culture=neutral, processorArchitecture=MSIL">
93+
<HintPath>..\packages\Costura.Fody.5.7.0\lib\netstandard1.0\Costura.dll</HintPath>
94+
</Reference>
8995
<Reference Include="Inkore.UI.WinForms.Styler, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
9096
<HintPath>..\packages\Inkore.UI.WinForms.Styler.1.0.0\lib\net452\Inkore.UI.WinForms.Styler.dll</HintPath>
9197
</Reference>
9298
<Reference Include="System" />
99+
<Reference Include="System.ComponentModel.Composition" />
93100
<Reference Include="System.Core">
94101
<RequiredTargetFramework>3.5</RequiredTargetFramework>
95102
</Reference>
103+
<Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
104+
<HintPath>..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
105+
</Reference>
96106
<Reference Include="System.Xml.Linq">
97107
<RequiredTargetFramework>3.5</RequiredTargetFramework>
98108
</Reference>
@@ -194,6 +204,16 @@
194204
<None Include="Resources\Symlinker_32.png" />
195205
</ItemGroup>
196206
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
207+
<Import Project="..\packages\Fody.6.5.5\build\Fody.targets" Condition="Exists('..\packages\Fody.6.5.5\build\Fody.targets')" />
208+
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
209+
<PropertyGroup>
210+
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
211+
</PropertyGroup>
212+
<Error Condition="!Exists('..\packages\Fody.6.5.5\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.6.5.5\build\Fody.targets'))" />
213+
<Error Condition="!Exists('..\packages\Costura.Fody.5.7.0\build\Costura.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Costura.Fody.5.7.0\build\Costura.Fody.props'))" />
214+
<Error Condition="!Exists('..\packages\Costura.Fody.5.7.0\build\Costura.Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Costura.Fody.5.7.0\build\Costura.Fody.targets'))" />
215+
</Target>
216+
<Import Project="..\packages\Costura.Fody.5.7.0\build\Costura.Fody.targets" Condition="Exists('..\packages\Costura.Fody.5.7.0\build\Costura.Fody.targets')" />
197217
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
198218
Other similar extension points exist, see Microsoft.Common.targets.
199219
<Target Name="BeforeBuild">

source/Symlinker/packages.config

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,38 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3+
<package id="Costura.Fody" version="5.7.0" targetFramework="net452" developmentDependency="true" />
4+
<package id="Fody" version="6.5.5" targetFramework="net452" developmentDependency="true" />
35
<package id="Inkore.UI.WinForms.Styler" version="1.0.0" targetFramework="net452" />
6+
<package id="Microsoft.NETCore.Platforms" version="1.1.0" targetFramework="net452" />
7+
<package id="NETStandard.Library" version="1.6.1" targetFramework="net452" />
8+
<package id="System.Collections" version="4.3.0" targetFramework="net452" />
9+
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="net452" />
10+
<package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="net452" />
11+
<package id="System.Diagnostics.Tools" version="4.3.0" targetFramework="net452" />
12+
<package id="System.Diagnostics.Tracing" version="4.3.0" targetFramework="net452" />
13+
<package id="System.Globalization" version="4.3.0" targetFramework="net452" />
14+
<package id="System.IO" version="4.3.0" targetFramework="net452" />
15+
<package id="System.IO.Compression" version="4.3.0" targetFramework="net452" />
16+
<package id="System.Linq" version="4.3.0" targetFramework="net452" />
17+
<package id="System.Linq.Expressions" version="4.3.0" targetFramework="net452" />
18+
<package id="System.Net.Http" version="4.3.0" targetFramework="net452" />
19+
<package id="System.Net.Primitives" version="4.3.0" targetFramework="net452" />
20+
<package id="System.ObjectModel" version="4.3.0" targetFramework="net452" />
21+
<package id="System.Reflection" version="4.3.0" targetFramework="net452" />
22+
<package id="System.Reflection.Extensions" version="4.3.0" targetFramework="net452" />
23+
<package id="System.Reflection.Primitives" version="4.3.0" targetFramework="net452" />
24+
<package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="net452" />
25+
<package id="System.Runtime" version="4.3.0" targetFramework="net452" />
26+
<package id="System.Runtime.Extensions" version="4.3.0" targetFramework="net452" />
27+
<package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="net452" />
28+
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net452" />
29+
<package id="System.Runtime.Numerics" version="4.3.0" targetFramework="net452" />
30+
<package id="System.Text.Encoding" version="4.3.0" targetFramework="net452" />
31+
<package id="System.Text.Encoding.Extensions" version="4.3.0" targetFramework="net452" />
32+
<package id="System.Text.RegularExpressions" version="4.3.0" targetFramework="net452" />
33+
<package id="System.Threading" version="4.3.0" targetFramework="net452" />
34+
<package id="System.Threading.Tasks" version="4.3.0" targetFramework="net452" />
35+
<package id="System.Threading.Timer" version="4.3.0" targetFramework="net452" />
36+
<package id="System.Xml.ReaderWriter" version="4.3.0" targetFramework="net452" />
37+
<package id="System.Xml.XDocument" version="4.3.0" targetFramework="net452" />
438
</packages>

0 commit comments

Comments
 (0)