# ResolutionFolder

**URL:** <https://forums.fsharp.org/t/resolutionfolder/3456>\
**Category:** General\
**Tags:** beginners\
**Created:** [December 6, 2023, 12:03am UTC](https://forums.fsharp.org/t/resolutionfolder/3456 "2023-12-06T00:03:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![netazoid](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.fsharp.org/netazoid/32/424_2.png) [@netazoid](https://forums.fsharp.org/u/netazoid)\
**Post date:** [December 6, 2023, 12:03am UTC](https://forums.fsharp.org/t/resolutionfolder/3456/1 "2023-12-06T00:03:59Z")

</div>

I am trying to do some csv work in F# Referencing this page:

[https://fsprojects.github.io/FSharp.Data/library/CsvProvider.html](https://fsprojects.github.io/FSharp.Data/library/CsvProvider.html)

the samples keep using the `ResolutionFolder` bit. Would someone explain to me what it does and why it is needed?

---

<div class="post-metadata">

**Author:** ![gauthier](https://avatars.discourse-cdn.com/v4/letter/g/919ad9/32.png) [@gauthier](https://forums.fsharp.org/u/gauthier)\
**Post date:** [December 6, 2023, 12:54am UTC](https://forums.fsharp.org/t/resolutionfolder/3456/2 "2023-12-06T00:54:49Z")

</div>

I think it is to make the path given as the first argument relative to that folder.

I suggest not using it and instead, rely on F# construction such as `CsvProvider< const ( __SOURCE_DIRECTORY__ + "/relativepath/from/sourcecode") >`

This works in all contexts, even for type provider that wouldn’t provide separate resolution folder kind of type argument.

---

<div class="post-metadata">

**Author:** ![netazoid](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.fsharp.org/netazoid/32/424_2.png) [@netazoid](https://forums.fsharp.org/u/netazoid)\
**Post date:** [December 6, 2023, 12:34pm UTC](https://forums.fsharp.org/t/resolutionfolder/3456/3 "2023-12-06T12:34:21Z")

</div>

as usual, Tomas provides a good explination here:

> <https://github.com/fsprojects/FSharp.Data/issues/934#issuecomment-216046167>
>
> I have a very simple file that is failing to load. The only way to make it work …is to add another column.
> 
> val it : CsvProvider\<...\> =
> FSharp.Data.Runtime.CsvFile\`1\[System.Tuple\`1\[System.String\]\]
> {Headers = Some \[|"Tag"|\];
> NumberOfColumns = 1;
> Quote = '"';
> Rows = Error: Attempted to access an element as a type incompatible with the array.;
> Separators = ",";}
> 
> \[dummy.zip\](https://github.com/fsharp/FSharp.Data/files/243484/dummy.zip)

I happened across this looking into something else. Posting here for future searches.

---

<div class="post-metadata">

**Author:** ![altbodhi](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.fsharp.org/altbodhi/32/1253_2.png) [@altbodhi](https://forums.fsharp.org/u/altbodhi)\
**Post date:** [December 13, 2023, 6:45am UTC](https://forums.fsharp.org/t/resolutionfolder/3456/4 "2023-12-13T06:45:06Z")

</div>

This is nice explanation, but why not allow set work dir for fsi? I think it will be right.
