dnx

Problems with Directory Services and Account Management in ASP.NET Core

梦想的初衷 提交于 2019-12-31 00:50:56
问题 I have a ASP.NET Core API project and I'd like to utilize DirectoryServices and DirectoryServices.AccountManagement namespaces. After some research I thought I found some project.json references that would work: { "version": "1.0.0-*", "compilationOptions": { "emitEntryPoint": true }, "dependencies": { "EntityFramework.Commands": "7.0.0-rc1-final", "EntityFramework.MicrosoftSqlServer": "7.0.0-rc1-final", "EntityFramework.MicrosoftSqlServer.Design": "7.0.0-rc1-final", "Microsoft.AspNet

EF 6 with a dnx project

允我心安 提交于 2019-12-30 17:27:24
问题 I have a new ASP.net 5 dnx class library I am using for entity framework. I need to target EF 6 because some features I need are not in EF 7. First the EF tools (like enable-migration) were not there. I added an old style class library and installed EF 6 and now the commands are there. When I run enable migrations I get this error: PM> Enable-Migrations Exception calling "SetData" with "2" argument(s): "Type 'Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.Automation.OAProject'

EF 6 with a dnx project

。_饼干妹妹 提交于 2019-12-30 17:27:08
问题 I have a new ASP.net 5 dnx class library I am using for entity framework. I need to target EF 6 because some features I need are not in EF 7. First the EF tools (like enable-migration) were not there. I added an old style class library and installed EF 6 and now the commands are there. When I run enable migrations I get this error: PM> Enable-Migrations Exception calling "SetData" with "2" argument(s): "Type 'Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.Automation.OAProject'

Get available types in CoreCLR

∥☆過路亽.° 提交于 2019-12-30 02:01:07
问题 This is easy to get all available types (for some interface for example) in the old .NET, but I can't find the way how to do that in the new CoreCLR. What I want to do is to have function like GetRepository, that should look for existing implementation of IRepository and return new instance of that type. Implementation will be located in the different project. So, in .NET I can use something like this: AppDomain.CurrentDomain.GetAssemblies().SelectMany(a => a.GetTypes()) The only solution I

How to reference an ASP.NET 5 project from another project?

泄露秘密 提交于 2019-12-29 08:47:13
问题 I have a Web Application project created from ASP.NET 5 Preview Templates in VS2015. It is running on dnx 1.0.0-beta7, but I'm using full .NET framework rather than .NET Core. Within the same solution I have a NUnit class library project, but when trying to add the web project as a reference here, Visual Studio says "A reference to '...' could not be added." Is there a workaround for this? Or what is the preferred way of unit testing ASP.NET vNext applications? 回答1: The easiest way is to make

How to watch for file changes “dotnet watch” with Visual Studio ASP.NET Core

断了今生、忘了曾经 提交于 2019-12-29 04:33:12
问题 I am using Visual Studio with ASP.NET Core and run the web site using just F5 or Ctrl+F5 (not using command line directly). I would like to use the "dotnet watch" functionality to make sure all changes are picked up on the fly to avoid starting the server again. It seems that with command line you would use "dotnet watch run" for this, but Visual Studio uses launchSettings.json and does it behind the scenes if I understand it correctly. How can I wire up "dotnet watch" there? 回答1: Open

Dnx (asp.net 5) Console app as Azure Web Job connection strings configuration not found

大憨熊 提交于 2019-12-24 13:47:57
问题 In all of the manuals about how to get the Storage connection for azure web jobs it is said to have those two variables AzureWebJobsDashboard, AzureWebJobsStorage in the connection strings. It works properly for ordinary .net, but it's quite an issue with DNX, since it seems that ConfigurationManager is not available there. So I have added the two strings to the ConnectionStrings in the portal, but I cannot find a good way how the Web Job would read them automatically. I ended up reading them

DNX Build Failed - Unexpected exit code received from msbuild.exe: 1

我是研究僧i 提交于 2019-12-24 11:28:06
问题 I cannot see why the below build is failing. The project builds successfully. What could "##[error]Unexpected exit code received from msbuild.exe: 1" result from in the below output? Executing the powershell script: C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\tasks\VSBuild\1.0.13\VSBuild.ps1 C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe "C:\a\8ac4a4f6\Root\src\MyProject.Api\MyProject.Api.xproj" /nologo /m /nr:false /fl /flp:"logfile=C:\a\8ac4a4f6\Root\src\MyProject.Api\MyProject

Getting the correct dependencies for .NET Web Api for the latest .NET core

夙愿已清 提交于 2019-12-24 05:26:31
问题 So I'm trying to create a ASP.NET Web Api project in a way that it works on Linux as well (using .NET Core). When I create a new Web Api project in Visual Studio, it looks like it uses dependencies and code scaffolding from back when ASP.NET 5 was in beta5 and so far I've gotten it to work, if I use the beta5 version in DNX to run it with 'dnx web'. The problem is that I'm trying to use the latest rc1 version or at least beta8 and I can get those versions of ASP.NET with 'dnvm', but Visual

VS2015 ASP.NET 5 beta7 dependency could not be resolved

做~自己de王妃 提交于 2019-12-24 03:51:24
问题 This is a follow-up to this question. I started with an Empty ASP.NET project in VS2015 community, tried to add a couple packages based on a tutorial, and haven't gotten it to actually work yet. The initial problem in the linked question was due to some project dependencies using beta5 and some using beta7 . Matching those up solved that, but now I get this error when I try to run the project in IIS Express: Could not load file or assembly 'Microsoft.Dnx.Host.Clr' or one of its dependencies.