Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't build using VS Build Tools 2022 version 17.0.1 #12467

Closed
thansen24 opened this issue Nov 29, 2021 · 7 comments
Closed

Can't build using VS Build Tools 2022 version 17.0.1 #12467

thansen24 opened this issue Nov 29, 2021 · 7 comments
Labels

Comments

@thansen24
Copy link

I have an existing F# library that is targeting 4.7.2 .net framework. This compiles fine in the VS 2022 IDE, but it won't compile using the VS Build Tools 2022 on our build server. Using VS 2017 and 2019 it compiled in both the IDE and Build Tools.

I receive the following error:

The target "Clean" does not exist in the project.

I think what's missing from the Build Tools install is:

C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VisualStudio\v17.0\FSharp\Microsoft.FSharp.targets

When I look at the IDE install paths, they look correct. This does exist:

C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Microsoft\VisualStudio\v17.0\FSharp\Microsoft.FSharp.targets

@thansen24 thansen24 added the Bug label Nov 29, 2021
@thansen24
Copy link
Author

Is there any resolution to this? It's preventing upgrading to VS 2022 because our CI pipeline uses the VS Build Tools instead of the IDE.

@ngyukman
Copy link

We just faced the same issue

As a workaround, copying

C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Microsoft\VisualStudio\v17.0\FSharp\,
to
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VisualStudio\v17.0\

C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\CommonExtensions\Microsoft\FSharp and
C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\CommonExtensions\Microsoft\FSharpSdk
to
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\IDE\CommonExtensions\Microsoft\

to the build machine temporary fix the issue

@KevinRansom
Copy link
Member

Oh is this the build tools install? I will take a look.

@KevinRansom
Copy link
Member

Somehow F# is no longer installed with the build tools sku. @brettfo will do the foo to put us back. It will probably arrive in preview 3.

@KevinRansom
Copy link
Member

We have found the fix and merged it. It will be published in
VS Build Tools 2022 17.2 Preview 3.

@stewienj
Copy link

stewienj commented Jun 16, 2022

Was this fix included in VS Build Tools 2022 17.2.1 ? We still seem to have this issue, and I have to trust that our CI server admins installed F# like I requested. It appears the payloads are now downloaded in 17.2.1, I can see they weren't with version 17.1.

@stewienj
Copy link

Was this fix included in VS Build Tools 2022 17.2.1?

Quick answer: Yes.

I've worked out what happened, if you just select the ".NET desktop build tools" Workload in the Visual Studio Build Tools installer it doesn't install F# by default, even though the description for that workload is "Tools for building WPF, Windows Forms, and console applications using C#, Visual Basic, and F#." To include F# in the installation you have to check the F# compiler box on the right side of the installer dialog. This step was missed by the person doing the installation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants