Skip to content

Commit 27dea98

Browse files
committed
Target framework
1 parent 1334210 commit 27dea98

File tree

5 files changed

+22
-2
lines changed

5 files changed

+22
-2
lines changed

src/PluginFramework.sln

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PluginFrameworkTestBed", ".
7373
EndProject
7474
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Weikio.PluginFramework.AspNetCore.IntegrationTests", "..\tests\integration\Weikio.PluginFramework.AspNetCore.IntegrationTests\Weikio.PluginFramework.AspNetCore.IntegrationTests.csproj", "{7AA40D04-0826-4F4A-9028-2270BAED0B9B}"
7575
EndProject
76+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Weikio.NugetDownloader", "..\..\NugetDownloader\src\Weikio.NugetDownloader\Weikio.NugetDownloader.csproj", "{C2FF06BB-BBF2-44CD-8FE0-2998B7419536}"
77+
EndProject
7678
Global
7779
GlobalSection(SolutionConfigurationPlatforms) = preSolution
7880
Debug|Any CPU = Debug|Any CPU
@@ -199,6 +201,10 @@ Global
199201
{7AA40D04-0826-4F4A-9028-2270BAED0B9B}.Debug|Any CPU.Build.0 = Debug|Any CPU
200202
{7AA40D04-0826-4F4A-9028-2270BAED0B9B}.Release|Any CPU.ActiveCfg = Release|Any CPU
201203
{7AA40D04-0826-4F4A-9028-2270BAED0B9B}.Release|Any CPU.Build.0 = Release|Any CPU
204+
{C2FF06BB-BBF2-44CD-8FE0-2998B7419536}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
205+
{C2FF06BB-BBF2-44CD-8FE0-2998B7419536}.Debug|Any CPU.Build.0 = Debug|Any CPU
206+
{C2FF06BB-BBF2-44CD-8FE0-2998B7419536}.Release|Any CPU.ActiveCfg = Release|Any CPU
207+
{C2FF06BB-BBF2-44CD-8FE0-2998B7419536}.Release|Any CPU.Build.0 = Release|Any CPU
202208
EndGlobalSection
203209
GlobalSection(SolutionProperties) = preSolution
204210
HideSolutionNode = FALSE

src/Weikio.PluginFramework.Catalogs.NuGet/NugetPackagePluginCatalog.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public async Task Initialize()
9595
var nuGetDownloader = new NuGetDownloader(_options.LoggerFactory());
9696

9797
var nugetDownloadResult = await nuGetDownloader.DownloadAsync(PackagesFolder, _packageName, _packageVersion, _includePrerelease, _packageFeed,
98-
includeSecondaryRepositories: _options.IncludeSystemFeedsAsSecondary).ConfigureAwait(false);
98+
includeSecondaryRepositories: _options.IncludeSystemFeedsAsSecondary, targetFramework: _options.TargetFramework).ConfigureAwait(false);
9999

100100
foreach (var f in nugetDownloadResult.PackageAssemblyFiles)
101101
{

src/Weikio.PluginFramework.Catalogs.NuGet/NugetPluginCatalogOptions.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ public class NugetPluginCatalogOptions
2828
/// Gets or sets if system feeds should be used as secondary feeds for finding packages when feed url is defined.
2929
/// </summary>
3030
public bool IncludeSystemFeedsAsSecondary { get; set; } = false;
31+
32+
/// <summary>
33+
/// Gets or sets the target platform. If not set, EntryAssembly's target framework is used.
34+
/// </summary>
35+
public string TargetFramework { get; set; } = Defaults.TargetFramework;
3136

3237
public static class Defaults
3338
{
@@ -36,7 +41,15 @@ public static class Defaults
3641
/// </summary>
3742
public static Func<ILogger> LoggerFactory { get; set; } = () => new ConsoleLogger();
3843

44+
/// <summary>
45+
/// Gets or sets the default of how the plugin names and version should be defined. <seealso cref="PluginNameOptions"/>.
46+
/// </summary>
3947
public static PluginNameOptions PluginNameOptions { get; set; } = new PluginNameOptions();
48+
49+
/// <summary>
50+
/// Gets or sets the default target platform. If not set, EntryAssembly's target framework is used.
51+
/// </summary>
52+
public static string TargetFramework { get; set; } = string.Empty;
4053
}
4154
}
4255
}

src/Weikio.PluginFramework.Catalogs.NuGet/Weikio.PluginFramework.Catalogs.NuGet.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
</ItemGroup>
2121

2222
<ItemGroup>
23+
<ProjectReference Include="..\..\..\NugetDownloader\src\Weikio.NugetDownloader\Weikio.NugetDownloader.csproj" />
2324
<ProjectReference Include="..\Weikio.PluginFramework.Abstractions\Weikio.PluginFramework.Abstractions.csproj" />
2425
<ProjectReference Include="..\Weikio.PluginFramework\Weikio.PluginFramework.csproj" />
2526
</ItemGroup>

src/Weikio.PluginFramework/Context/PluginAssemblyLoadContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ private bool LoadHostApplicationAssembly(AssemblyName assemblyName)
181181
{
182182
try
183183
{
184-
Default.LoadFromAssemblyName(assemblyName);
184+
var asm = Default.LoadFromAssemblyName(assemblyName);
185185

186186
return true;
187187
}

0 commit comments

Comments
 (0)