-
107 votesanswersviews
如何在Asp.Net Core中注册同一接口的多个实现?
我有来自相同接口的服务 public interface IService { } public class ServiceA : IService { } public class ServiceB : IService { } public class ServiceC : IService { } 通常,其他IOC容器(如 Unity )允许您通过某些区分它们的 Key 来注册具体实现 ... -
9 votesanswersviews
Typeconverter无法在asp.net核心中运行
我将 Amount 存储在数据库中 decimal . 我希望用千位分隔符在UI上显示该值 . 我可以在amount属性上添加 [DisplayFormat(DataFormatString = "{0:N2}", ApplyFormatInEditMode = true)] 属性,这将显示千位分隔符的数字但是当我将值POST回服务器时,由于逗号,MVC模型绑定将不起作用 .... -
0 votesanswersviews
CLR / System.IO.FileLoadException:“无法加载文件或程序集'System,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = b77a5c561934e089”
我在Visual Studio代码中的项目中生成此异常: 发生异常:CLR / System.IO.FileLoadException在Infrastructure.dll中发生类型'System.IO.FileLoadException'的异常,但未在用户代码中处理:'无法加载文件或程序集'System,Version = 4.0 . 0.0,Culture = neutral,Public... -
4 votesanswersviews
无法在i386 Ubuntu 16.04 Xenial上安装.NET Core
我正在按照https://www.microsoft.com/net/core#ubuntu和其他地方提到的步骤使用i386而不是amd64 . 但遇到以下错误 . 请帮忙 . 用i386 sudo apt-get update [...] Get:4 https://apt-mo.trafficmanager.net/repos/dotnet xenial InRelease [2,819 B]... -
0 votesanswersviews
如何在ASP.NET Core应用程序中安装ASP MVC 4应用程序
我正在尝试将旧的静态网站迁移到ASP.NET核心 . 在我的旧网站中,一个ASP MVC 4应用程序存在于该网站内 . 主要网站:http://mysite.is-a-geek.com MVC4 app:http://mysite.is-a-geek.com/users 现在,我的ASP.MVC 4应用程序存在于ASP.NET核心应用程序中,如下图所示: 我需要独立管理ASP MVC... -
3 votesanswersviews
Asp.Net Core RC2与Microsoft.Owin
在 Startup.cs 添加 using Microsoft.Owin; 行时无法编译项目 . VS抛出错误: ASP.NET Core 5.0 error CS0234: The type or namespace name 'Owin' does not exist in the namespace 'Microsoft' (are you missing an assembly refe... -
1 votesanswersviews
dotnet核心版本号和相应的构建
在开发服务器上,当我检查它显示的dotnet核心版本号时 C:\>dotnet --version Microsoft .NET Core Shared Framework Host Version : 1.1.0 Build : 928f77c4bc3f49d892459992fb6e1d5542cb5e86 如何在dotnet core download page上...