Skip to content

Commit 82d8ece

Browse files
Added another example project that adds MicroService4Net from nuget.
1 parent 24cdb9c commit 82d8ece

10 files changed

Lines changed: 232 additions & 5 deletions

File tree

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,6 @@ packages/*
99
.hgignore
1010
MicroService4Net.sln.DotSettings.user
1111
.vs/MicroService4Net/v14/.suo
12-
MicroService4Net.Example/MicroService4Net.Example.csproj.user
12+
MicroService4Net.Example/MicroService4Net.Example.csproj.user
13+
MicroService4Net.Example.FromNuget/bin/*
14+
MicroService4Net.Example.FromNuget/obj/*
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
5+
</startup>
6+
<runtime>
7+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
8+
<dependentAssembly>
9+
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
10+
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
11+
</dependentAssembly>
12+
<dependentAssembly>
13+
<assemblyIdentity name="Microsoft.Owin.Hosting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
14+
<bindingRedirect oldVersion="0.0.0.0-2.0.2.0" newVersion="2.0.2.0" />
15+
</dependentAssembly>
16+
<dependentAssembly>
17+
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
18+
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
19+
</dependentAssembly>
20+
<dependentAssembly>
21+
<assemblyIdentity name="System.Web.Cors" publicKeyToken="31bf3856ad364e35" culture="neutral" />
22+
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
23+
</dependentAssembly>
24+
</assemblyBinding>
25+
</runtime>
26+
</configuration>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using System.Web.Http;
2+
3+
namespace MicroService4Net.Example.FromNuget
4+
{
5+
public class ExampleController : ApiController
6+
{
7+
[Route("Example")]
8+
public IHttpActionResult GetExample()
9+
{
10+
return Ok(new { Msg = "Example" });
11+
}
12+
}
13+
}
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{3B12467F-4793-45A5-B3AA-7EB2EACFD15D}</ProjectGuid>
8+
<OutputType>Exe</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>MicroService4Net.Example.FromNuget</RootNamespace>
11+
<AssemblyName>MicroService4Net.Example.FromNuget</AssemblyName>
12+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
</PropertyGroup>
15+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
16+
<PlatformTarget>AnyCPU</PlatformTarget>
17+
<DebugSymbols>true</DebugSymbols>
18+
<DebugType>full</DebugType>
19+
<Optimize>false</Optimize>
20+
<OutputPath>bin\Debug\</OutputPath>
21+
<DefineConstants>DEBUG;TRACE</DefineConstants>
22+
<ErrorReport>prompt</ErrorReport>
23+
<WarningLevel>4</WarningLevel>
24+
</PropertyGroup>
25+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
26+
<PlatformTarget>AnyCPU</PlatformTarget>
27+
<DebugType>pdbonly</DebugType>
28+
<Optimize>true</Optimize>
29+
<OutputPath>bin\Release\</OutputPath>
30+
<DefineConstants>TRACE</DefineConstants>
31+
<ErrorReport>prompt</ErrorReport>
32+
<WarningLevel>4</WarningLevel>
33+
</PropertyGroup>
34+
<ItemGroup>
35+
<Reference Include="MicroService4Net, Version=2.0.5948.28056, Culture=neutral, processorArchitecture=MSIL">
36+
<HintPath>..\packages\MicroService4Net.2.0.5948.28056\lib\net45\MicroService4Net.dll</HintPath>
37+
<Private>True</Private>
38+
</Reference>
39+
<Reference Include="Microsoft.Owin, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
40+
<HintPath>..\packages\Microsoft.Owin.3.0.1\lib\net45\Microsoft.Owin.dll</HintPath>
41+
<Private>True</Private>
42+
</Reference>
43+
<Reference Include="Microsoft.Owin.Cors, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
44+
<HintPath>..\packages\Microsoft.Owin.Cors.3.0.1\lib\net45\Microsoft.Owin.Cors.dll</HintPath>
45+
<Private>True</Private>
46+
</Reference>
47+
<Reference Include="Microsoft.Owin.Host.HttpListener, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
48+
<HintPath>..\packages\Microsoft.Owin.Host.HttpListener.3.0.1\lib\net45\Microsoft.Owin.Host.HttpListener.dll</HintPath>
49+
<Private>True</Private>
50+
</Reference>
51+
<Reference Include="Microsoft.Owin.Hosting, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
52+
<HintPath>..\packages\Microsoft.Owin.Hosting.3.0.1\lib\net45\Microsoft.Owin.Hosting.dll</HintPath>
53+
<Private>True</Private>
54+
</Reference>
55+
<Reference Include="Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
56+
<HintPath>..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
57+
<Private>True</Private>
58+
</Reference>
59+
<Reference Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
60+
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
61+
<Private>True</Private>
62+
</Reference>
63+
<Reference Include="System" />
64+
<Reference Include="System.Configuration.Install" />
65+
<Reference Include="System.Core" />
66+
<Reference Include="System.Net.Http.Formatting, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
67+
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll</HintPath>
68+
<Private>True</Private>
69+
</Reference>
70+
<Reference Include="System.ServiceProcess" />
71+
<Reference Include="System.Web.Cors, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
72+
<HintPath>..\packages\Microsoft.AspNet.Cors.5.2.3\lib\net45\System.Web.Cors.dll</HintPath>
73+
<Private>True</Private>
74+
</Reference>
75+
<Reference Include="System.Web.Http, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
76+
<HintPath>..\packages\Microsoft.AspNet.WebApi.Core.5.2.3\lib\net45\System.Web.Http.dll</HintPath>
77+
<Private>True</Private>
78+
</Reference>
79+
<Reference Include="System.Web.Http.Owin, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
80+
<HintPath>..\packages\Microsoft.AspNet.WebApi.Owin.5.2.3\lib\net45\System.Web.Http.Owin.dll</HintPath>
81+
<Private>True</Private>
82+
</Reference>
83+
<Reference Include="System.Xml.Linq" />
84+
<Reference Include="System.Data.DataSetExtensions" />
85+
<Reference Include="Microsoft.CSharp" />
86+
<Reference Include="System.Data" />
87+
<Reference Include="System.Net.Http" />
88+
<Reference Include="System.Xml" />
89+
</ItemGroup>
90+
<ItemGroup>
91+
<Compile Include="ExampleController.cs" />
92+
<Compile Include="Program.cs" />
93+
<Compile Include="Properties\AssemblyInfo.cs" />
94+
<Compile Include="ServiceInternalClasses.cs">
95+
<SubType>Component</SubType>
96+
</Compile>
97+
</ItemGroup>
98+
<ItemGroup>
99+
<None Include="App.config" />
100+
<None Include="packages.config" />
101+
</ItemGroup>
102+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
103+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
104+
Other similar extension points exist, see Microsoft.Common.targets.
105+
<Target Name="BeforeBuild">
106+
</Target>
107+
<Target Name="AfterBuild">
108+
</Target>
109+
-->
110+
</Project>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
namespace MicroService4Net.Example.FromNuget
2+
{
3+
class Program
4+
{
5+
static void Main(string[] args)
6+
{
7+
var microService = new MicroService();
8+
microService.Run(args);
9+
}
10+
}
11+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// General Information about an assembly is controlled through the following
6+
// set of attributes. Change these attribute values to modify the information
7+
// associated with an assembly.
8+
[assembly: AssemblyTitle("MicroService4Net.Example.FromNuget")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("MicroService4Net.Example.FromNuget")]
13+
[assembly: AssemblyCopyright("Copyright © 2016")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Setting ComVisible to false makes the types in this assembly not visible
18+
// to COM components. If you need to access a type in this assembly from
19+
// COM, set the ComVisible attribute to true on that type.
20+
[assembly: ComVisible(false)]
21+
22+
// The following GUID is for the ID of the typelib if this project is exposed to COM
23+
[assembly: Guid("3b12467f-4793-45a5-b3aa-7eb2eacfd15d")]
24+
25+
// Version information for an assembly consists of the following four values:
26+
//
27+
// Major Version
28+
// Minor Version
29+
// Build Number
30+
// Revision
31+
//
32+
// You can specify all the values or you can default the Build and Revision Numbers
33+
// by using the '*' as shown below:
34+
// [assembly: AssemblyVersion("1.0.*")]
35+
[assembly: AssemblyVersion("1.0.0.0")]
36+
[assembly: AssemblyFileVersion("1.0.0.0")]
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+

2+
using MicroService4Net.ServiceInternals;
3+
4+
namespace MicroService4Net.Example.FromNuget
5+
{
6+
public class MicroServiceInstaller : ProjectInstaller { }
7+
public class MicroServiceService : InternalService { }
8+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="MicroService4Net" version="2.0.5948.28056" targetFramework="net45" />
4+
<package id="Microsoft.AspNet.Cors" version="5.2.3" targetFramework="net45" />
5+
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net45" />
6+
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net45" />
7+
<package id="Microsoft.AspNet.WebApi.Owin" version="5.2.3" targetFramework="net45" />
8+
<package id="Microsoft.AspNet.WebApi.OwinSelfHost" version="5.2.3" targetFramework="net45" />
9+
<package id="Microsoft.Owin" version="3.0.1" targetFramework="net45" />
10+
<package id="Microsoft.Owin.Cors" version="3.0.1" targetFramework="net45" />
11+
<package id="Microsoft.Owin.Host.HttpListener" version="3.0.1" targetFramework="net45" />
12+
<package id="Microsoft.Owin.Hosting" version="3.0.1" targetFramework="net45" />
13+
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net45" />
14+
<package id="Owin" version="1.0" targetFramework="net45" />
15+
</packages>

MicroService4Net.sln

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 2013
4-
VisualStudioVersion = 12.0.30501.0
3+
# Visual Studio 14
4+
VisualStudioVersion = 14.0.23107.0
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MicroService4Net", "microservice4net\MicroService4Net.csproj", "{A3CD548B-DB44-4237-90EF-23663145BED9}"
77
EndProject
88
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MicroService4Net.Example", "MicroService4Net.Example\MicroService4Net.Example.csproj", "{CCEA93C4-58A8-49E1-89FC-D0C8C9A14343}"
99
EndProject
10+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MicroService4Net.Example.FromNuget", "MicroService4Net.Example.FromNuget\MicroService4Net.Example.FromNuget.csproj", "{3B12467F-4793-45A5-B3AA-7EB2EACFD15D}"
11+
EndProject
1012
Global
1113
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1214
Debug|Any CPU = Debug|Any CPU
@@ -21,6 +23,10 @@ Global
2123
{CCEA93C4-58A8-49E1-89FC-D0C8C9A14343}.Debug|Any CPU.Build.0 = Debug|Any CPU
2224
{CCEA93C4-58A8-49E1-89FC-D0C8C9A14343}.Release|Any CPU.ActiveCfg = Release|Any CPU
2325
{CCEA93C4-58A8-49E1-89FC-D0C8C9A14343}.Release|Any CPU.Build.0 = Release|Any CPU
26+
{3B12467F-4793-45A5-B3AA-7EB2EACFD15D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
27+
{3B12467F-4793-45A5-B3AA-7EB2EACFD15D}.Debug|Any CPU.Build.0 = Debug|Any CPU
28+
{3B12467F-4793-45A5-B3AA-7EB2EACFD15D}.Release|Any CPU.ActiveCfg = Release|Any CPU
29+
{3B12467F-4793-45A5-B3AA-7EB2EACFD15D}.Release|Any CPU.Build.0 = Release|Any CPU
2430
EndGlobalSection
2531
GlobalSection(SolutionProperties) = preSolution
2632
HideSolutionNode = FALSE

MicroService4Net/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
// set of attributes. Change these attribute values to modify the information
77
// associated with an assembly.
88
[assembly: AssemblyTitle("MicroService4Net")]
9-
[assembly: AssemblyDescription("Make Micro Service")]
9+
[assembly: AssemblyDescription("Create Micro Service")]
1010
[assembly: AssemblyConfiguration("")]
1111
[assembly: AssemblyCompany("")]
1212
[assembly: AssemblyProduct("MicroService4Net")]
13-
[assembly: AssemblyCopyright("Copyright Code Cleaner© 2015")]
13+
[assembly: AssemblyCopyright("Copyright Code Cleaner© 2016")]
1414
[assembly: AssemblyTrademark("")]
1515
[assembly: AssemblyCulture("")]
1616

0 commit comments

Comments
 (0)