[2.0.x PATCH] Add app.config to net 4.x templates (#231)

Addresses #170
This commit is contained in:
Jass Bagga 2018-01-18 18:19:18 -08:00 committed by GitHub
parent c786c029f4
commit a177c557c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
34 changed files with 235 additions and 9 deletions

View File

@ -8,9 +8,10 @@ branches:
- release
- dev
- /^rel\/.*/
- /^release\/.*/
- /^(.*\/)?ci-.*$/
build_script:
- ps: .\build.ps1
- ps: .\build.cmd
clone_depth: 1
environment:
global:

28
.travis.yml Normal file
View File

@ -0,0 +1,28 @@
language: csharp
sudo: required
dist: trusty
env:
global:
- DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
- DOTNET_CLI_TELEMETRY_OPTOUT: 1
addons:
apt:
packages:
- libunwind8
mono: none
os:
- linux
- osx
osx_image: xcode8.2
branches:
only:
- master
- release
- dev
- /^rel\/.*$/
- /^release\/.*$/
- /^(.*\/)?ci-.*$/
before_install:
- if test "$TRAVIS_OS_NAME" == "osx"; then brew update; brew install openssl; ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/; ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/; fi
script:
- ./build.sh

View File

@ -22,6 +22,14 @@
"target": "./",
"exclude": [
".template.config/**"
],
"modifiers": [
{
"condition": "(TargetFrameworkOverride == '')",
"exclude": [
"app.config"
]
}
]
}
],

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<gcServer enabled="true"/>
</runtime>
</configuration>

View File

@ -22,6 +22,14 @@
"target": "./",
"exclude": [
".template.config/**"
],
"modifiers": [
{
"condition": "(TargetFrameworkOverride == '')",
"exclude": [
"app.config"
]
}
]
}
],

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<gcServer enabled="true"/>
</runtime>
</configuration>

View File

@ -22,6 +22,14 @@
"target": "./",
"exclude": [
".template.config/**"
],
"modifiers": [
{
"condition": "(TargetFrameworkOverride == '')",
"exclude": [
"app.config"
]
}
]
}
],

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<gcServer enabled="true"/>
</runtime>
</configuration>

View File

@ -10,8 +10,12 @@
<Compile Include="Program.fs" />
</ItemGroup>
<ItemGroup>
<ItemGroup Condition="'$(TargetFrameworkOverride)' == ''">
<PackageReference Include="Microsoft.AspNetCore.All" Version="${MicrosoftAspNetCoreAllPackageVersion}" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFrameworkOverride)' != ''">
<PackageReference Include="Microsoft.AspNetCore" Version="${MicrosoftAspNetCorePackageVersion}" />
</ItemGroup>
</Project>

View File

@ -25,6 +25,12 @@
"sources": [
{
"modifiers": [
{
"condition": "(TargetFrameworkOverride == '')",
"exclude": [
"app.config"
]
},
{
"condition": "(!IncludeLaunchSettings)",
"exclude": [

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<gcServer enabled="true"/>
</runtime>
</configuration>

View File

@ -18,6 +18,18 @@
},
"sourceName": "Company.WebApplication1",
"preferNameDirectory": true,
"sources": [
{
"modifiers": [
{
"condition": "(TargetFrameworkOverride == '')",
"exclude": [
"app.config"
]
}
]
}
],
"symbols": {
"TargetFrameworkOverride": {
"type": "parameter",

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<gcServer enabled="true"/>
</runtime>
</configuration>

View File

@ -27,6 +27,12 @@
"sources": [
{
"modifiers": [
{
"condition": "(TargetFrameworkOverride == '')",
"exclude": [
"app.config"
]
},
{
"condition": "(!IndividualAuth && !OrganizationalAuth)",
"exclude": [

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<gcServer enabled="true"/>
</runtime>
</configuration>

View File

@ -26,6 +26,12 @@
"sources": [
{
"modifiers": [
{
"condition": "(TargetFrameworkOverride == '')",
"exclude": [
"app.config"
]
},
{
"condition": "(!IndividualAuth && !OrganizationalAuth)",
"exclude": [

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<gcServer enabled="true"/>
</runtime>
</configuration>

View File

@ -19,6 +19,18 @@
},
"sourceName": "Company.WebApplication1",
"preferNameDirectory": true,
"sources": [
{
"modifiers": [
{
"condition": "(TargetFrameworkOverride == '')",
"exclude": [
"app.config"
]
}
]
}
],
"symbols": {
"TargetFrameworkOverride": {
"type": "parameter",

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<gcServer enabled="true"/>
</runtime>
</configuration>

View File

@ -26,6 +26,12 @@
"sources": [
{
"modifiers": [
{
"condition": "(TargetFrameworkOverride == '')",
"exclude": [
"app.config"
]
},
{
"condition": "(windir == 'C:\\Windows')",
"exclude": [

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<gcServer enabled="true"/>
</runtime>
</configuration>

View File

@ -18,6 +18,18 @@
},
"sourceName": "Company.WebApplication1",
"preferNameDirectory": true,
"sources": [
{
"modifiers": [
{
"condition": "(TargetFrameworkOverride == '')",
"exclude": [
"app.config"
]
}
]
}
],
"symbols": {
"TargetFrameworkOverride": {
"type": "parameter",

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<gcServer enabled="true"/>
</runtime>
</configuration>

View File

@ -22,6 +22,14 @@
"target": "./",
"exclude": [
".template.config/**"
],
"modifiers": [
{
"condition": "(TargetFrameworkOverride == '')",
"exclude": [
"app.config"
]
}
]
}
],

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<gcServer enabled="true"/>
</runtime>
</configuration>

View File

@ -22,6 +22,14 @@
"target": "./",
"exclude": [
".template.config/**"
],
"modifiers": [
{
"condition": "(TargetFrameworkOverride == '')",
"exclude": [
"app.config"
]
}
]
}
],

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<gcServer enabled="true"/>
</runtime>
</configuration>

View File

@ -22,6 +22,14 @@
"target": "./",
"exclude": [
".template.config/**"
],
"modifiers": [
{
"condition": "(TargetFrameworkOverride == '')",
"exclude": [
"app.config"
]
}
]
}
],

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<gcServer enabled="true"/>
</runtime>
</configuration>

View File

@ -14,7 +14,8 @@ namespace Templates.Test
}
[ConditionalFact]
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
[OSSkipCondition(OperatingSystems.Linux)]
[OSSkipCondition(OperatingSystems.MacOSX)]
public void EmptyWebTemplate_Works_NetFramework()
=> EmptyWebTemplateImpl("net461");

View File

@ -14,7 +14,8 @@ namespace Templates.Test
}
[ConditionalTheory]
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
[OSSkipCondition(OperatingSystems.Linux)]
[OSSkipCondition(OperatingSystems.MacOSX)]
[InlineData(null)]
[InlineData("F#")]
public void MvcTemplate_NoAuth_Works_NetFramework(string languageOverride)
@ -55,7 +56,8 @@ namespace Templates.Test
}
[ConditionalFact]
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
[OSSkipCondition(OperatingSystems.Linux)]
[OSSkipCondition(OperatingSystems.MacOSX)]
public void MvcTemplate_IndividualAuth_Works_NetFramework()
=> MvcTemplate_IndividualAuthImpl("net461");

View File

@ -14,7 +14,8 @@ namespace Templates.Test
}
[ConditionalFact]
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
[OSSkipCondition(OperatingSystems.Linux)]
[OSSkipCondition(OperatingSystems.MacOSX)]
public void RazorPagesTemplate_NoAuth_Works_NetFramework()
=> RazorPagesTemplate_NoAuthImpl("net461");
@ -48,7 +49,8 @@ namespace Templates.Test
}
[ConditionalFact]
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
[OSSkipCondition(OperatingSystems.Linux)]
[OSSkipCondition(OperatingSystems.MacOSX)]
public void RazorPagesTemplate_IndividualAuth_Works_NetFramework()
=> RazorPagesTemplate_IndividualAuthImpl("net461");

View File

@ -16,7 +16,8 @@ namespace Templates.Test
}
[ConditionalTheory]
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
[OSSkipCondition(OperatingSystems.Linux)]
[OSSkipCondition(OperatingSystems.MacOSX)]
// Just use 'angular' as representative for .NET 4.6.1 coverage, as
// the client-side code isn't affected by the .NET runtime choice
[InlineData("angular")]

View File

@ -14,7 +14,8 @@ namespace Templates.Test
}
[ConditionalFact]
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
[OSSkipCondition(OperatingSystems.Linux)]
[OSSkipCondition(OperatingSystems.MacOSX)]
public void WebApiTemplate_Works_NetFramework()
=> WebApiTemplateImpl("net461");