# Visual Studio Code for F# on .Net Framework

**URL:** <https://forums.fsharp.org/t/visual-studio-code-for-f-on-net-framework/964>\
**Category:** General\
**Created:** [August 24, 2019, 9:53am UTC](https://forums.fsharp.org/t/visual-studio-code-for-f-on-net-framework/964 "2019-08-24T09:53:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Giulio](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.fsharp.org/giulio/32/529_2.png) [@Giulio](https://forums.fsharp.org/u/Giulio)\
**Post date:** [August 24, 2019, 9:53am UTC](https://forums.fsharp.org/t/visual-studio-code-for-f-on-net-framework/964/1 "2019-08-24T09:53:32Z")

</div>

Hi there 👋, have a good saturday! 😀

Is anyone using Visual Studio **Code** for a web F# project on .net **framework** ⁉

✅ Just in case, how can I set up and build the solution (from the terminal? with an extension? thanks for the details)

❌ Fallback question: should the above be not doable, do you think I can easily move to .net core and propose the installation of .net core on the productive server without affecting the other apps running there on the .net framework (yet I’m not confident that the infrastructure team will accept such request 😒)

---

<div class="post-metadata">

**Author:** ![Giulio](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.fsharp.org/giulio/32/529_2.png) [@Giulio](https://forums.fsharp.org/u/Giulio)\
**Post date:** [September 25, 2019, 12:05pm UTC](https://forums.fsharp.org/t/visual-studio-code-for-f-on-net-framework/964/2 "2019-09-25T12:05:00Z")

</div>

> [@Giulio](#):
>
> Is anyone using Visual Studio **Code** for a web F# project on .net **framework**?

Can anyone at least point me to a doc explaining how to configure the integration of vs code with ms build for .net framework?  
Thanks again

**Edit**

Maybe I’m confused but I’m afraid that what I’m trying to do is not possible.

The only thing I see is the possibility to do something like

```
dotnet build -f net461

```

But I **can’t** really compile a normal .Net framework project from Visual Studio MS Build in this way! Is this confirmed?

**Edit 2**

I’ve also tried the more promising

`dotnet msbuild MySolution.sln`

But I’m still getting an error:

```
C:\Program Files\dotnet\sdk\2.1.508\Microsoft.Common.CurrentVersion.targets(272
,5): error MSB4062: non è stato possibile caricare l'attività "Microsoft.Build.
asks.ResolveComReference" dall'assembly Microsoft.Build.Tasks.Core, Version=15.
.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. Verificare che la dich
arazione <UsingTask> sia corretta, che l'assembly e tutte le relative dipendenz
 siano disponibili e che l'attività contenga una classe pubblica che implementa
Microsoft.Build.Framework.ITask. [C:\dev\FSharp\microsoft\dotnet\MailForward\Ma
lForward.csproj]

```

This [SO question](https://stackoverflow.com/questions/47062203/net-core-error-on-build-error-msb4062-microsoft-build-tasks-resolvecomreferenc) (upvoted but almost unanswered) seems very related.

I’ve also tested a different kind of project and unfortunately I’m getting there a different error:

```auto
MSB4020: The value "" of the "Project" attribute in element <Import> is invalid.

```

So, in conclusion, I guess I should stick with the classical Visual Studio for all these projects

---

<div class="post-metadata">

**Author:** ![realparadyne](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.fsharp.org/realparadyne/32/169_2.png) [@realparadyne](https://forums.fsharp.org/u/realparadyne)\
**Post date:** [July 27, 2020, 9:33am UTC](https://forums.fsharp.org/t/visual-studio-code-for-f-on-net-framework/964/3 "2020-07-27T09:33:06Z")

</div>

Hi,

I have a .net framework project I modified so that it would work with ‘dotnet build’ and that I could edit with VS code. Though it isn’t [asp.net](http://asp.net) it does have a solution with C# and F# projects. In my case it’s a classic Windows Service.

The main thing to do was to create new project files using the new Sdk style rather than the original verbose .net/msbuild style. In the project files you can specify that it uses say net471 as the target framework.
