Skip to content

Commit

Permalink
aspnet example with net472 (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
fw2568 authored May 5, 2021
1 parent 10d8bae commit 7eba100
Show file tree
Hide file tree
Showing 10 changed files with 108 additions and 18 deletions.
20 changes: 19 additions & 1 deletion YaNco.sln
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "netcore2.1", "netcore2.1",
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebApi.Shared", "samples\WebApi.Shared\WebApi.Shared.csproj", "{BAFF7A74-DB10-45D9-A3CB-827239599D88}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SAPWebAPI", "samples\netcore2.1\SAPWebAPI\SAPWebAPI.csproj", "{89240742-3F31-4BA5-89A6-81C0CA6AE451}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SAPWebAPI", "samples\netcore2.1\SAPWebAPI\SAPWebAPI.csproj", "{89240742-3F31-4BA5-89A6-81C0CA6AE451}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SAPWebAPI", "samples\netcore3.1\SAPWebAPI\SAPWebAPI.csproj", "{90FDEB6C-05A9-45FF-A566-0230CA724235}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "net472", "net472", "{0B7CE0F5-179E-41BA-BBAC-5E9001550E43}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SAPWebAPI", "samples\net472\SAPWebAPI\SAPWebAPI.csproj", "{427D3A36-64DA-42F7-B406-95B7078F50EB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -151,6 +155,18 @@ Global
{90FDEB6C-05A9-45FF-A566-0230CA724235}.Release|x64.Build.0 = Release|Any CPU
{90FDEB6C-05A9-45FF-A566-0230CA724235}.Release|x86.ActiveCfg = Release|Any CPU
{90FDEB6C-05A9-45FF-A566-0230CA724235}.Release|x86.Build.0 = Release|Any CPU
{427D3A36-64DA-42F7-B406-95B7078F50EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{427D3A36-64DA-42F7-B406-95B7078F50EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{427D3A36-64DA-42F7-B406-95B7078F50EB}.Debug|x64.ActiveCfg = Debug|Any CPU
{427D3A36-64DA-42F7-B406-95B7078F50EB}.Debug|x64.Build.0 = Debug|Any CPU
{427D3A36-64DA-42F7-B406-95B7078F50EB}.Debug|x86.ActiveCfg = Debug|Any CPU
{427D3A36-64DA-42F7-B406-95B7078F50EB}.Debug|x86.Build.0 = Debug|Any CPU
{427D3A36-64DA-42F7-B406-95B7078F50EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{427D3A36-64DA-42F7-B406-95B7078F50EB}.Release|Any CPU.Build.0 = Release|Any CPU
{427D3A36-64DA-42F7-B406-95B7078F50EB}.Release|x64.ActiveCfg = Release|Any CPU
{427D3A36-64DA-42F7-B406-95B7078F50EB}.Release|x64.Build.0 = Release|Any CPU
{427D3A36-64DA-42F7-B406-95B7078F50EB}.Release|x86.ActiveCfg = Release|Any CPU
{427D3A36-64DA-42F7-B406-95B7078F50EB}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -161,6 +177,8 @@ Global
{BAFF7A74-DB10-45D9-A3CB-827239599D88} = {D81DD87D-D96B-4A06-B360-B71BED6E5199}
{89240742-3F31-4BA5-89A6-81C0CA6AE451} = {8534BBA2-FF98-4D0F-AE60-3EAFADB69653}
{90FDEB6C-05A9-45FF-A566-0230CA724235} = {BEE8F8E1-8859-4A61-B668-5467423911D7}
{0B7CE0F5-179E-41BA-BBAC-5E9001550E43} = {D81DD87D-D96B-4A06-B360-B71BED6E5199}
{427D3A36-64DA-42F7-B406-95B7078F50EB} = {0B7CE0F5-179E-41BA-BBAC-5E9001550E43}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C3AB2171-471F-4842-A039-4CE0AC4FBB45}
Expand Down
2 changes: 1 addition & 1 deletion samples/WebApi.Shared/RfcLibraryHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public static void EnsurePathVariable()
if (currentPathVariable.Contains(executeableDir))
return;

if (!currentPathVariable.EndsWith(';'))
if (!currentPathVariable.EndsWith(";"))
currentPathVariable += ';';

}
Expand Down
8 changes: 7 additions & 1 deletion samples/WebApi.Shared/WebApi.Shared.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp2.1;netcoreapp3.1;net5.0</TargetFrameworks>
<TargetFrameworks>net472;netcoreapp2.1;netcoreapp3.1;net5.0</TargetFrameworks>

<IsPackable>false</IsPackable>

Expand All @@ -22,6 +22,12 @@

</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net472'">
<PackageReference Include="Microsoft.AspNetCore" Version="2.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.1.0" />

</ItemGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
</ItemGroup>
Expand Down
30 changes: 30 additions & 0 deletions samples/net472/SAPWebAPI/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:62051",
"sslPort": 44391
}
},
"$schema": "http://json.schemastore.org/launchsettings.json",
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "api/company",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"SAPWebAPI": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "api/company",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://localhost:5000"
}
}
}
28 changes: 28 additions & 0 deletions samples/net472/SAPWebAPI/SAPWebAPI.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<UserSecretsId>577d8ea0-f844-4a6c-a833-a9b0aa7ceb79</UserSecretsId>
</PropertyGroup>

<ItemGroup>
<Compile Include="..\..\netcore2.1\SAPWebAPI\Controllers\CompanyController.cs" Link="Controllers\CompanyController.cs" />
<Compile Include="..\..\netcore2.1\SAPWebAPI\Program.cs" Link="Program.cs" />
<Compile Include="..\..\netcore2.1\SAPWebAPI\Startup.cs" Link="Startup.cs" />
</ItemGroup>

<ItemGroup>
<Folder Include="Controllers\" />
<Folder Include="wwwroot\" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore" Version="2.1.7" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.1.3" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\WebApi.Shared\WebApi.Shared.csproj" />
</ItemGroup>

</Project>
6 changes: 6 additions & 0 deletions samples/net472/SAPWebAPI/app.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<gcServer enabled="true"/>
</runtime>
</configuration>
9 changes: 9 additions & 0 deletions samples/net472/SAPWebAPI/appsettings.Development.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Debug",
"System": "Information",
"Microsoft": "Information"
}
}
}
8 changes: 8 additions & 0 deletions samples/net472/SAPWebAPI/appsettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Warning"
}
},
"AllowedHosts": "*"
}
8 changes: 0 additions & 8 deletions samples/netcore2.1/SAPWebAPI/Program.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using WebApi;

namespace SAPWebAPI
Expand Down
7 changes: 0 additions & 7 deletions samples/netcore2.1/SAPWebAPI/Startup.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.HttpsPolicy;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace SAPWebAPI
{
Expand Down

0 comments on commit 7eba100

Please sign in to comment.