Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.2.0" />
<PackageReference Include="McMaster.NETCore.Plugins" Version="1.4.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="SpecFlow" Version="3.9.40" />
<PackageReference Include="SpecFlow.Plus.LivingDocPlugin" Version="3.9.57" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using Common.Bootstrapping;
using Moq;
using Solid.Core;
using TechTalk.SpecFlow;
using TechTalk.SpecFlow;

namespace Solid.Practices.Composition.Specs.Steps.Adapters
{
Expand All @@ -17,8 +14,7 @@ public void GivenTheAssembliesLoaderUsedDefaultAssemblyLoadingStrategy()
[Given(@"The assemblies loader used custom assembly loading strategy")]
public void GivenTheAssembliesLoaderUsedCustomAssemblyLoadingStrategy()
{
var initializable = new Mock<IInitializable>();
initializable.Object.UseDynamicLoad();
AssemblyLoader.LoadAssembliesFromPaths = RuntimeAssemblyLoader.Get;
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<TargetFramework>netcoreapp3.1</TargetFramework>
Expand All @@ -12,9 +12,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.2.0" />
<PackageReference Include="McMaster.NETCore.Plugins" Version="1.4.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="Moq" Version="4.16.1" />
<PackageReference Include="SpecFlow" Version="3.9.40" />
<PackageReference Include="SpecFlow.Tools.MsBuild.Generation" Version="3.9.40" />
<PackageReference Include="SpecFlow.xUnit" Version="3.9.40" />
Expand All @@ -25,7 +23,6 @@
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\common\Common.Bootstrapping\Common.Bootstrapping.csproj" />
<ProjectReference Include="..\Solid.Common\Solid.Common.csproj" />
<ProjectReference Include="..\Solid.IoC.Adapters.BoDi\Solid.IoC.Adapters.BoDi.csproj" />
<ProjectReference Include="..\Solid.Practices.Composition\Solid.Practices.Composition.csproj" />
Expand Down
18 changes: 18 additions & 0 deletions src/Solid.Practices.Composition/RuntimeAssemblyLoader.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.Loader;

namespace Solid.Practices.Composition
{
public static class RuntimeAssemblyLoader
{
public static IEnumerable<Assembly> Get(IEnumerable<string> files)
{
return files.Select(r =>
AssemblyLoadContext.Default.LoadFromAssemblyPath(Path.Combine(Directory.GetCurrentDirectory(), r))).ToArray();
}
}
}

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
Expand All @@ -15,6 +15,9 @@
<DebugType>full</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.Runtime.Loader" Version="4.3.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Solid.Common\Solid.Common.csproj" />
<ProjectReference Include="..\Solid.Core\Solid.Core.csproj" />
Expand Down
27 changes: 2 additions & 25 deletions src/Solid.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29311.281
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Practices", "Practices", "{11556FBE-83BE-4B8F-8DC1-17D2B4ED73BE}"
EndProject
Expand Down Expand Up @@ -121,8 +121,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Adapters", "Adapters", "{54
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Container", "Container", "{300E0BAB-14CC-4487-8849-399B37790A28}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Common.Bootstrapping", "common\Common.Bootstrapping\Common.Bootstrapping.csproj", "{6B7BA1AD-9792-4451-8DE3-A1059AEBBB62}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -897,26 +895,6 @@ Global
{D4B29EE9-000C-4A1F-A267-B17787BC426B}.Release|x64.Build.0 = Release|Any CPU
{D4B29EE9-000C-4A1F-A267-B17787BC426B}.Release|x86.ActiveCfg = Release|Any CPU
{D4B29EE9-000C-4A1F-A267-B17787BC426B}.Release|x86.Build.0 = Release|Any CPU
{6B7BA1AD-9792-4451-8DE3-A1059AEBBB62}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6B7BA1AD-9792-4451-8DE3-A1059AEBBB62}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6B7BA1AD-9792-4451-8DE3-A1059AEBBB62}.Debug|ARM.ActiveCfg = Debug|Any CPU
{6B7BA1AD-9792-4451-8DE3-A1059AEBBB62}.Debug|ARM.Build.0 = Debug|Any CPU
{6B7BA1AD-9792-4451-8DE3-A1059AEBBB62}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{6B7BA1AD-9792-4451-8DE3-A1059AEBBB62}.Debug|ARM64.Build.0 = Debug|Any CPU
{6B7BA1AD-9792-4451-8DE3-A1059AEBBB62}.Debug|x64.ActiveCfg = Debug|Any CPU
{6B7BA1AD-9792-4451-8DE3-A1059AEBBB62}.Debug|x64.Build.0 = Debug|Any CPU
{6B7BA1AD-9792-4451-8DE3-A1059AEBBB62}.Debug|x86.ActiveCfg = Debug|Any CPU
{6B7BA1AD-9792-4451-8DE3-A1059AEBBB62}.Debug|x86.Build.0 = Debug|Any CPU
{6B7BA1AD-9792-4451-8DE3-A1059AEBBB62}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6B7BA1AD-9792-4451-8DE3-A1059AEBBB62}.Release|Any CPU.Build.0 = Release|Any CPU
{6B7BA1AD-9792-4451-8DE3-A1059AEBBB62}.Release|ARM.ActiveCfg = Release|Any CPU
{6B7BA1AD-9792-4451-8DE3-A1059AEBBB62}.Release|ARM.Build.0 = Release|Any CPU
{6B7BA1AD-9792-4451-8DE3-A1059AEBBB62}.Release|ARM64.ActiveCfg = Release|Any CPU
{6B7BA1AD-9792-4451-8DE3-A1059AEBBB62}.Release|ARM64.Build.0 = Release|Any CPU
{6B7BA1AD-9792-4451-8DE3-A1059AEBBB62}.Release|x64.ActiveCfg = Release|Any CPU
{6B7BA1AD-9792-4451-8DE3-A1059AEBBB62}.Release|x64.Build.0 = Release|Any CPU
{6B7BA1AD-9792-4451-8DE3-A1059AEBBB62}.Release|x86.ActiveCfg = Release|Any CPU
{6B7BA1AD-9792-4451-8DE3-A1059AEBBB62}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -976,7 +954,6 @@ Global
{D4B29EE9-000C-4A1F-A267-B17787BC426B} = {227D7EA7-5EC6-49DF-872B-8D2E8B3726BB}
{54B1398B-D7CB-4207-B538-9E38C17699D4} = {C55CA8FA-D249-4EF0-BDA4-CB408A20256D}
{300E0BAB-14CC-4487-8849-399B37790A28} = {C55CA8FA-D249-4EF0-BDA4-CB408A20256D}
{6B7BA1AD-9792-4451-8DE3-A1059AEBBB62} = {1C712DFC-927F-43C0-B8DF-02ED6077B4A8}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {DF34B008-79AB-4162-ADC9-E6F970571414}
Expand Down