Skip to content

Commit 74e5ba1

Browse files
committed
Update samples
1 parent d003e51 commit 74e5ba1

17 files changed

+101
-114
lines changed

aspnetapp/aspnetapp/Dockerfile

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
FROM microsoft/aspnet:4.6.2
2-
COPY . /inetpub/wwwroot
1+
FROM microsoft/aspnet:4.7
2+
WORKDIR /inetpub/wwwroot
3+
COPY . .
4+
COPY ./bin ./bin

aspnetapp/aspnetapp/Web.config

+24-16
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,56 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0"?>
22
<!--
33
For more information on how to configure your ASP.NET application, please visit
44
https://go.microsoft.com/fwlink/?LinkId=169433
55
-->
66
<configuration>
7+
<!--
8+
For a description of web.config changes see http://go.microsoft.com/fwlink/?LinkId=235367.
9+
10+
The following attributes can be set on the <httpRuntime> tag.
11+
<system.Web>
12+
<httpRuntime targetFramework="4.7" />
13+
</system.Web>
14+
-->
715
<system.web>
8-
<compilation debug="true" targetFramework="4.6.2" />
9-
<httpRuntime targetFramework="4.6.2" />
16+
<compilation debug="true" targetFramework="4.7"/>
17+
<httpRuntime targetFramework="4.7"/>
1018
<customErrors mode="Off"/>
1119
<pages>
1220
<namespaces>
13-
<add namespace="System.Web.Optimization" />
21+
<add namespace="System.Web.Optimization"/>
1422
</namespaces>
1523
<controls>
16-
<add assembly="Microsoft.AspNet.Web.Optimization.WebForms" namespace="Microsoft.AspNet.Web.Optimization.WebForms" tagPrefix="webopt" />
24+
<add assembly="Microsoft.AspNet.Web.Optimization.WebForms" namespace="Microsoft.AspNet.Web.Optimization.WebForms" tagPrefix="webopt"/>
1725
</controls>
1826
</pages>
1927
<httpModules>
20-
<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" />
28+
<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web"/>
2129
</httpModules>
2230
</system.web>
2331
<runtime>
2432
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
2533
<dependentAssembly>
26-
<assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" />
27-
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
34+
<assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed"/>
35+
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0"/>
2836
</dependentAssembly>
2937
<dependentAssembly>
30-
<assemblyIdentity name="WebGrease" culture="neutral" publicKeyToken="31bf3856ad364e35" />
31-
<bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
32-
</dependentAssembly>
38+
<assemblyIdentity name="WebGrease" culture="neutral" publicKeyToken="31bf3856ad364e35"/>
39+
<bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234"/>
40+
</dependentAssembly>
3341
</assemblyBinding>
3442
</runtime>
3543
<system.webServer>
36-
<validation validateIntegratedModeConfiguration="false" />
44+
<validation validateIntegratedModeConfiguration="false"/>
3745
<modules>
38-
<remove name="ApplicationInsightsWebTracking" />
39-
<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" preCondition="managedHandler" />
46+
<remove name="ApplicationInsightsWebTracking"/>
47+
<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" preCondition="managedHandler"/>
4048
</modules>
4149
</system.webServer>
4250
<system.codedom>
4351
<compilers>
44-
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701" />
45-
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+" />
52+
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701"/>
53+
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+"/>
4654
</compilers>
4755
</system.codedom>
4856
</configuration>

aspnetapp/aspnetapp/aspnetapp.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<AppDesignerFolder>Properties</AppDesignerFolder>
1616
<RootNamespace>aspnetapp</RootNamespace>
1717
<AssemblyName>aspnetapp</AssemblyName>
18-
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
18+
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
1919
<UseIISExpress>true</UseIISExpress>
2020
<IISExpressSSLPort />
2121
<IISExpressAnonymousAuthentication />
@@ -24,6 +24,7 @@
2424
<UseGlobalApplicationHostFile />
2525
<NuGetPackageImportStamp>
2626
</NuGetPackageImportStamp>
27+
<TargetFrameworkProfile />
2728
</PropertyGroup>
2829
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
2930
<DebugSymbols>true</DebugSymbols>
@@ -51,10 +52,8 @@
5152
<Reference Include="System.ComponentModel.DataAnnotations" />
5253
<Reference Include="System" />
5354
<Reference Include="System.Data" />
54-
<Reference Include="System.Core" />
5555
<Reference Include="System.Data.DataSetExtensions" />
5656
<Reference Include="System.Web.Extensions" />
57-
<Reference Include="System.Xml.Linq" />
5857
<Reference Include="System.Drawing" />
5958
<Reference Include="System.Web" />
6059
<Reference Include="System.Xml" />
@@ -83,6 +82,7 @@
8382
<Reference Include="System.Web.Optimization, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
8483
<HintPath>..\packages\Microsoft.AspNet.Web.Optimization.1.1.3\lib\net40\System.Web.Optimization.dll</HintPath>
8584
</Reference>
85+
<Reference Include="System.Xml.Linq" />
8686
<Reference Include="WebGrease">
8787
<Private>True</Private>
8888
<HintPath>..\packages\WebGrease.1.5.2\lib\WebGrease.dll</HintPath>

dotnetapp-3.5/dotnetapp-3.5/Program.cs

-3
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ static void Main(string[] args)
1717
WriteLine("**Environment**");
1818
WriteLine($".NET Framework version: {(Environment.Version.Major == 4 ? "4.6.2" : "3.5") } ");
1919
WriteLine($"OS: {Environment.OSVersion}");
20-
#if DEBUG
21-
ReadLine();
22-
#endif
2320
}
2421

2522
public static string GetBot(string message)
File renamed without changes.

dotnetapp-4.6.2/Dockerfile

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
FROM microsoft/dotnet-framework:4.6.2
2+
WORKDIR /app
3+
COPY bin/Release/net462 .
4+
ENTRYPOINT ["dotnetapp-4.6.2.exe"]

dotnetapp-4.6.2/dotnetapp-4.6.2/Program.cs dotnetapp-4.6.2/Program.cs

+2-5
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,8 @@ static void Main(string[] args)
1515
WriteLine(GetBot(message));
1616
WriteLine();
1717
WriteLine("**Environment**");
18-
WriteLine($".NET Framework version: {(Environment.Version.Major == 4 ? "4.6.2" : "3.5") } ");
19-
WriteLine($"OS: {Environment.OSVersion}");
20-
#if DEBUG
21-
ReadLine();
22-
#endif
18+
WriteLine($".NET Framework 4.6.2");
19+
WriteLine($"{Environment.OSVersion}");
2320
}
2421

2522
public static string GetBot(string message)

dotnetapp-4.6.2/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
dotnet-framework:4.6.2 Sample
22
====================
33

4-
The dotnet-framework:4.6.2 sample demonstrates basic "hello world" usage of the .NET Framework 4.6.2. It shows you how you can build and deploy the app relying on the .NET Framework 4.6.2.
4+
The dotnet-framework:4.6.2 sample demonstrates basic "hello world" usage of the .NET Framework 4.6.2. It shows you how you can build and deploy the app relying on the .NET Framework 4.6.2 docker image.
55

66
Script
77
------
@@ -19,6 +19,6 @@ Follow these steps to try out this sample. To complete this sample you must have
1919
**Build and run Docker image**
2020

2121
1. Build the Docker image
22-
`docker build -t my-dotnet46-app .`
22+
`docker build -t my-dotnet462-app .`
2323
2. Run the application in the container:
24-
`docker run my-dotnet46-app`
24+
`docker run my-dotnet462-app`
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net462</TargetFramework>
6+
</PropertyGroup>
7+
8+
<!-- See dotnet/cli #6837 -->
9+
<ItemGroup>
10+
<Content Include="dotnetapp-4.6.2.exe.config">
11+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
12+
</Content>
13+
</ItemGroup>
14+
15+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/>
5+
</startup>
6+
</configuration>

dotnetapp-4.6.2/dotnetapp-4.6.2.sln

+23-11
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,34 @@
1-
1+
22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 14
4-
VisualStudioVersion = 14.0.23107.0
5-
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dotnetapp-4.6.2", "dotnetapp-4.6.2\dotnetapp-4.6.2.csproj", "{CDD30738-A6C7-4B6E-BD8D-EFECA803270E}"
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.26124.0
5+
MinimumVisualStudioVersion = 15.0.26124.0
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dotnetapp-4.6.2", "dotnetapp-4.6.2.csproj", "{CE9C4CDE-DC1D-44E5-AF6C-A5ECF4795A44}"
77
EndProject
88
Global
99
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1010
Debug|Any CPU = Debug|Any CPU
11+
Debug|x64 = Debug|x64
12+
Debug|x86 = Debug|x86
1113
Release|Any CPU = Release|Any CPU
12-
EndGlobalSection
13-
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14-
{CDD30738-A6C7-4B6E-BD8D-EFECA803270E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15-
{CDD30738-A6C7-4B6E-BD8D-EFECA803270E}.Debug|Any CPU.Build.0 = Debug|Any CPU
16-
{CDD30738-A6C7-4B6E-BD8D-EFECA803270E}.Release|Any CPU.ActiveCfg = Release|Any CPU
17-
{CDD30738-A6C7-4B6E-BD8D-EFECA803270E}.Release|Any CPU.Build.0 = Release|Any CPU
14+
Release|x64 = Release|x64
15+
Release|x86 = Release|x86
1816
EndGlobalSection
1917
GlobalSection(SolutionProperties) = preSolution
2018
HideSolutionNode = FALSE
2119
EndGlobalSection
20+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
21+
{CE9C4CDE-DC1D-44E5-AF6C-A5ECF4795A44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
22+
{CE9C4CDE-DC1D-44E5-AF6C-A5ECF4795A44}.Debug|Any CPU.Build.0 = Debug|Any CPU
23+
{CE9C4CDE-DC1D-44E5-AF6C-A5ECF4795A44}.Debug|x64.ActiveCfg = Debug|x64
24+
{CE9C4CDE-DC1D-44E5-AF6C-A5ECF4795A44}.Debug|x64.Build.0 = Debug|x64
25+
{CE9C4CDE-DC1D-44E5-AF6C-A5ECF4795A44}.Debug|x86.ActiveCfg = Debug|x86
26+
{CE9C4CDE-DC1D-44E5-AF6C-A5ECF4795A44}.Debug|x86.Build.0 = Debug|x86
27+
{CE9C4CDE-DC1D-44E5-AF6C-A5ECF4795A44}.Release|Any CPU.ActiveCfg = Release|Any CPU
28+
{CE9C4CDE-DC1D-44E5-AF6C-A5ECF4795A44}.Release|Any CPU.Build.0 = Release|Any CPU
29+
{CE9C4CDE-DC1D-44E5-AF6C-A5ECF4795A44}.Release|x64.ActiveCfg = Release|x64
30+
{CE9C4CDE-DC1D-44E5-AF6C-A5ECF4795A44}.Release|x64.Build.0 = Release|x64
31+
{CE9C4CDE-DC1D-44E5-AF6C-A5ECF4795A44}.Release|x86.ActiveCfg = Release|x86
32+
{CE9C4CDE-DC1D-44E5-AF6C-A5ECF4795A44}.Release|x86.Build.0 = Release|x86
33+
EndGlobalSection
2234
EndGlobal

dotnetapp-4.6.2/dotnetapp-4.6.2/Dockerfile

-4
This file was deleted.

dotnetapp-4.6.2/dotnetapp-4.6.2/dotnetapp-4.6.2.csproj

-64
This file was deleted.

dotnetapp-4.7/Program.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ static void Main(string[] args)
1515
WriteLine(GetBot(message));
1616
WriteLine();
1717
WriteLine("**Environment**");
18-
WriteLine($".NET Framework version: 4.7");
19-
WriteLine($"OS: {Environment.OSVersion}");
18+
WriteLine($".NET Framework 4.7");
19+
WriteLine($"{Environment.OSVersion}");
2020
}
2121

2222
public static string GetBot(string message)

dotnetapp-4.7/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
dotnet-framework:4.7 Sample
22
====================
33

4-
The dotnet-framework:4.7 sample demonstrates basic "hello world" usage of the .NET Framework 4.7. It shows you how you can build and deploy the app relying on the .NET Framework 4.7.
4+
The dotnet-framework:4.7 sample demonstrates basic "hello world" usage of the .NET Framework 4.7. It shows you how you can build and deploy the app relying on the .NET Framework 4.7 docker image.
55

66
Script
77
------

dotnetapp-4.7/dotnetapp-4.7.csproj

+8
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,12 @@
55
<TargetFramework>net47</TargetFramework>
66
</PropertyGroup>
77

8+
<!-- See dotnet/cli #6837 -->
9+
<ItemGroup>
10+
<Content Include="dotnetapp-4.7.exe.config">
11+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
12+
</Content>
13+
</ItemGroup>
14+
15+
816
</Project>
+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7"/>
5+
</startup>
6+
</configuration>

0 commit comments

Comments
 (0)