# Opening 2 years old project in visual studio

**URL:** <https://forums.fsharp.org/t/opening-2-years-old-project-in-visual-studio/1619>\
**Category:** General\
**Created:** [February 7, 2021, 7:32am UTC](https://forums.fsharp.org/t/opening-2-years-old-project-in-visual-studio/1619 "2021-02-07T07:32:08Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![babysnakes](https://avatars.discourse-cdn.com/v4/letter/b/96bed5/32.png) [@babysnakes](https://forums.fsharp.org/u/babysnakes)\
**Post date:** [February 7, 2021, 7:32am UTC](https://forums.fsharp.org/t/opening-2-years-old-project-in-visual-studio/1619/1 "2021-02-07T07:32:08Z")

</div>

Hi

Recently I switched to windows and I decided that it’s a good opportunity to lean F#. I peaked up the _Get Programming with F#_ book and started reading. One of the project in the book is [this one](https://github.com/isaacabraham/monopoly). However when I opened it in Visual Studio 2019 and tried to build it I got the following error:

```auto
|Error||Unknown build error, 'Cannot resolve dependency to assembly 'FSharp.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.'|MonopolyGui||||

```

This corresponds directly with one of my fears of .Net programming - It’s too tied up to the specific environment and IDE. I’m not against working in IDE (although I prefer editors like VSCode) - I’m really against requiring an IDE to build the project …

So I have several questions:

- Is there a relatively easy way to open and build this project?
- How can I list what F# versions I have installed?
- I know that you can edit new F# projects in VSCode but I also heard about requiring Visual Studio if you want to build in certain frameworks (like building for android). So if I mainly want to use F# for command line tools and cross platform GUI applications (Avalonia?) will I have to build it on visual studio or can I use VSCode?

Thanks in advance

Haim

---

<div class="post-metadata">

**Author:** ![pblasucci](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.fsharp.org/pblasucci/32/788_2.png) [@pblasucci](https://forums.fsharp.org/u/pblasucci)\
**Post date:** [February 8, 2021, 8:50am UTC](https://forums.fsharp.org/t/opening-2-years-old-project-in-visual-studio/1619/2 "2021-02-08T08:50:57Z")

</div>

I can’t speak to Android as I’ve never tried to target it. However, there’s nothing about command-line applications or Avalonia that _requires_ Visual Studio (AFAIK). In order to have a “smooth” time with F# (on any platform), I’d recommend staying away from .NET Framework (if possible) and only using .NET Core (3.x) or .NET 5 (and up). In either case, you’ll want to install the relevant SDKs from here:

> **[Download .NET (Linux, macOS, and Windows)](https://dotnet.microsoft.com/download)**
>
> Free downloads for building and running .NET apps on Linux, macOS, and Windows. Runtimes, SDKs, and developer packs for .NET Framework, .NET Core, and ASP.NET.

As far as checking versions of things, a good starting point is to run the command:

```auto
> dotnet --info

```

from whatever console environment you like to use.

---

<div class="post-metadata">

**Author:** ![Prash](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.fsharp.org/prash/32/815_2.png) [@Prash](https://forums.fsharp.org/u/Prash)\
**Post date:** [February 8, 2021, 9:44am UTC](https://forums.fsharp.org/t/opening-2-years-old-project-in-visual-studio/1619/3 "2021-02-08T09:44:05Z")

</div>

Try using NuGet to adding a dependency to FSharp.Core (an older version from before the time that this sample was created). It is a best practice in general to add FSharp.Core as an explicit dependency for this reason, rather than using the version inferred by the currently installed tooling.

---

<div class="post-metadata">

**Author:** ![babysnakes](https://avatars.discourse-cdn.com/v4/letter/b/96bed5/32.png) [@babysnakes](https://forums.fsharp.org/u/babysnakes)\
**Post date:** [February 8, 2021, 9:44am UTC](https://forums.fsharp.org/t/opening-2-years-old-project-in-visual-studio/1619/4 "2021-02-08T09:44:17Z")

</div>

> [@pblasucci](#):
>
> there’s nothing about command-line applications or Avalonia that _requires_ Visual Studio (AFAIK)

That’s great to hear

> [@pblasucci](#):
>
> I’d recommend staying away from .NET Framework (if possible)

Yup, that was my feeling also 🙂

> [@pblasucci](#):
>
> `> dotnet --info`

ahhhh, this is really helpful, thanks.

I also managed to build the project after I installed a similar _Fsharp.Core_ version from nuget (it doesn’t seem to have 4.4…).

Great, thanks for the info.

---

<div class="post-metadata">

**Author:** ![babysnakes](https://avatars.discourse-cdn.com/v4/letter/b/96bed5/32.png) [@babysnakes](https://forums.fsharp.org/u/babysnakes)\
**Post date:** [February 8, 2021, 9:46am UTC](https://forums.fsharp.org/t/opening-2-years-old-project-in-visual-studio/1619/5 "2021-02-08T09:46:29Z")

</div>

> [@Prash](#):
>
> Try using NuGet to adding a dependency to FSharp.Core

Thanks, this is what I finally did when I figured out that _Fsharp.Core_ was not the fsharp version on my laptop but a dependency 🙂 (did I mention I’m a newbie?)

---

<div class="post-metadata">

**Author:** ![babysnakes](https://avatars.discourse-cdn.com/v4/letter/b/96bed5/32.png) [@babysnakes](https://forums.fsharp.org/u/babysnakes)\
**Post date:** [February 8, 2021, 9:48am UTC](https://forums.fsharp.org/t/opening-2-years-old-project-in-visual-studio/1619/6 "2021-02-08T09:48:34Z")

</div>

You can’t have 2 solutions selected ☹

Thanks @Prash and @pblasucci , both of your answers helped.
