Home: The term 'Add-Migration' is not recognized as the name of a cmdlet, function, script file, or operable.

Created on 10 Jul 2017  路  16Comments  路  Source: NuGet/Home

Fling this here to bring attention to the internal issue: https://devdiv.visualstudio.com/DevDiv/_workitems?id=456961&_a=edit

The issue that has been re-activated is now failing with:

Type "Add-Migration AddMovies", it occurs error "The term 'Add-Migration' is not recognized as the name of a cmdlet, function, script file, or operable", see screenshot1.

In that case, the CLI is not in the picture, so I am not sure why we are tracking this in the CLI.

Please see the internal issue for full details.

VS.PMConsole Bug

All 16 comments

Not related to earlier fixes. Bug repro's in the latest preview 4 builds.
The actual root cause is NuGet was unable to locate init.ps1 scripts in packages installed in .NET Core fallback folders.
Increasing estimate as the fix may be tricky.

//cc @rrelyea

@alpaix @rrelyea Just to clarify where this is broken, since I'm not sure which preview4 is being referred to. Is this broken for the RTM bits that will be available for the .NET Core 2.0 release? If so, this is very likely a ship-stopper for that release.

/cc @Eilon @divega

If it is referring to Visual Studio 15.3 Preview 4 it likely is a ship stopper as well.

@divega That's correct. The plan is to get escrow approval for this fix to be shipped with next release of Visual Studio 2017 15.3.

Keeping the issue open as not all of the bugs were resolved in the PR.

@alpaix Have the fixes here made it into builds of VS yet? Do they also need to go into the SDK?

Will keep it open as long as other fix is in-flight.
@ajcvickers Visual Studio insertion is pending escrow approval. The fix impacts Visual Studio extension only. Regardless, we'll synchronize VS, SDK and CLI insertions.

Thanks @alpaix

@alpaix do you know if the fix is already available in any build of Visual Studio? @pranavkm was hitting this again today. Thanks!

I'm using VS 15.3 Preview 4 (26706.0.d15rel). Is there a newer build where the escrow changes made it in?

Available in 15.3 Preview 7 d15rel.26726.0.
@pranavkm Let me know if you're able to repro.

Hello, I had a similar problem in VS 15.3preview6 and dotnet sdk 2.0.0-preview3-006890, entityframeworkcore.tools 2.0.0 (release bits) and aspnet core 2.0.0 (release bits).
Running add-migration from package-manager-console resulted in:
"The term 'Add-Migration' is not recognized as the name of a cmdlet,.......

but now with VS 15.3preview7 it works as expected. Maybe someone else could confirm that?

Yup, verified with15.3.0 Preview 7.0 (26730.0.d15rel) that this was fixed. Thanks @alpaix

Thanks @alpaix, and @pranavkm for verifying! :tada:

Was this page helpful?
0 / 5 - 0 ratings