Skip to content

Commit de66a4c

Browse files
ayoungAaronontheweb
authored andcommitted
Combine projects to target multiple frameworks (#43)
* Combine target frameworks * Remove redundant projects
1 parent 22e3e9f commit de66a4c

18 files changed

+137
-411
lines changed

Lighthouse.sln

+5-11
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio 15
44
VisualStudioVersion = 15.0.26430.16
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lighthouse", "src\Lighthouse\Lighthouse.csproj", "{E945AABA-2779-41E8-9B43-8898FFD64F22}"
7-
EndProject
86
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lighthouse.Tests", "src\Lighthouse.Tests\Lighthouse.Tests.csproj", "{0F9B9BC6-9F86-40E8-BA9B-D27BF3AC7970}"
97
EndProject
108
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{183986D1-C1AB-4503-AF06-F2B04A4E51FA}"
@@ -15,26 +13,22 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{183986D1
1513
build.sh = build.sh
1614
EndProjectSection
1715
EndProject
18-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lighthouse.NetCoreApp", "src\Lighthouse.NetCoreApp\Lighthouse.NetCoreApp.csproj", "{68DA756A-9D3D-4C7E-AA07-8741D2DE0B95}"
16+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lighthouse", "src\Lighthouse\Lighthouse.csproj", "{5CA6B9E7-DAF2-47BD-9C91-7E979B4935A1}"
1917
EndProject
2018
Global
2119
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2220
Debug|Any CPU = Debug|Any CPU
2321
Release|Any CPU = Release|Any CPU
2422
EndGlobalSection
2523
GlobalSection(ProjectConfigurationPlatforms) = postSolution
26-
{E945AABA-2779-41E8-9B43-8898FFD64F22}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
27-
{E945AABA-2779-41E8-9B43-8898FFD64F22}.Debug|Any CPU.Build.0 = Debug|Any CPU
28-
{E945AABA-2779-41E8-9B43-8898FFD64F22}.Release|Any CPU.ActiveCfg = Release|Any CPU
29-
{E945AABA-2779-41E8-9B43-8898FFD64F22}.Release|Any CPU.Build.0 = Release|Any CPU
3024
{0F9B9BC6-9F86-40E8-BA9B-D27BF3AC7970}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
3125
{0F9B9BC6-9F86-40E8-BA9B-D27BF3AC7970}.Debug|Any CPU.Build.0 = Debug|Any CPU
3226
{0F9B9BC6-9F86-40E8-BA9B-D27BF3AC7970}.Release|Any CPU.ActiveCfg = Release|Any CPU
3327
{0F9B9BC6-9F86-40E8-BA9B-D27BF3AC7970}.Release|Any CPU.Build.0 = Release|Any CPU
34-
{68DA756A-9D3D-4C7E-AA07-8741D2DE0B95}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
35-
{68DA756A-9D3D-4C7E-AA07-8741D2DE0B95}.Debug|Any CPU.Build.0 = Debug|Any CPU
36-
{68DA756A-9D3D-4C7E-AA07-8741D2DE0B95}.Release|Any CPU.ActiveCfg = Release|Any CPU
37-
{68DA756A-9D3D-4C7E-AA07-8741D2DE0B95}.Release|Any CPU.Build.0 = Release|Any CPU
28+
{5CA6B9E7-DAF2-47BD-9C91-7E979B4935A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
29+
{5CA6B9E7-DAF2-47BD-9C91-7E979B4935A1}.Debug|Any CPU.Build.0 = Debug|Any CPU
30+
{5CA6B9E7-DAF2-47BD-9C91-7E979B4935A1}.Release|Any CPU.ActiveCfg = Release|Any CPU
31+
{5CA6B9E7-DAF2-47BD-9C91-7E979B4935A1}.Release|Any CPU.Build.0 = Release|Any CPU
3832
EndGlobalSection
3933
GlobalSection(SolutionProperties) = preSolution
4034
HideSolutionNode = FALSE

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
**Lighthouse** is a simple service-discovery tool for Akka.Cluster, designed to make it easier to place nice with PaaS deployments like Azure / Elastic Beanstalk / AppHarbor.
44

5-
## Running on .NET 4.5
5+
## Running on .NET 4.5.2
66

7-
Lighthouse runs on [Akka.NET](https://github.com/akkadotnet/akka.net) version 1.3.1, which supports .NET 4.5 and .NET Core 1.1/.NET Standard 1.6. To package the executable and run the .NET 4.5 version locally, clone this repo and build the `Lighthouse` project. Running Lighthouse.exe in a console should produce an output similar to this:
7+
Lighthouse runs on [Akka.NET](https://github.com/akkadotnet/akka.net) version 1.3.1, which supports .NET 4.5.2 and .NET Core 1.1/.NET Standard 1.6. To package the executable and run the .NET 4.5.2 version locally, clone this repo and build the `Lighthouse` project. Running Lighthouse.exe in a console should produce an output similar to this:
88

99
```
1010
Topshelf.HostFactory: Configuration Result:
@@ -15,7 +15,7 @@ Topshelf.HostFactory: Configuration Result:
1515
Topshelf.HostConfigurators.HostConfiguratorImpl: Topshelf v3.2.150.0, .NET Framework v4.0.30319.42000
1616
```
1717

18-
The Lighthouse .NET 4.5 project is built as a [Topshelf](https://github.com/Topshelf/Topshelf) service. This allows you to install Lighthouse as a Windows Service using a command like this:
18+
The Lighthouse .NET 4.5.2 project is built as a [Topshelf](https://github.com/Topshelf/Topshelf) service. This allows you to install Lighthouse as a Windows Service using a command like this:
1919

2020
```
2121
Lighthouse.exe install --localsystem --autostart
@@ -25,14 +25,14 @@ See the Topshelf documentation for more info on command line arguments for insta
2525

2626
# Running on .NET Core
2727

28-
Lighthouse also includes a .NET Core-compatible version under a separate project named `Lighthouse.NetCoreApp`. This project does not build as a Topshelf web service. You have 2 ways that you can run this version:
28+
Lighthouse also targets the .NET Core 1.1 framework. When building for this target framwork it does not get built as a Topshelf windows service. You have 2 ways that you can run this version:
2929

3030
- using the .NET CLI
3131
- building the project as a standalone .exe for your specific [runtime identifier](https://docs.microsoft.com/en-us/dotnet/core/rid-catalog)
3232

3333
#### Using the .NET CLI
3434

35-
Build the project either in Visual Studio 2017 or using `dotnet build -c Release Lighthouse.NetCoreApp.csproj`. This will output `Lighthouse.NetCoreApp.dll` in your `bin/Release` folder. From there, running `dotnet ./Lighthouse.NetCoreApp.dll` will start Lighthouse. Pressing `Enter` will exit.
35+
Build the project either in Visual Studio 2017 or using `dotnet build -c Release --framework netcoreapp1.1 Lighthouse.csproj`. This will output `Lighthouse.dll` in your `bin/Release/netcoreapp1.1` folder. From there, running `dotnet run ./Lighthouse.csproj --framework netcoreapp1.1` will start Lighthouse. Pressing `Enter` will exit.
3636

3737
#### Building the project as an .exe
3838

@@ -56,5 +56,5 @@ bin/
5656
netcoreapp1.1/
5757
win7-x64/
5858
publish/
59-
Lighthouse.NetCoreApp.exe
59+
Lighthouse.exe
6060
```

src/Lighthouse.NetCoreApp/App.config

-42
This file was deleted.

src/Lighthouse.NetCoreApp/Lighthouse.NetCoreApp.csproj

-26
This file was deleted.

src/Lighthouse.NetCoreApp/LighthouseHostFactory.cs

-99
This file was deleted.

src/Lighthouse.NetCoreApp/LighthouseService.cs

-44
This file was deleted.

src/Lighthouse.NetCoreApp/NLog.config

-13
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<Import Project="..\common.props" />
3-
4-
<PropertyGroup>
5-
<TargetFramework>net45</TargetFramework>
3+
<PropertyGroup>
4+
<TargetFramework>net452</TargetFramework>
65
</PropertyGroup>
7-
86
<ItemGroup>
97
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
10-
<PackageReference Include="xunit" Version="$(XunitVersion)" />
118
<DotNetCliToolReference Include="dotnet-xunit" Version="$(XunitVersion)" />
9+
<PackageReference Include="xunit" Version="2.3.1" />
1210
</ItemGroup>
13-
1411
<ItemGroup>
1512
<ProjectReference Include="..\Lighthouse\Lighthouse.csproj" />
1613
</ItemGroup>
17-
18-
</Project>
14+
</Project>

src/Lighthouse/App.config

-42
This file was deleted.

0 commit comments

Comments
 (0)