SuaveMusicStore
SuaveMusicStore copied to clipboard
Problems with target net461 on Linux
Hi Tomasz,
First thing - the tutorial looks great. Thanks for creating it. Well done ! I've got a problem running it: I follow the instructions for creating a project with VS Code, but hit a problem at a very beginning. After creating the "suave" project, I get the following error when I try to compile it:
error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.6.1" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed.
(this occurs happens after using "./build.sh").
I believe this is because I'm missing the net461 target, which is used by the project by default. My configuration: mono (5.10.1.20), dotnet core (2.1.4), Linux Mint (18.3).
I solved this by substituting "net461" in SuaveMusicStore.fsproj with "netcoreapp2.0", but I guess I shouldn't need to do that and there's a better solution to make this work "out of the box".
Kind Regards, Arek
Right, the bootstrapping section could probably benefit from using dotnet SDK, which seems to be the preferred way to go now. Not really sure why the above error - mono should be compatible with this version. Good you found a workaround for now - in longer run it could make sense to amend the bootstrapping section to use dotnet CLI
should be compatible - well said ;). I'll keep on trying anyway, but preferred to let you know.
Yep, thanks for reporting the issue
More trouble: I've described it on StackOverflow: https://stackoverflow.com/questions/49971219/suave-with-netcoreapp2-0
For some reason the "browseHome" searches for the files in Suave nuget location, which is well... not something I'd like. Do you know if there's a walkaround ?
does setting the homeFolder
explicitly as suggested on SO help here?
Sadly - no. I'll keep on trying though.
Got some good news - I started a discussion on Slack in "dotnetcore" channel and there are people there who have already dealt with the problem.
I guess for the SuaveMusicStore the simplest option would be to use:
export FrameworkPathOverride=$(dirname $(which mono))/../lib/mono/4.5/
in the build.sh script. I added the line just before this one:
mono packages/build/FAKE/tools/FAKE.exe $@ --fsiargs -d:MONO build.fsx
Then everything compiles out of the box (i.e. for "net461" target framework). As this belongs to the template that creates "suave" project, I guess in order to fix it, I should talk to the author of the template, right ? By any chance do you know who's that ?
The templates are residing here: https://github.com/fsharp-editing/forge-templates
In the long run I think people want to convert to dotnet templating engine, so ideally the tutorial could be updated to use dotnet new
as well
NDP461-DevPack-KB3105179-ENU.exe
https://www.microsoft.com/en-us/download/details.aspx?id=49978
Microsoft .NET Framework 4.6.1 Developer Pack and Language Packs