AzureFileProvider incompatibility

I tried to use  AzureFileProvider, but I'm getting this error when I compile

The type 'FileManagerDirectoryContent' exists in both 'Syncfusion.EJ2.FileManager.AzureFileProvider, Version=18.4.0.34, Culture=neutral, PublicKeyToken=null' and 'Syncfusion.EJ2, Version=19.1.0.63, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89' [Skualo.Admin]csharp(CS0433)

How can I solve this?

3 Replies 1 reply marked as answer

IL Indhumathy Loganathan Syncfusion Team May 17, 2021 10:00 AM UTC

Hi Jaime, 
 
Greetings from Syncfusion support. 
 
We checked your reported issue in File Manager component and it is a known issue from our end. When you are using both Syncfusion.EJ2.AspNet.Core and Syncfusion.EJ2.FileManager.AzureFileProvider.AspNet.Core in your application, both NuGet packages will have some common assemblies with same model files, so iwill create some name conflicts between the packages.  We have already logged this as a bug in our File Manager component. Fix for this issue will be included in any one of our upcoming release.  
  
You can track the below feedback link to know the bug status.  
  
  
As of now, you can resolve your reported issue in two ways.  
  
Case1:    
  
Referring the AzureFileProvider model file locally in your application without installing the Syncfusion.EJ2.FileManager.AzureFileProvider.AspNet.Core NuGet package in your application. All the necessary model files required by AzureFileProvider model file and Azure controller actions is already available with Syncfusion.EJ2.AspNet.Core NuGet package. So, you use Azure file provider service for File Manager without installing Syncfusion.EJ2.FileManager.AzureFileProvider.AspNet.Core NuGet package in your application by this way.  
  
Refer the sample link. 
 
 
Case 2:   
  
Installing Syncfusion.EJ2.FileManager.AzureFileProvider.AspNet.Core NuGet package and you can declare a local class for FileManagerDirectoryParams for overriding the in-built FileManagerDirectory class available in assemblies and use the class in all the operations and also define the Base file inside the Models folder. It resolves your reported issue.    
  
Refer to the below code snippet.  
  
  public class FileManagerDirectoryParams  
    {  
        public string Path { getset; }  
        public string Action { getset; }  
        public string NewName { getset; }  
        public string[] Names { getset; }  
        public string TargetPath { getset; }  
        public string Name { getset; }  
        public long Size { getset; }  
        public string PreviousName { getset; }  
        public DateTime DateModified { getset; }  
        public DateTime DateCreated { getset; }  
        public bool HasChild { getset; }  
        public bool IsFile { getset; }  
        public string Type { getset; }  
        public string Id { getset; }  
        public string FilterPath { getset; }  
        public string FilterId { getset; }  
        public IList<IFormFile> UploadFiles { getset; }  
        public bool CaseSensitive { getset; }  
        public string SearchString { getset; }  
        public bool ShowHiddenItems { getset; }  
  
        public string IconClass { getset; }  
  
        public string NodeId { getset; }  
  
        public string ParentID { getset; }  
  
        public bool Selected { getset; }  
  
        public string Icon { getset; }  
  
        public string[] RenameFiles { getset; }  
        public FileManagerDirectoryContent[] Data { getset; }  
  
        public FileManagerDirectoryContent TargetData { getset; }  
    }  
   public object AzureFileOperations([FromBody] FileManagerDirectoryParams args)  
        {}  
public ActionResult AzureUpload(FileManagerDirectoryParams args)  
        {  
}  
  public object AzureDownload(string downloadInput)  
        {  
            FileManagerDirectoryParams args = JsonConvert.DeserializeObject<FileManagerDirectoryParams>(downloadInput);  
            return operation.Download(args.Path, args.Names, args.Data);  
        }  
public IActionResult AzureGetImage(FileManagerDirectoryParams args)  
        {  
            return this.operation.GetImage(args.Path, args.Id, truenull, args.Data);  
        }  
  
Refer to the sample link below.  
  
  
Refer the below link to know more about the File Manager component.  
  
  
 
  
Please let us know, if you need any further assistance.  
  
Regards, 
Indhumathy L 


Marked as answer

MK Manoj Kumar Gurram June 15, 2021 06:30 AM UTC

Hi Indhumathy L,

     I'm also getting the exact issue which was raised by Jaime in the previous conversation. Regarding this, you had given a link to track a bug regarding that fix. Is that issue solved, as I'm getting Access Denied on clicking the link. Can you please help me with this and I want to implement EJ2 file manager with Azure support. Also in the latest changes, if there were any .NET API modifications, please give me those references also (like github project link with latest updates). Thanks in advance...

Regards,
Manoj Kumar Gurram



IL Indhumathy Loganathan Syncfusion Team June 16, 2021 11:21 AM UTC

Hi Manoj, 
 
We have enabled the feedback visibility for you. So kindly check the below feedback link now. 
 
 
You can find the updated Azure service provider from the below link. 
 
 
To configure File Manager component in your sample, you can follow the steps in the below document by including the shared Azure service provider. 
 
 
Please let us know if you need any further assistance. 
 
Regards, 
Indhumathy L 


Loader.
Up arrow icon