asp.net-5,visual-studio-2015 , “k ef” throwing exception in Visual Studio 2015 Package Manager Console


“k ef” throwing exception in Visual Studio 2015 Package Manager Console

Question:

Tag: asp.net-5,visual-studio-2015

I'm new to the Package Manager Console. I have managed to install the KVM and am trying to create a migration in my ASP.NET 5 app.

When I run "k ef" I get the following exception:

k.cmd : System.ArgumentNullException: Value cannot be null.
At line:1 char:2
+ k <<<<  ef
    + CategoryInfo          : NotSpecified: (System.Argument...cannot be null.:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

Parameter name: appEnv
   at Microsoft.Data.Entity.Utilities.Check.NotNull[T](T value, String parameterName)
   at Microsoft.Data.Entity.Commands.Program..ctor(IServiceProvider serviceProvider, IApplic
ationEnvironment appEnv, ILibraryManager libraryManager)

I'm in the correct folder, and I have run kpm restore. I'm at a loss.


Answer:

Switching dependency for EntityFramework.Commands from 7.0.0-* to 7.0.0-beta3 made it work.


Related:


How do I add an XML Doc Comment to a ClassDeclarationSyntax in Roslyn?


c#,.net,visual-studio-2015,roslyn
I have some code that builds a class: return SyntaxFactory .ClassDeclaration(name) .AddModifiers(SyntaxFactory.Token(SyntaxKind.PublicKeyword)) .WithMembers(GetProperties()); This all works, and outputs the class that I expect. I'd like to add an XML doc to this: /// <summary> /// Some plain text here. /// </summary> I don't need anything fancy, just plain text. I'm...

Kestrel Running which framework?


azure,asp.net-5,dnx,dnvm,.net-5.0
I have a new ASP.NET 5 project and setup the project.json as below; "frameworks": { "dnx451": { "dependencies": { "ExternalLibrary": "1.3.0" } }, "dnxcore50": {} } I'm running the project through Kestrel with the default command defined in project.json. "kestrel": "Microsoft.AspNet.Hosting --server Kestrel --server.urls http://localhost:5001" Everything works fine. The project...

Run ASP.NET5 web application with Kestrel server on Windows


asp.net-5
I have successfully run the 'HelloWeb' sample from the ASP.NET5 GitHub repo with the Kestrel server on Windows 8.1 by using: dnx . kestrel Now I want to run my own application with kestrel. I tried it from Visual Studio 2015RC and with several runtimes using dnx directly. The result...

VS2015: Variadic template specialization


c++,templates,c++11,c++14,visual-studio-2015
This code #include <iostream> #include <type_traits> template<typename Head, typename... Tail> struct Is_Admitted { constexpr static bool value = Is_Admitted<Head>::value && Is_Admitted<Tail...>::value; }; template<> template<typename T> struct Is_Admitted<T> : public std::false_type{}; template<> struct Is_Admitted<int> : public std::true_type{}; template<> struct Is_Admitted<double> : public std::true_type{}; int main() { std::cout << Is_Admitted<int,...

How to suppress warnings when building an ASP.NET 5 project?


asp.net-5
The ASP.NET 5 project has no "Suppress Warnings" option in its project property sheet. Recently I encountered a warning MSB3274 ( dnx451 actually means .net 4.5 ) and I tried to find a way to suppress this warning. I looked https://github.com/aspnet/Home/wiki/Project.json-file but found nothing related to suppress warnings....

Web api with mvc 6 get element based on string


c#,asp.net-mvc,asp.net-web-api,asp.net-5,asp.net-mvc-6
I am creating a web api using mvc 6. now i am trying to get a element from my db. the key in this table is a string (email adress). i do not have acces to this database so i cant change the key of this table. Now when creating...

Where is memset Hiding In VS 2015?


visual-studio-2015
I have installed VS 2015 RC and it's matching SDK in U:\ => C:\Program Files (x86)\Windows Kits\10 V:\ => C:\Program Files (x86)\Microsoft Visual Studio 14.0 However, when I link my app, it can't find memset (among others). So I ran DUMPBIN /ALL V:\VC\lib\libcmt.lib | grep "memset" and found no reference...

CORS for static HTML in vNext


cors,asp.net-5,asp.net-mvc-6
I have an MVC6 site running in Visual Studio 2015 RC I've got some static HTML files I want to serve to another website. I want to add CORS support (without having to add a controller and add CORS that way). Does anyone know how to do this please?...

Visual Studio 2015 RC Cordova Tools - Plugin Fails to Launch


javascript,cordova,cordova-plugins,visual-studio-2015
After struggling for several hours with getting Visual Studio 2015 Cordova Tools set up and running, the first plugin I add, Device, fails to launch at onDeviceReady. No error is thrown. It simply does not launch and when I attempt to access one of its properties, then I get a...

Visual Studio Tools for Cordova - FAILS


android,cordova,visual-studio-2015,visual-studio-cordova
Everytime I build I get the below error. I'm new to cordova in Visual Studio. I actually tried installing for VS2013 first. I downloaded VS 2015 RC community and I'm trying to get the project started. However I'm getting the below message. Attempt 1: I tried going into options>VS tools...

How to configure email settings in ASP.NET 5?


asp.net-5,asp.net-mvc-6
How to configure mail settings <system.net><mailSettings> that used to be in web.config in asp.net 4? I guess I need to call services.Configure<>() but I have no idea what options I should pass. Any ideas? Thanks, f0rt...

How do you configure SQL Session State in ASP.NET 5.0 (vNext) MVC 6? [closed]


sql-server,configuration,session-state,asp.net-5,asp.net-mvc-6
In Visual Studio 2015 RC, ASP.NET 5 vNext, i am trying to use SQL Session State in MVC 6. I'm not sure how to go about it. Can anyone show me a sample or give me some tips? I'm just trying out Azure Load Balancer. I set up a load...

What is the difference between 'dependencies' and 'frameworkAssemblies' in project.json?


asp.net,asp.net-5
The documentation for using project.json for ASP.NET 5 applications includes a sample project.json file (abbreviated version below). What is the difference between frameworkAssemblies and dependencies? And why does dnx451 use one and dnxcore50 use the other? { "version": "0.1-alpha-*", ... "frameworks": { "dnx451": { "frameworkAssemblies": { ... } }, "dnxcore50":...

How to install Xamarin for Visual Studio 2015 when Visual Studio 2013 is installed too?


visual-studio-2013,xamarin,visual-studio-2015
I install both Visual Studio 2013 and 2015. I need install Xamarin for VS 2015. But I can't do it because by default it's installing for VS 2013.

Visual Studio 2015 Ignoring New Folders & Files


asp.net,asp.net-mvc,visual-studio,visual-studio-2015
When I add a folder to the visual studio project, it ignores it completely. It didn't do that until recently, and I am not entirely sure why this is. A clean build does not solve the problem, in the visual studio folder structure, the resources folder is present. And in...

Entity Framework 7 Migration Scaffolding in Class Library with Configuration


code-first-migrations,asp.net-5,visual-studio-2015,entity-framework-7,dnx
Trying to add migrations to an EF7 Model that lives in an ASP.NET 5 class library. When running dnx . ef migration add mymigration fails with different results depending on which project I run it on. If I run it in the folder of the main project, it cannot locate...

How is execution passed from the clr to Startup class (startup.cs)?


asp.net-5,dnx
The Startup class in asp.net 5 strikes me as an odd duck. It isn't class Startup : ISomething or Startup : BaseSomething where the interface or base class is part of some Microsoft.AspNet.* assembly. No Startup is just a plain class with the correct magical method signatures created by convention....

How do I log into a web service that was auto-generated by Azure Mobile Web Services?


c#,testing,azure-mobile-services,visual-studio-2015
Microsoft's Azure Mobile Web Services lets you download a .NET or JavaScript Service and a client that talks to the Service. These are written in C#, or JavaScript. I chose to get one in C#. There is are several parts in the generated solution A Windows 8.1 desktop client (yourname.Windows)...

File upload error code 1 in ng-cordova filetransfer plugin


angularjs,cordova,ionic-framework,visual-studio-2015
I am working on a cross platform mobile App using visual studio 2015 rc's Apache cordova template and ionic framework.App's main functionality is to upload images from camera to a remote hosting. for that purpose i am using File-transfer plugin in angular controller and RestApi (ASP.net webapi) at server side....

ASP.NET vnext overriding status code set in controller. Is this a bug?


osx,asp.net-5,kestrel
I'm building a simple WebApi in asp.net vnext on a Mac. I've followed the example set in this tutorial but I'm having a problem where the response codes I set in my controller methods are being overridden Take this method in my CrudController: [HttpPost] public void Post([FromBody]CrudObject crudObject) { var...

DNX Core 5.0 library to target any platform. No System.Random class. Workarounds or options?


visual-studio-2015,dnx,.net-core
I am trying out the Visual Studio 2015 RC project template for creating a class library that can target any platform says Visual Studio. A new project has 2 references: DNX 4.5.1 and DNX Core 5.0. It appears that System.Random is not available in DNX Core 5.0. (The same is...

IApplicationBuilder exists in both Microsoft.AspNet.Http.Abstractions and Microsoft.AspNet.Http


asp.net,asp.net-5,roslyn
We're muddling thru doing authentication in ASP.NET 5. In this security sample, we see this type of thing: app.Run(async context => { var types = context.Authentication.GetAuthenticationSchemes(); } Initial Problem In our project, however, the HttpContext did not have an Authentication property and we would receive the following error: Microsoft.Framework.Runtime.Roslyn.RoslynCompilationException: C:\myApp\Startup.cs(71,46):...

Multiple Posted Types asp.net 5 MVC 6 API


c#,asp.net,asp.net-mvc,asp.net-5,asp.net-mvc-6
I can use [FromBody] for single type , but is there any way to use multiple? From the searching and reading I've done there is not a way, but i don't know if a way has been added in MVC 6. If not, where would be best to start with...

Deploying a Standard vNext WebApplication VS Next 2015 RC to Bluemix fails


cloudfoundry,asp.net-5,bluemix
I'm trying to deploy a aspnet5 Project (Template vNext WebApplication from Visual Studio) to Bluemix CF Service (Asp.net). Yet it's not possible and fails with: OUT FAILED: Writing Release YML failed, 746: unexpected token at '?{ OUT "webroot": "wwwroot", OUT "dependencies": { OUT "Microsoft.AspNet.Diagnostics": "1.0.0-beta4", OUT "Microsoft.AspNet.Mvc": "6.0.0-beta4", OUT "Microsoft.AspNet.Mvc.TagHelpers":...

(C/C++) Unknown compiler version while compiling Boost with MSVC 14.0 (VS 2015)


c++,c,boost,visual-studio-2015
I get "Unknown compiler version - please run configure tests and report the results" while attempting to compile Boost library on my computer. I have most recent Boost (as of date of the post) - 1.58.0. Doesn't Boost support MSVC 14.0, yet? How do I "run the configure tests"? Screenshots.

Configure the authorization server endpoint


c#,asp.net,oauth,asp.net-identity,asp.net-5
Question How do we use a bearer token with ASP.NET 5 using a username and password flow? For our scenario, we want to let a user register and login using AJAX calls without needing to use an external login. To do this, we need to have an authorization server endpoint....

NotNull attribute


c#,asp.net-5
I'm looking at asp.net vnext engineering guideline and have noticed that they recommend to use NotNull attribute instead of explicit checking of input argument for null and throwing ArgumentNullException. The thing that confused me is that base on this guideline it is just enough to declare this attribute and the...

How to change PasswordValidator in MVC6


asp.net-mvc,asp.net-identity,asp.net-5,asp.net-mvc-6
In the Asp.Net MVC 5 using Identity, was possible to do the following: manager.PasswordValidator = new PasswordValidator { RequiredLength = 6, RequireLowercase = true, RequireDigit = false, RequireUppercase = false }; How to change the same configuration in MVC 6? I see that can be in ConfigurationServices method in the...

Dependency Injection asp.net 5 custom classes, what is correct way?


c#,asp.net,model-view-controller,asp.net-5
Trying to understand DI. What is correct way to use services/dependency objects in custom classes? Do i need to create each class as service and add to dependency objects? Or should I be using [FromServices] (previously, [Active] before beta4 ) attribute. or is there is a service object I should...

How should I reference HttpClient for dnx451 and dnxcore50?


c#,.net,asp.net-5,dotnet-httpclient,.net-core
How should I reference HttpClient using a project.json file? I want both frameworks to work: dnx451 and dnxcore50. Here is my current attempt at the project.json file. (I've removed the irrelevant parts.) { "dependencies": { "Microsoft.Net.Http": "2.2.29", "Microsoft.Net.Http.Headers": "1.0.0-beta4", "System.Net.Http": "4.0.0-beta-22816" }, "frameworks": { "dnx451": { "frameworkAssemblies": { "System.Net.Http": "4.0.0.0"...

All the F# templates in VS 2015 RC disappear


templates,f#,visual-studio-2015
I installed in a fresh Win 8.1 machine VS 2015 RC. I load VS and create a F# project. Fine. Eventually, I do some other stuff (that I have not remember) and then I found that no single F# template (for projects) exist anymore in VS. Only C#/VB ones....

How to run nunit tests with asp.net 5 projects, espically with ReSharper?


nunit,resharper,asp.net-5
I am developing an asp.net 5 application targeting dnx451. The asp.net 5 project relies some libraries with unit-tests written for nunit 2.x. So the reasonable choice for me is to use nunit for testing the asp.net 5 project. When I running the unit test in ReSharper , the ReSharper says...

why my asp.net project look like references not resolved?


asp.net,visual-studio,visual-studio-2015
Running VS 2015 RC on windows 7 64, for the asp.net projects, it looks like the screenshot below, there is also no intellisense, but the project can compile, something wrong? the VS has resharper 9 and web essential extension installed as well project.json { "webroot": "wwwroot", "version": "1.0.0-*", "dependencies": {...

Get injected IOptions


asp.net-5
I'm trying to build my first ASP.NET vNext web application and the problem I've faced is that I can't get IOptions<AppSettings> injected to my Startup.Configure() method. The odd thing is that MVC sample site which was generated by VS2015 does the same steps but the same injecting works! Both projects...

Getting a scoped component from a IDocumentStoreListener


dependency-injection,ravendb,asp.net-5
I have an ASP.NET 5 app using RavenDB, and I'm trying to create an attribute that will create a "Changeset" document with the keys of all the documents that were stored by the action. For that purpose, I created an ActionFilterAttribute instantiated via ServiceFilterAttribute, which is registered as Scoped, that...

How to Make ASP.Net 5 Reference Normal .Net Class Library that is not in your solution


asp.net-5,visual-studio-2015,dnx
Earlier I asked this question and got an answer that worked. In order to make your ASP.Net 5 application be able to reference a normal .Net class library that targets the .Net Framework 4.5, you must remove the ' "dnxcore50": { }' reference from your project.json file. Great. That worked...

How to publish a Asp.net 5 MVC6 website on IIS containing two web apps


asp.net-5,visual-studio-2015,asp.net-mvc-6
I have got a project with two web apps. One of them is only for reference in the base app. The project runs okay in visual studio. I am trying to publish it in local file system and then copy it across to the windows server 2008. Below is the...

Visual C++ - Virtual method is not overriden


c++,templates,inheritance,polymorphism,visual-studio-2015
I have two classes: template <class T> class TArray { public: TArray& operator =(const TArray &array) { return Copy(array); } virtual TArray& Copy(const TArray &array) { ... } } class TString : public TArray<TCHAR> { public: TString& Copy(const TString &string) { ... } } Classes also have needed constructors. But...

Entity Framework 7 group by


asp.net-5,asp.net-mvc-6,entity-framework-7
I'm trying to run the following code but when I check the SQL profiler it looks like it runs a full select on the table and then does the grouping after it returns all results from the database. Any help is appreciated. var result = _dbContext.LogEvent.GroupBy(x => x.EventLevel) .Select(g =>...

How do you make an ASP.Net 5 Application be able to consume class libraries?


asp.net-5,visual-studio-2015
Step 1: Open VS 2015 RC and create a new "ASP.Net Web Application" Step 2: Right-click the solution, add a new windows "Class Library" (a normal one, not the "Class Library (Package)" Step 3: Put a method in Class1.cs in the class library. Doesn't matter what. Step 4: Right-click "References"...

Tools for Apache Cordova - Installed Plugins are skipped in build


cordova,github,git-branch,visual-studio-2015,visual-studio-cordova
i have a cordova app with 6 plugins and the strange behavior that app is not working after i create a new clone of the sources from github. If i install a plugin over the config.xml dialog and build the android version of the app. The native source file (*.java)...

Substring a stringRaw from String1 to String2


vb.net,visual-studio,substring,visual-studio-2015
If you didn't really get it what I actually want let me explain you better: I have a: stringRaw = "<img src=\"http://www.b92.net/news/pics/2015/01/15/111348233854b817af5b4bc991063053_v4 big.jpg\" title=\"\" alt=\"\" />" Now I have to do some kind of substring from string1 = "<img src=\"" to string2 = "\" title=\"\" alt=\"\" />" and have to...

Observer for fire&forget Task


asp.net-5
Disclaimer : I may have a bad idea ! I have a middleware on ASP.NET 5. This middleware process the request and start a new Task. The task is mainly for statistics purposes. The middleware do not care of the result of this task. For performances reason, I would like...

Team Foundation Online: Source Control - Making Specified Changeset Active


visual-studio-online,visual-studio-2015
The issue that I am experiencing is that when I want to have specified Changeset active, file structure doesn't match with that Changeset. Example: In Changeset 146 I had some files. I want to go back on Changeset 142. That Changeset didn't have those files at the time. In...

WS-Federation sign-in Asp.NET 5 MVC 6 ADFS


asp.net,asp.net-5,adfs,asp.net-mvc-6,ws-federation
Hello so I've been trying to achieve WS-Fed SSO on my MVC6 web application, I've read a bit on authentification and all to identify my requirements. I have to use WsFederationAuth so no oauth nor saml protocol would work for me. Edit : After @Pinpoint suggestion I tried to use...

VARIANT structure (COM) seems to have no member [on hold]


c++,com,directshow,visual-studio-2015,variant
Using Visual Studio 2015 RC and the Windows SDK 7.1 with this simple DirectShow code (C++ with COM) #include <dshow.h> #include <iostream> int main () { CoInitialize(nullptr); ICreateDevEnum* devEnum = nullptr; CoCreateInstance( CLSID_SystemClock, NULL, CLSCTX_INPROC_SERVER, IID_ICreateDevEnum, reinterpret_cast<void**>(devEnum) ); IEnumMoniker* monikerEnum = nullptr; devEnum->CreateClassEnumerator( CLSID_VideoInputDeviceCategory, &monikerEnum, 0 ); IMoniker* moniker =...