Skip to content

Commit

Permalink
Update the sample to target net5 (#4096)
Browse files Browse the repository at this point in the history
* Update the sample to target netcoreapp3.1

It generates warnings because it targets out-of-support 3.0

* Update to .NET 5

The CI seems to only support .NET 5 and it doesn't really matter for the sample if it's 3.1 or 5.

* Update readme accordingly
  • Loading branch information
vitek-karas authored Jan 11, 2021
1 parent de72504 commit 03fb38a
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>net5</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
12 changes: 6 additions & 6 deletions core/extensions/AppWithPlugin/AppWithPlugin/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ static void Main(string[] args)

string[] pluginPaths = new string[]
{
@"HelloPlugin\bin\Debug\netcoreapp3.0\HelloPlugin.dll",
@"JsonPlugin\bin\Debug\netcoreapp3.0\JsonPlugin.dll",
@"XcopyablePlugin\bin\Debug\netcoreapp3.0\XcopyablePlugin.dll",
@"OldJsonPlugin\bin\Debug\netcoreapp2.1\OldJsonPlugin.dll",
@"FrenchPlugin\bin\Debug\netcoreapp2.1\FrenchPlugin.dll",
@"UVPlugin\bin\Debug\netcoreapp2.1\UVPlugin.dll",
@"HelloPlugin\bin\Debug\net5\HelloPlugin.dll",
@"JsonPlugin\bin\Debug\net5\JsonPlugin.dll",
@"XcopyablePlugin\bin\Debug\net5\XcopyablePlugin.dll",
@"OldJsonPlugin\bin\Debug\net5\OldJsonPlugin.dll",
@"FrenchPlugin\bin\Debug\net5\FrenchPlugin.dll",
@"UVPlugin\bin\Debug\net5\UVPlugin.dll",
};

IEnumerable<ICommand> commands = pluginPaths.SelectMany(pluginPath =>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>net5</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>net5</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion core/extensions/AppWithPlugin/JsonPlugin/JsonPlugin.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>net5</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>net5</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion core/extensions/AppWithPlugin/PluginBase/PluginBase.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>net5</TargetFramework>
</PropertyGroup>

</Project>
4 changes: 2 additions & 2 deletions core/extensions/AppWithPlugin/ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ By using `AssemblyDependencyResolver` along with a custom `AssemblyLoadContext`,

## Build and Run

1. Install .NET Core 3.0 Preview 2 or newer.
2. Use the .NET Core SDK to build the project via `dotnet build`.
1. Install .NET 5 or newer. The sample targets .NET 5, but support for all the features it uses was added in .NET Core 3.0.
2. Use the .NET SDK to build the project via `dotnet build`.
- The AppWithPlugin project does not contain any references to the plugin projects, so you need to build the solution.
3. Go to the AppWithPlugin directory and use `dotnet run` to run the app.
- You should see the app output a list of installed commands.
Expand Down
2 changes: 1 addition & 1 deletion core/extensions/AppWithPlugin/UVPlugin/UVPlugin.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>net5</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>net5</TargetFramework>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>

Expand Down

0 comments on commit 03fb38a

Please sign in to comment.