Forum Xamarin.Forms

Error "{System.IO.FileNotFoundException}"

Tibogri78Tibogri78 Member
edited June 2020 in Xamarin.Forms

Hello,
I come here today to ask you for help with my code.
Here's my problem:
When I launch my app, everything goes well and when I click on a button to access a specific page, Visual Studio returns the following error:

Here is the problematic code :

` using courseBac.Models;
using CsvHelper;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;

namespace courseBac.Data
{
    public class CSV
    {
        public BaremeMarche BaremeMarche { get; set; }

        public CSV(string path)
        {
            using (var reader = new StreamReader(path)) 
                using(var csv = new CsvReader(reader, CultureInfo.InvariantCulture))
            {
                var records = csv.GetRecords<BaremeMarche>();
            }
        }
    }
}`

And here is the tree of my files :

If you know what the problem is, I would be delighted
Thank you so much
Cordially
Thibault

Sign In or Register to comment.