-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Commands: .NET Core CLI Implementation #3925
Comments
Open questions: (cc @davidfowl)
|
Will this ultimately resolve #3888? |
@AdamDotNet No, either way we'll need to author the EF.Commands package (or whatever it ends up being called) to contain a |
Changes: * Use KoreBuild-dotnet (resolves dotnet#4280) * Remove csproj-based solution * Remove netcore50 targets * Combine net451 & dnx451 * Remove DNX commands (see dotnet#3925)
Changes: * Use KoreBuild-dotnet (resolves dotnet#4280) * Remove csproj-based solution * Remove netcore50 targets * Combine net451 & dnx451 * Remove DNX commands (see dotnet#3925)
The rest of the Newtonsoft.Json story is here: https://github.com/dotnet/cli/issues/2514 |
dotnet ef migrations add Init Output : System.IO.FileNotFoundException: Could not load file or assembly 'Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.
File name: 'Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'
...
Could not load file or assembly 'Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified. When restoring package : Config : "frameworks": {
"netcoreapp1.0": {
"imports": [
"dnxcore50",
"net45"
],
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.0-*"
}
}
}
},
"tools": {
"dotnet-ef": "1.0.0-*"
}, Nuget Feeds : <add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
<add key="AspNetCI" value="https://www.myget.org/F/aspnetcirelease/api/v3/index.json" />
<add key="NuGet.org" value="https://api.nuget.org/v3/index.json" /> |
Is there workaround to make it works ? |
I cleared all the nuget package and restore. The newton.json error has gone. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentNullException: Value cannot be null.
Parameter name: assemblyName
at System.Reflection.AssemblyName..ctor(String assemblyName)
at Microsoft.AspNetCore.Mvc.Internal.DefaultAssemblyPartDiscoveryProvider.DiscoverAssemblyParts(String entryPointAssemblyName) |
@cevarief I was able to get the tools started using this:
|
You used an incorrect import |
I use the following import, but still can not successfully add migration. "dotnet-ef": {
"version": "1.0.0-*",
"imports": [
"portable-net45+wp80+win8+wpa81+dnxcore50",
"portable-net45+win8+wp8+wpa81",
"portable-net45+win8+wp8"
]
}, |
@mightea Thanks. It works by commenting out addMvc() and addCors(). dotnet ef migrations add Init
Done. To undo this action, use 'ef migrations remove' |
Heads up to anyone following this issue. We recently made big changes in #5142. "dotnet-ef" has been renamed to "Microsoft.EntityFrameworkCore.Tools". I've updated the sample usage in the issue description above to show what needs to be in project.json to use the tool now. #3925 (comment) I'm leaving this issue open as we are still waiting on partners for fixes so that we can validate and ensure EF tools work. |
@natemcmaster What feed should we use to resolve Microsoft.EntityFrameworkCore.Tools, i use both aspnetcirelease and aspnetcidev and get this error :
|
It has to move through our build system. The fastest I've seen it make it through to CI feeds is 6 hours. I pushed the code about 90 min ago
|
I've just tried to restore and now it works good. Thanks a lot 👍 |
not sure if this is the right place for this...but any ideas? PM> dotnet ef migrations add MyFirstMigration
|
@gtbull80 dotnet-ef requires your project to build before it can add a migration. Run |
Yeah...So I'm trying to wrap my head around all the new tech. Life's fun on the bleeding edge! When I run
|
DNX commands will be going away with the transition to .NET Core CLI. We'll need to create a .NET Core CLI tools package instead. Like the NuGet PMC commands, any version of the command should be able to work with any version of the framework.
Known Issues
System.ArgumentNullException
onassemblyName
#5065Tools using ConfigurationBuilder without setting basepath cannot find config files.won't fix. User's need to set base path toIHostingEnvironment.ContentRootPath
.AssemblyLoadContext
does not provide the necessary isolation https://github.com/dotnet/cli/issues/2514Usage
Your
project.json
should look something like this.Your workflow will look something like this.
The text was updated successfully, but these errors were encountered: