@Itai Bar-Haim ,
I reproduced the scenario using a console application and I don't see much difference in the outcome. Can you please recreate your scenario in the new container to check if you are receiving the same outcome.
For example, if I have only a file in the container, here is the outcome I got.
New Namespace
__id__foo.txt
Old Namespace
__id__foo.txt
If I have two files in the container, 1st at the root and another one in a directory, here is the outcome I got.
New Namespace
__id__foo.txt
folder/__id__foo1.txt
Old Namespace
__id__foo.txt
folder/
Here is the code I used to test the scenario
string storageAccount = "connection string";
string containerName = "testazureblobobjectstore";
var clientNew = new BlobServiceClient(storageAccount);
var containerNew = clientNew.GetBlobContainerClient(containerName);
containerNew.CreateIfNotExists();
Console.WriteLine("New Namespace");
foreach (var blobItem in containerNew.GetBlobs())
{
Console.WriteLine("\t" + blobItem.Name);
}
var accountOld = CloudStorageAccount.Parse(storageAccount);
var clientOld = accountOld.CreateCloudBlobClient();
var containerOld = clientOld.GetContainerReference(containerName);
containerOld.CreateIfNotExistsAsync().GetAwaiter().GetResult();
BlobContinuationToken config = new BlobContinuationToken();
var blobsListOld = containerOld.ListBlobsSegmentedAsync(config).GetAwaiter().GetResult().Results;
Console.WriteLine("Old Namespace");
foreach (var blobItem in blobsListOld)
{
if(blobItem is CloudBlobDirectory)
{
Console.WriteLine("\t" + ((CloudBlobDirectory)blobItem).Prefix);
}
if(blobItem is CloudBlockBlob)
{
Console.WriteLine("\t" + ((CloudBlockBlob)blobItem).Name);
}
}
System.Console.ReadLine();