.net-core-rc2

How do I deploy .net core rc2 projects via msbuild / msdeploy?

冷暖自知 提交于 2019-12-10 19:36:51
问题 Currently we deploy our web application projects (csproj's) via a call to MSBuild.exe with the DeployOnBuild=true and PublishProfile=Whatever parameters to deploy our projects to one of the following: IIS on premisis Azure Web Apps Web Deployment Packages We'd like to begin using the new .net core rc2 projects, but we're really not sure how to deploy them. Can we use the older publish profiles / publish methods? When going thru the Visual Studio Publishing UI, I only see File System and

Install VS2015 DotNetCore RC2

烂漫一生 提交于 2019-12-10 18:48:43
问题 I wanted to update the Aspnet5 rc1 to DotNetcode RC2. I am unable to uninstall rc1. If I install rc3, I get following error: Here is the log: [0584:098C][2016-06-09T23:30:46]e000: Error 0x80070642: Failed attempt to download URL: 'https://download.microsoft.com/download/4/6/1/46116DFF-29F9-4FF8-94BF-F9BE05BE263B/packages/AspNetCoreLocalFeed_rc2_14.msi' to: 'C:\Users\user\AppData\Local\Temp\{486C853B-822E-452D-9046-814A51B05A27}\AspNetCoreLocalFeed' [0584:098C][2016-06-09T23:30:46]e000: Error

ASP.Net 5 RC2 configuration section binding

眉间皱痕 提交于 2019-12-10 12:33:00
问题 I have just upgraded my sample app from RC1 to RC2 and I can't find how to bind a specific section of my appSettings.json file to my own POCO anymore. The sample at https://github.com/aspnet/live.asp.net/blob/rc2/src/live.asp.net/Startup.cs#L47 show that something like this should work: services.Configure<AppSettings>(options => Configuration.GetSection("AppSettings").Bind(options)); But with the final RC2 bits the "Bind" method or extension method can't be found Any idea where it lives now

Claims on signin in .NET Core RC2

感情迁移 提交于 2019-12-10 10:07:57
问题 I'm porting a .NET 4.6 version to .NET Core RC2 and wondering how to do following in .NET Core RC2. public async Task<ClaimsIdentity> GenerateUserIdentityAsync(UserManager<ApplicationUser> manager) { // Note the authenticationType must match the one defined in CookieAuthenticationOptions.AuthenticationType var userIdentity = await manager.CreateIdentityAsync(this, DefaultAuthenticationTypes.ApplicationCookie); userIdentity.AddClaim(new Claim("FullName", string.Format("{0} {1}", this.Firstname

CreateType missing from TypeBuilder. How to port this?

半城伤御伤魂 提交于 2019-12-10 01:47:48
问题 Trying to port an application from .net 4.5 to .net core for a client. I'm noticing that CreateType is no longer part of TypeBuilder. I've searched through multiple of the new reflection libs with no luck. Does anyone know how to port this? Code in question: typeBuilder.CreateType() 回答1: I found the answer, but in a different repository than I expected. CreateType was dropped, and CreateTypeInfo should be used now per this: https://github.com/dotnet/coreclr/issues/2222 'TypeBuilder' does not

How do you add a file as a link in a .NET Core library?

喜你入骨 提交于 2019-12-10 00:58:31
问题 I've added a .NET Core RC2 class lib to my solution (for fun) and the first thing I usually do is add a link to a shared GlobalAssemblyInfo.cs and edit the existing AssemblyInfo.cs down to the assembly specifics. So I've just done "Add"->"existing item", located my file and clicked the dropdown of the add button. No "Add as Link" option. What's the deal? How do I do this with .NET Core? 回答1: I don’t think the tooling supports this yet, and unfortunately, the documentation is not up to date on

ASP.NET Core RC2 as linux deamon

蹲街弑〆低调 提交于 2019-12-09 09:35:31
问题 I need information about hosting of net core console or asp.net application as linux deamon. Hosting application as Windows Service is already supported by Microsoft.Hosting.WindowsService, but I need something similar for linux deamons. 回答1: I'm running on RHEL, and therefore have chosen to write my own systemd unit files. Here is an example of one I use in conjuction with PostgreSQL (hence the Environment variable). I've stripped out sensitive information for obvious reasons. [Unit]

How to make websocket server in ASP.NET Core RC2?

风流意气都作罢 提交于 2019-12-08 11:54:20
问题 I use "Microsoft.AspNetCore.WebSockets.Server": "0.1.0-rc2-final" to make a websocket server, but not work. (In rc1, it is 1.0.0-rc1-final, and it work fine...) Here is my code: public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) { loggerFactory.AddConsole(Configuration.GetSection("Logging")); loggerFactory.AddDebug(); app.UseWebSockets(); app.Use(async (http, next) => { if (http.WebSockets.IsWebSocketRequest) { IHandler handler =

Can't publish ASP.NET Core 1.0 RC2 Application on build server

时光总嘲笑我的痴心妄想 提交于 2019-12-07 10:54:12
问题 I don't have Visual Studio on the build server. After migrating from DNX (RC1) to .NET Core CLI (RC2) my build on TeamCity broke. After making sure I had copied the MSBuild targets from my PC to the build server: C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet I'm able to build the solution. The problem is: I can't publish it! When I run: MSBuild.exe Solution.sln /p:DeployOnBuild=true /p:publishprofile=local it will fail with: C:\Program Files (x86)\MSBuild\Microsoft

How do I use System.Data in a .NET Core RC2 console app (Linux, Debian 8)?

删除回忆录丶 提交于 2019-12-06 00:59:51
问题 I've installed .NET Core RC2 on a Debian 8 amd64 system and would like to test if it's possible to query an instance of Microsoft SQL Server. So I'd like to add to my project a dependency on the System.Data.SqlClient assembly. Presently my project file created by running the dotnet new CLI tool looks like this: { "version": "1.0.0-*", "buildOptions": { "emitEntryPoint": true }, "dependencies": { "Microsoft.NETCore.App": { "type": "platform", "version": "1.0.0-rc2-3002702" } }, "frameworks": {