.net-core-rc2

How to register a COM shared as a NuGet Package in a Class Library (.NET Core)?

偶尔善良 提交于 2020-01-05 22:51:06
问题 There are 4 projects: MyProject.Domain MyProject.Services.Contracts MyProject.Services.Acomba MyProject.Services.Acomba.Tests The Acomba projects depends on a NuGet Package that I packed according to this SO Answer. All of those projects are of type Class Library (.NET Core) and target: NET451 NET452 NET461 NETSTANDARD1.5 Except for the test project which consists of a .NET Core App which target: NETCOREAPP1.0 As the Getting started with xUnit.net (.NET Core / ASP.NET Core) webpage describes.

Migration “our target project 'xxx' doesn't match your migrations assembly 'xxx'” using aspnet Core 1.0 RC2 -

徘徊边缘 提交于 2019-12-25 07:26:46
问题 I'm trying to build the migration classes for a second DBContext in a assembly. using this command: Add-Migration AlertInitial -c Axper.Data.Persistence.Context.AlertContext and using the "Package Console management" But it fail and give me this error: Your target project 'AxPortal' doesn't match your migrations assembly 'Axper.Data.Persistence'. Either change your target project or change your migrations assembly. Change your migrations assembly by using DbContextOptionsBuilder. E.g. options

Can't find System.Threading 4.0.10 on Raspberry Pi on Windows 10 Iot

别说谁变了你拦得住时间么 提交于 2019-12-25 07:17:30
问题 I'm creating a new simple UWP Blank application from the IoT template, and just adding a simple code to it: var xyz = new System.Threading.ManualResetEvent(false); xyz.WaitOne(1000); It works fine when I run this in x86 mode on my PC, and it worked fine on Raspberry Pi running Windows 10 IoT before I upgraded my PC to .NET Core RC2. Now I'm getting an error saying it can't find System.Threading version 4.0.10 when I execute it on the RPi. I've tried to add this via NuGet but no difference. I

Can't find System.Threading 4.0.10 on Raspberry Pi on Windows 10 Iot

独自空忆成欢 提交于 2019-12-25 07:16:00
问题 I'm creating a new simple UWP Blank application from the IoT template, and just adding a simple code to it: var xyz = new System.Threading.ManualResetEvent(false); xyz.WaitOne(1000); It works fine when I run this in x86 mode on my PC, and it worked fine on Raspberry Pi running Windows 10 IoT before I upgraded my PC to .NET Core RC2. Now I'm getting an error saying it can't find System.Threading version 4.0.10 when I execute it on the RPi. I've tried to add this via NuGet but no difference. I

How to get information about runtime .Net Core

北战南征 提交于 2019-12-22 07:01:57
问题 I have an app which works on Linux and Windows. I need to know where the app is working for use difference code. Thanks 回答1: You are probably looking for System.Runtime.InteropServices.RuntimeInformation with the IsOsPlatform function to do runtime checks. Have look at the video tutorial https://channel9.msdn.com/Series/aspnetmonsters/ASPNET-Monsters-Episode-46-Finding-Platform-Information of the ASP.NET Monsters. 来源: https://stackoverflow.com/questions/39207282/how-to-get-information-about

BinaryFormatter in netstandard 1.5

笑着哭i 提交于 2019-12-21 18:03:59
问题 According to the List of .NET CoreFx APIs and their associated .NET Platform Standard version, System.Runtime.Serialization.Formatters is added into to the .NET Platform Standard since 1.3, which is cool, but when I try to create a .Net Core class library targeting netstandard1.5 under.Net Core RC2, I can't use it. The code is simple, just intending to declare a BinaryFormatter: public class Problems { private System.Runtime.Serialization.Formatters.Binary.BinaryFormatter _formatter; } Error

.NET CLI how to run app after publish on Linux

最后都变了- 提交于 2019-12-20 10:39:20
问题 I spent ~4 hours investigation and still can't find out how to run published application ( dotnet publish ) Now I can download sources to my remote machine, then call dotnet build and dotnet run - then my app runs as intended. But I want to publish just DLL's (or *.so ?) to my VPS without source files. What official docs says? To define command in project.json "commands": { "web": "Microsoft.AspNet.Server.Kestrel --server.urls http://unix:/var/aspnet/HelloMVC/kestrel.sock", } But it is

.NET Core - solutions, frameworks, imports, runtimes

限于喜欢 提交于 2019-12-20 10:34:01
问题 I'm starting the process of reworking a framework set of libraries to use .NET Core. Thought I'd wait for RC2 and keen to get stuck in. I'm taking the opportunity to get up close and personal with the build system, configs, code everything from scratch to get a deeper understanding and have no unnecessary baggage that I don't want/need. However, the lack of documentation makes this quite difficult.. so I wanted to ask here, where no doubt clever .NET Core folks are hiding ;) I know this

How to get the current Windows user with ASP.NET Core RC2 MVC6 and IIS7

别等时光非礼了梦想. 提交于 2019-12-19 14:23:26
问题 I have an intranet site built in MVC6 using ASP.NET Core RC2. I want to get the Windows username of the person accessing the intranet site. So if Jim goes to the intranet site I want the site to receive "Domain\Jim", while if Anne goes to the intranet site I want the site to receive "Domain\Anne". Only Windows Authentication is enabled on my IIS server, Anonymous Authentication is disabled. My site is set to use Windows authentication and to disable anonymous authentication. <system.web>

How to get the current Windows user with ASP.NET Core RC2 MVC6 and IIS7

本小妞迷上赌 提交于 2019-12-19 14:23:16
问题 I have an intranet site built in MVC6 using ASP.NET Core RC2. I want to get the Windows username of the person accessing the intranet site. So if Jim goes to the intranet site I want the site to receive "Domain\Jim", while if Anne goes to the intranet site I want the site to receive "Domain\Anne". Only Windows Authentication is enabled on my IIS server, Anonymous Authentication is disabled. My site is set to use Windows authentication and to disable anonymous authentication. <system.web>