Skip to content

Commit c44377d

Browse files
committed
Replace existing .NET Core test projects with new names
1 parent c67fe83 commit c44377d

21 files changed

Lines changed: 246 additions & 101 deletions

File tree

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="14.0.25420" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0.25420</VisualStudioVersion>
5+
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
6+
</PropertyGroup>
7+
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
8+
<PropertyGroup Label="Globals">
9+
<ProjectGuid>07b9689d-97ce-4178-a7e0-e4e72a74fd07</ProjectGuid>
10+
<RootNamespace>ServiceStack.Common</RootNamespace>
11+
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
12+
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
13+
</PropertyGroup>
14+
15+
<PropertyGroup>
16+
<SchemaVersion>2.0</SchemaVersion>
17+
</PropertyGroup>
18+
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
19+
</Project>

src/ServiceStack.Core.Console/Program.cs

Lines changed: 0 additions & 21 deletions
This file was deleted.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.IO;
4+
using System.Linq;
5+
using System.Threading.Tasks;
6+
using Microsoft.AspNetCore.Hosting;
7+
8+
namespace ServiceStack.Core.SelfHost
9+
{
10+
public class Program
11+
{
12+
public static void Main(string[] args)
13+
{
14+
var host = new WebHostBuilder()
15+
.UseKestrel()
16+
.UseContentRoot(Directory.GetCurrentDirectory())
17+
.UseStartup<Startup>()
18+
.UseUrls("http://localhost:55000/")
19+
.Build();
20+
21+
host.Run();
22+
}
23+
}
24+
}

src/ServiceStack.Core.Console/Properties/AssemblyInfo.cs renamed to src/ServiceStack.Core.SelfHost/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// associated with an assembly.
88
[assembly: AssemblyConfiguration("")]
99
[assembly: AssemblyCompany("")]
10-
[assembly: AssemblyProduct("ServiceStack.Core.Console")]
10+
[assembly: AssemblyProduct("ServiceStack.Core.SelfHost")]
1111
[assembly: AssemblyTrademark("")]
1212

1313
// Setting ComVisible to false makes the types in this assembly not visible
@@ -16,4 +16,4 @@
1616
[assembly: ComVisible(false)]
1717

1818
// The following GUID is for the ID of the typelib if this project is exposed to COM
19-
[assembly: Guid("fd4ed186-88c0-4be0-9c2b-d88c8a265e8c")]
19+
[assembly: Guid("c59feb65-d1fb-477f-b9f9-7cc2c7397d1a")]
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
5+
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
6+
</PropertyGroup>
7+
8+
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
9+
<PropertyGroup Label="Globals">
10+
<ProjectGuid>c59feb65-d1fb-477f-b9f9-7cc2c7397d1a</ProjectGuid>
11+
<RootNamespace>ServiceStack.Core.SelfHost</RootNamespace>
12+
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
13+
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
14+
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
15+
</PropertyGroup>
16+
17+
<PropertyGroup>
18+
<SchemaVersion>2.0</SchemaVersion>
19+
</PropertyGroup>
20+
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
21+
</Project>
Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,14 @@
1414
using ServiceStack;
1515
using ServiceStack.Logging;
1616
using Funq;
17+
using ServiceStack.Host;
18+
using ServiceStack.Text;
19+
1720
using Microsoft.AspNetCore.Http.Extensions;
1821
using Microsoft.AspNetCore.Http.Internal;
1922
using Microsoft.Extensions.Primitives;
20-
using ServiceStack.Host;
21-
using ServiceStack.Text;
2223

23-
namespace ServiceStack.Core.Tests
24+
namespace ServiceStack.Core.SelfHost
2425
{
2526
public class Startup
2627
{
@@ -40,13 +41,6 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
4041
app.UseDeveloperExceptionPage();
4142
}
4243

43-
//var dll = GetType().GetAssembly();
44-
//var dllPath = GetType().GetAssemblyPath();
45-
//Path.GetFullPath()
46-
//(env.WebRootPath + ":" + env.ContentRootPath).Print();
47-
48-
var cwd = Directory.GetCurrentDirectory();
49-
5044
app.UseServiceStack(new AppHost());
5145

5246
app.Run(async context =>
@@ -56,7 +50,7 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
5650
});
5751
}
5852
}
59-
53+
6054

6155
[Route("/hello/{Name}")]
6256
public class Hello
File renamed without changes.
File renamed without changes.

src/ServiceStack.Core.Tests/web.config

Lines changed: 0 additions & 12 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using System.Threading.Tasks;
66
using Microsoft.AspNetCore.Hosting;
77

8-
namespace ServiceStack.Core.Tests
8+
namespace ServiceStack.Core.WebApp
99
{
1010
public class Program
1111
{

0 commit comments

Comments
 (0)