/shared
sdk
dotnet*
+aspnetcore-runtime-*
netcoreapp2.0/
netcoreapp3.0/
packs/
# Extracted MicrosoftNETCoreAppVersion from https://github.com/dotnet/coreclr/blob/master/eng/Versions.props#L14
NETCOREAPP_VERSION := 3.0.0-preview5-27620-01
+# Extracted from https://dotnetcli.blob.core.windows.net/dotnet/aspnetcore/Runtime/master/latest.version
+ASPNETCOREAPP_VERSION := 3.0.0-preview-18614-0151
+
include roslyn.make
ifeq ($(HOST_PLATFORM),win32)
endif
NETCORESDK_FILE := dotnet-runtime-$(NETCOREAPP_VERSION)-$(RID).$(NETCORESDK_EXT)
-URL := https://dotnetcli.blob.core.windows.net/dotnet/Runtime/$(NETCOREAPP_VERSION)/$(NETCORESDK_FILE)
+ASPNETCORESDK_FILE := aspnetcore-runtime-$(ASPNETCOREAPP_VERSION)-$(RID).$(NETCORESDK_EXT)
+NETCORE_URL := https://dotnetcli.blob.core.windows.net/dotnet/Runtime/$(NETCOREAPP_VERSION)/$(NETCORESDK_FILE)
+ASPNETCORE_URL := https://dotnetcli.blob.core.windows.net/dotnet/aspnetcore/Runtime/$(ASPNETCOREAPP_VERSION)/$(ASPNETCORESDK_FILE)
FEED_BASE_URL := https://dotnetfeed.blob.core.windows.net/dotnet-core
TEST_ASSETS_URL = $(FEED_BASE_URL)/corefx-tests/$(NETCORETESTS_VERSION)/OSX.x64/netcoreapp/corefx-test-assets.xml
$(NETCORESDK_FILE):
- curl $(URL) --output $(NETCORESDK_FILE)
+ curl $(NETCORE_URL) --output $(NETCORESDK_FILE)
+ rm -rf shared/Microsoft.NETCore.App
$(UNZIPCMD) $(NETCORESDK_FILE)
+# AspNetCoreApp contains its own .NET Core Runtime but we don't need it so let's remove it
+# and update version in Microsoft.AspNetCore.App.runtimeconfig.json to NETCOREAPP_VERSION
+$(ASPNETCORESDK_FILE):
+ curl $(ASPNETCORE_URL) --output $(ASPNETCORESDK_FILE)
+ $(UNZIPCMD) $(ASPNETCORESDK_FILE)
+ sed -e 's/.*version.*/\"version\": \"$(NETCOREAPP_VERSION)\"/' < shared/Microsoft.AspNetCore.App/$(ASPNETCOREAPP_VERSION)/Microsoft.AspNetCore.App.runtimeconfig.json > 2 && mv 2 shared/Microsoft.AspNetCore.App/$(ASPNETCOREAPP_VERSION)/Microsoft.AspNetCore.App.runtimeconfig.json
+
update-corefx: corefx/.stamp-dl-corefx-$(NETCORETESTS_VERSION)
corefx/.stamp-dl-corefx-$(NETCORETESTS_VERSION): corefx-restore.csproj
python dl-test-assets.py corefx-test-assets.xml $(FEED_BASE_URL) corefx/tests
touch $@
-build-sample:
- dotnet build sample/HelloWorld
-
run-sample:
+ dotnet build sample/HelloWorld
COMPlus_DebugWriteToStdErr=1 ./dotnet --fx-version "$(NETCOREAPP_VERSION)" sample/HelloWorld/bin/Debug/netcoreapp3.0/HelloWorld.dll
+run-aspnet-sample: prepare
+ rm -rf sample/AspNetCore/{bin,obj}
+ dotnet publish sample/AspNetCore -c Debug -r $(RID)
+ cp ../mono/mini/.libs/libmonosgen-2.0$(PLATFORM_AOT_SUFFIX) sample/AspNetCore/bin/Debug/netcoreapp3.0/$(RID)/publish/$(PLATFORM_AOT_PREFIX)coreclr$(PLATFORM_AOT_SUFFIX)
+ cp ../mcs/class/System.Private.CoreLib/bin/$(COREARCH)/System.Private.CoreLib.dll sample/AspNetCore/bin/Debug/netcoreapp3.0/$(RID)/publish/
+ COMPlus_DebugWriteToStdErr=1 ./dotnet --fx-version "$(ASPNETCOREAPP_VERSION)" sample/AspNetCore/bin/Debug/netcoreapp3.0/$(RID)/publish/AspNetCore.dll
+
# COREHOST_TRACE=1
SHAREDRUNTIME := shared/Microsoft.NETCore.App/$(NETCOREAPP_VERSION)
cp ../mono/mini/.libs/libmonosgen-2.0$(PLATFORM_AOT_SUFFIX) $(SHAREDRUNTIME)/$(PLATFORM_AOT_PREFIX)coreclr$(PLATFORM_AOT_SUFFIX)
cp ../mcs/class/System.Private.CoreLib/bin/$(COREARCH)/System.Private.CoreLib.{dll,pdb} $(SHAREDRUNTIME)
-prepare: $(NETCORESDK_FILE) update-corefx update-roslyn link-mono
+prepare: $(ASPNETCORESDK_FILE) $(NETCORESDK_FILE) update-corefx update-roslyn link-mono
nupkg:
nuget pack runtime.nuspec -properties VERSION=$(VERSION)\;RID=$(RID)\;PLATFORM_AOT_SUFFIX=$(PLATFORM_AOT_SUFFIX)\;COREARCH=$(COREARCH)
clean:
- rm -rf sdk shared host dotnet tests obj corefx roslyn LICENSE.txt ThirdPartyNotices.txt $(NETCORESDK_FILE)
+ rm -rf sdk shared host dotnet tests obj corefx roslyn LICENSE.txt ThirdPartyNotices.txt $(NETCORESDK_FILE) $(ASPNETCORESDK_FILE)
#
# Running tests:
--- /dev/null
+<Project Sdk="Microsoft.NET.Sdk.Web">
+
+ <PropertyGroup>
+ <TargetFramework>netcoreapp3.0</TargetFramework>
+ </PropertyGroup>
+
+</Project>
--- /dev/null
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Hosting;
+using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.Hosting;
+using Microsoft.Extensions.Logging;
+
+namespace AspNetCore
+{
+ public class Program
+ {
+ public static void Main(string[] args)
+ {
+ CreateHostBuilder(args).Build().Run();
+ }
+
+ public static IHostBuilder CreateHostBuilder(string[] args) =>
+ Host.CreateDefaultBuilder(args)
+ .ConfigureWebHostDefaults(webBuilder =>
+ {
+ webBuilder.UseStartup<Startup>();
+ });
+ }
+}
--- /dev/null
+{\r
+ "iisSettings": {\r
+ "windowsAuthentication": false, \r
+ "anonymousAuthentication": true, \r
+ "iisExpress": {\r
+ "applicationUrl": "http://localhost:35206",\r
+ "sslPort": 44375\r
+ }\r
+ },\r
+ "profiles": {\r
+ "IIS Express": {\r
+ "commandName": "IISExpress",\r
+ "launchBrowser": true,\r
+ "environmentVariables": {\r
+ "ASPNETCORE_ENVIRONMENT": "Development"\r
+ }\r
+ },\r
+ "AspNetCore": {\r
+ "commandName": "Project",\r
+ "launchBrowser": true,\r
+ "applicationUrl": "https://localhost:5001;http://localhost:5000",\r
+ "environmentVariables": {\r
+ "ASPNETCORE_ENVIRONMENT": "Development"\r
+ }\r
+ }\r
+ }\r
+}
\ No newline at end of file
--- /dev/null
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Hosting;
+using Microsoft.AspNetCore.Http;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Hosting;
+
+namespace AspNetCore
+{
+ public class Startup
+ {
+ // This method gets called by the runtime. Use this method to add services to the container.
+ // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
+ public void ConfigureServices(IServiceCollection services)
+ {
+ }
+
+ // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
+ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
+ {
+ if (env.IsDevelopment())
+ {
+ app.UseDeveloperExceptionPage();
+ }
+
+ app.UseRouting();
+
+ app.UseEndpoints(endpoints =>
+ {
+ endpoints.MapGet("/", async context =>
+ {
+ string corlib = typeof(object).Assembly.FullName;
+ bool isMono = corlib.Contains("0.0.0.0");
+ await context.Response.WriteAsync("Hello World " + (isMono ? "from mono!\n" : "\n") + corlib);
+ });
+ });
+ }
+ }
+}
--- /dev/null
+{\r
+ "Logging": {\r
+ "LogLevel": {\r
+ "Default": "Debug",\r
+ "System": "Information",\r
+ "Microsoft": "Information"\r
+ }\r
+ }\r
+}\r
--- /dev/null
+{\r
+ "Logging": {\r
+ "LogLevel": {\r
+ "Default": "Information",\r
+ "Microsoft": "Warning",\r
+ "Microsoft.Hosting.Lifetime": "Information"\r
+ }\r
+ },\r
+ "AllowedHosts": "*"\r
+}\r
Console.WriteLine(typeof(object).Assembly.FullName);
Console.WriteLine(System.Reflection.Assembly.GetEntryAssembly ());
+ Console.WriteLine(System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription);
}
}
}