Skip to content

Commit 79100ea

Browse files
committed
Added Costura.Fody
- to embedded all referenced dll into a single .exe file - so that user can use it easily
1 parent 78d7d6b commit 79100ea

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

MainDemo.Wpf/FodyWeavers.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Weavers>
3+
<Costura />
4+
</Weavers>

MainDemo.Wpf/MaterialDesignDemo.csproj

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
<FileAlignment>512</FileAlignment>
1414
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
1515
<WarningLevel>4</WarningLevel>
16+
<NuGetPackageImportStamp>
17+
</NuGetPackageImportStamp>
1618
</PropertyGroup>
1719
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1820
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -51,6 +53,10 @@
5153
<Paket>True</Paket>
5254
<Link>VirtualCollection/VirtualizingWrapPanel.cs</Link>
5355
</Compile>
56+
<Reference Include="Costura, Version=1.6.2.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
57+
<HintPath>..\packages\Costura.Fody.1.6.2\lib\dotnet\Costura.dll</HintPath>
58+
<Private>False</Private>
59+
</Reference>
5460
<Reference Include="PresentationFramework.Aero2" />
5561
<Reference Include="System" />
5662
<Reference Include="System.Configuration" />
@@ -400,6 +406,7 @@
400406
<Generator>ResXFileCodeGenerator</Generator>
401407
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
402408
</EmbeddedResource>
409+
<None Include="packages.config" />
403410
<None Include="paket.references" />
404411
<None Include="Properties\Settings.settings">
405412
<Generator>SettingsSingleFileGenerator</Generator>
@@ -444,6 +451,7 @@
444451
</ItemGroup>
445452
<ItemGroup>
446453
<Content Include="ExternalDependency\CodeDisplayer.dll" />
454+
<None Include="FodyWeavers.xml" />
447455
</ItemGroup>
448456
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
449457
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
@@ -454,4 +462,13 @@
454462
</Target>
455463
-->
456464
<Import Project="..\.paket\paket.targets" />
465+
<Import Project="..\packages\Fody.2.0.0\build\dotnet\Fody.targets" Condition="Exists('..\packages\Fody.2.0.0\build\dotnet\Fody.targets')" />
466+
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
467+
<PropertyGroup>
468+
<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>
469+
</PropertyGroup>
470+
<Error Condition="!Exists('..\packages\Fody.2.0.0\build\dotnet\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.2.0.0\build\dotnet\Fody.targets'))" />
471+
<Error Condition="!Exists('..\packages\Costura.Fody.1.6.2\build\dotnet\Costura.Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Costura.Fody.1.6.2\build\dotnet\Costura.Fody.targets'))" />
472+
</Target>
473+
<Import Project="..\packages\Costura.Fody.1.6.2\build\dotnet\Costura.Fody.targets" Condition="Exists('..\packages\Costura.Fody.1.6.2\build\dotnet\Costura.Fody.targets')" />
457474
</Project>

MainDemo.Wpf/packages.config

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="Costura.Fody" version="1.6.2" targetFramework="net45" developmentDependency="true" />
4+
<package id="Fody" version="2.0.0" targetFramework="net45" developmentDependency="true" />
5+
</packages>

0 commit comments

Comments
 (0)