Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

can not update-database from NuGet package manager

$
0
0

I create database code first with migrations and remembered I need Change some Variable from int to string I do this but when I want update database from NuGet package manager I faced this errorIn addition I update NuGet and entity framework to last version in manage NuGet

Exception calling "LoadFrom" with "1" argument(s): "Could not load file or assembly 'file:///F:\TMF.IR\packages\EntityFramework.6.4.4\tools\EntityFramework.PowerShell.Utility.dll' or one of its dependencies. The system cannot find the file specified."At F:\TMF.IR\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:780 char:5+     $utilityAssembly = [System.Reflection.Assembly]::LoadFrom((Join-P ...+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ CategoryInfo          : NotSpecified: (:) [], MethodInvocationException+ FullyQualifiedErrorId : FileNotFoundExceptionYou cannot call a method on a null-valued expression.At F:\TMF.IR\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:781 char:5+     $dispatcher = $utilityAssembly.CreateInstance(+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ CategoryInfo          : InvalidOperation: (:) [], RuntimeException+ FullyQualifiedErrorId : InvokeMethodOnNullException calling "CreateInstanceFrom" with "8" argument(s): "Could not load file or assembly 'file:///F:\TMF.IR\packages\EntityFramework.6.4.4\tools\EntityFramework.PowerShell.dll' or one of its dependencies. The system cannot find the file specified."At F:\TMF.IR\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:809 char:5+     $domain.CreateInstanceFrom(+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~+ CategoryInfo          : NotSpecified: (:) [], MethodInvocationException+ FullyQualifiedErrorId : FileNotFoundException

and this is my model and I Changed ShortDiscription from int to string

 public class Page    {        [Key]        public int PageID { get; set; }         [Display(Name ="دستهبندیصفحه")]        [Required(ErrorMessage ="pleas insert {0} ")]        public int GroupID { get; set; }          [Display(Name ="عنوان")]        [Required(ErrorMessage ="pleas insert {0} ")]        [MaxLength(250)]        public string Title { get; set; }        [Display(Name ="توضیحمختصر")]       [Required(ErrorMessage ="pleas insert {0} ")]         [MaxLength(350)]         [DataType (DataType.MultilineText)]        public string ShortDiscription { get; set; }           [Required(ErrorMessage ="pleas insert {0} ")]        [Display(Name ="توضیح")]        [DataType(DataType.MultilineText)]        public virtual List<camment_page> camment_Pages { get; set; }        public virtual group_page group_Page { get; set; }        public Page()        {        }    }

and I use this command

  enable-migrations    add-migration    (some named)    update-database(error)

Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>