Fsharp: Cannot build after clean clone

Created on 23 Jun 2019  Â·  23Comments  Â·  Source: dotnet/fsharp

I try to build this repo (via Build.cmd) and get the following error:

PS> .\Build.cmd
Building bootstrap compiler
Downloading vswhere
Downloading RoslynTools.MSBuild 16.1.0-alpha
(NETCORE_ENGINEERING_TELEMETRY=InitializeToolset) No package matching package identifier RoslynTools.MSBuild and version 16.1.0-alpha was found in the given feed.

This seems to be the same issue as with https://github.com/dotnet/winforms/issues/628.

Repro steps

  1. Get a fresh clone of the master branch (I tried with 6633abe).
  2. Run Build.ps1

Expected behavior

Build succeeds.

Actual behavior

The error above is given.

Known workarounds

Having the RoslyTools.MSBuild package already cached.

I'd say updating the RoslyTools.MSBuild package or dependents should solve this.

Area-Infrastructure Contributor Pain regression

All 23 comments

Based on the winforms issue it's an arcade problem; @mattgal is there anything we can do here?

@TIHan Since brett and kevin are OOF, can you see if this can get resolved? This issue prevents anyone from contributing.

As an quick update from my side:
I just tried to build from a clean clone on a second machine, where it seems to be fine.
The obvious difference seems to be, that on the second machine has an Installation of VS2019 on it. Could this make any impact?

@jaredpar / @tmat as FYI. I think based off the discussion last time this happened that there isn't actually a "16.1.0-alpha" version of that package (only 16.0.0?) and building on a machine with VS 2019 is a workaround because it contains usable versions of the msbuild functionality used there; one of those guys can likely comment about this.

The repo declares that in requires VS 2019 Update 1 for build: https://github.com/dotnet/fsharp/blob/master/global.json#L5

If the required VS is not present the build falls back to RoslynTools.MSBuild package, if it exists. Seems like we don't have this package for 16.1.

@ChrSteinert Yes, use of VS 2019 is required to develop on Windows. This is because calling Build also builds the tools. We also build these with dependencies only in VS 2019.

@tmat Should this resolve it, or is there something we should do about the package?

@cartermp I see. This should be in the README I think. And the DEVGUIDE says "If you have Visual Studio..." which does not made it clear to me ;)
Scanning through the global.json seems not a good way of finding out that is does not work without VS.

But as it is not an issue on a machine with VS, I am going to close this then.

Thanks for the efforts!

@cartermp Having the package for 16.1 would be useful, so that your repo can build in CI w/o VS installed.
You can also specify an explicit version for that package if a lower version is acceptable for the build:
https://github.com/dotnet/arcade/blob/master/Documentation/ArcadeSdk.md#globaljson

Actually I think I want to re-open this. We now clearly have machine dependencies to work on our repo again, which is something we explicitly worked to move away from.

I don't know what the proper course of action is here but it's unacceptable to have steps that are anything other than:

  1. Clone the repo
  2. Run build

Unless someone wants to build the VS tools as well.

cc @brettfo @KevinRansom @dsyme

Then maybe change the title as well?

So far I was not able to figure out where the dependency for the RoslyTools is set. But maybe we just try updating them?
I still have the machine without VS sitting around for testing ;)

@cartermp I'm not sure if that's the right default. Usually, I'd expect the whole repository to build when I run build, which means it will require VS. It's ok to provide another command (e.g. build-compiler) that only builds a subset. For example, Roslyn has Compilers.sln so you can run dotnet build Compilers.sln and that does not have dependency on VS.

I'll look to see if we can add a compiler only build.

Hopefully this will resolve it: https://github.com/dotnet/fsharp/pull/7071

Regarding msbuild:

Looking at the feed at https://dotnet.myget.org/feed/roslyn-tools/package/nuget/RoslynTools.MSBuild, there is no 16.1.

maybe relevant:

https://github.com/dotnet/winforms/pull/647

[...] which is a workaround for Arcade hard-coding this path to include our tools.vs.version + .0-alpha which is no longer valid

So it looks like you either need to change to a different feed, or someone (roslyn team?) needs to upload the 16.1 version

What's the status here?

build.cmd -noVisualStudio should work if you don't have the right VS installed

I just tested this on a Fresh VM and it just worksâ„¢! :)
This should be added to the README, then I'll be happy. Can I help with the REAMDE?

@chrsteinert please send a PR

@ChrSteinert please reopen. Even though the workaround works it should really build without it, and the issue is not fixed.

@auduchinok is correct. This is a work around.

Closing out as it appears we won't be able to get into a "you don't need VS on windows" world if you build without -noVisualStudio. Ah well.

Hey @cartermp – I’ve seen your extensive answers to some of the „duplicates“. This all makes sense to me, and while it is a (little bit of) pain,I see the potential effort to fix this is not outweighed by the benefits.
So thanks for the insights and the housekeeping efforts to close this! :)

Was this page helpful?
0 / 5 - 0 ratings