Skip to content

Commit 553dd5c

Browse files
committed
Change Mvc.Core.Tests to use PackageReferences since lib refs don't work in .NET Core 1.1
1 parent e372618 commit 553dd5c

5 files changed

Lines changed: 43 additions & 9 deletions

File tree

src/ServiceStack.Core.sln

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio 15
4-
VisualStudioVersion = 15.0.26403.7
4+
VisualStudioVersion = 15.0.26430.6
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Hosts", "Hosts", "{43C8BF0C-1B57-4B1F-A5D2-6010B93C791A}"
77
EndProject
88
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{FA46AB18-F252-43F5-BEBC-12700EBC90A4}"
99
ProjectSection(SolutionItems) = preProject
10-
..\build\build-core.sh = ..\build\build-core.sh
11-
..\lib\copy-netcore.bat = ..\lib\copy-netcore.bat
12-
..\lib\netstandard1.3\copy.bat = ..\lib\netstandard1.3\copy.bat
13-
..\build\publish-core.sh = ..\build\publish-core.sh
10+
..\lib\copy.bat = ..\lib\copy.bat
1411
..\NuGet.Core\ServiceStack.Api.Swagger.Core\ServiceStack.Api.Swagger.Core.nuspec = ..\NuGet.Core\ServiceStack.Api.Swagger.Core\ServiceStack.Api.Swagger.Core.nuspec
1512
..\NuGet.Core\ServiceStack.Client.Core\ServiceStack.Client.Core.nuspec = ..\NuGet.Core\ServiceStack.Client.Core\ServiceStack.Client.Core.nuspec
1613
..\NuGet.Core\ServiceStack.Common.Core\ServiceStack.Common.Core.nuspec = ..\NuGet.Core\ServiceStack.Common.Core\ServiceStack.Common.Core.nuspec

tests/Mvc.Core.Tests/Mvc.Core.Tests.csproj

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</ItemGroup>
1818

1919
<ItemGroup>
20-
<Reference Include="..\..\lib\netstandard1.1\ServiceStack.Interfaces.dll" />
20+
<!--<Reference Include="..\..\lib\netstandard1.1\ServiceStack.Interfaces.dll" />
2121
<Reference Include="..\..\lib\netstandard1.3\ServiceStack.Text.dll" />
2222
<Reference Include="..\..\lib\netstandard1.3\ServiceStack.Redis.dll" />
2323
<Reference Include="..\..\lib\netstandard1.3\ServiceStack.OrmLite.dll" />
@@ -28,7 +28,18 @@
2828
<ProjectReference Include="..\..\src\ServiceStack.HttpClient\ServiceStack.HttpClient.csproj" />
2929
<ProjectReference Include="..\..\src\ServiceStack.Common\ServiceStack.Common.csproj" />
3030
<ProjectReference Include="..\..\src\ServiceStack.Mvc\ServiceStack.Mvc.csproj" />
31-
<ProjectReference Include="..\..\src\ServiceStack.Server\ServiceStack.Server.csproj" />
31+
<ProjectReference Include="..\..\src\ServiceStack.Server\ServiceStack.Server.csproj" />-->
32+
33+
<PackageReference Include="ServiceStack.Interface.Core" Version="1.0.42" />
34+
<PackageReference Include="ServiceStack.Redis.Core" Version="1.0.42" />
35+
<PackageReference Include="ServiceStack.OrmLite.Core" Version="1.0.42" />
36+
<PackageReference Include="ServiceStack.OrmLite.Sqlite.Core" Version="1.0.42" />
37+
<PackageReference Include="ServiceStack.Core" Version="1.0.42" />
38+
<PackageReference Include="ServiceStack.Client.Core" Version="1.0.42" />
39+
<PackageReference Include="ServiceStack.HttpClient.Core" Version="1.0.42" />
40+
<PackageReference Include="ServiceStack.Common.Core" Version="1.0.42" />
41+
<PackageReference Include="ServiceStack.Mvc.Core" Version="1.0.42" />
42+
<PackageReference Include="ServiceStack.Server.Core" Version="1.0.42" />
3243

3344
<PackageReference Include="Microsoft.AspNetCore" Version="1.1.1" />
3445
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.2" />
@@ -39,13 +50,14 @@
3950
<PackageReference Include="Microsoft.AspNetCore.Server.IISIntegration" Version="1.1.1" />
4051
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="1.1.1" />
4152
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.1.1" />
53+
<PackageReference Include="Microsoft.Extensions.Primitives" Version="1.1.1" />
4254
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="1.1.1" />
4355
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="1.1.1" />
4456
<PackageReference Include="Microsoft.Extensions.Logging" Version="1.1.1" />
4557
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.1.1" />
4658
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.1.1" />
4759
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="1.1.1" />
48-
<PackageReference Include="Microsoft.Data.Sqlite" Version="1.0.1" />
60+
<PackageReference Include="Microsoft.Data.Sqlite" Version="1.1.1" />
4961
<PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="1.1.0" />
5062
</ItemGroup>
5163

tests/Mvc.Core.Tests/Startup.cs

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,25 @@ public object Any(Hello request) =>
105105
new HelloResponse { Result = $"Hello, {request.Name ?? "World"}!" };
106106
}
107107

108+
public class Test
109+
{
110+
public string ExternalId { get; set; }
111+
}
112+
113+
[Route("/test")]
114+
public class TestGet : IGet, IReturn<Test>
115+
{
116+
}
117+
118+
public class TestService : Service
119+
{
120+
public Test Get(TestGet request)
121+
{
122+
var test = new Test { ExternalId = "abc" };
123+
return test;
124+
}
125+
}
126+
108127
class AppHost : AppHostBase
109128
{
110129
public AppHost() : base("ServiceStack + MVC Integration", typeof(MyServices).GetAssembly()) {}
@@ -113,7 +132,7 @@ public override void Configure(Container container)
113132
{
114133
SetConfig(new HostConfig
115134
{
116-
//HandlerFactoryPath = "api"
135+
HandlerFactoryPath = "api"
117136
});
118137

119138
Plugins.Add(new RazorFormat());
File renamed without changes.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
@model Test
2+
3+
<h1>Test.cshtml</h1>
4+
5+
<p>@Model.ExternalId</p>
6+

0 commit comments

Comments
 (0)