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

Problems with target net461 on Linux #9

Open
bratfizyk opened this issue Apr 8, 2018 · 10 comments
Open

Problems with target net461 on Linux #9

bratfizyk opened this issue Apr 8, 2018 · 10 comments

Comments

@bratfizyk
Copy link

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

@theimowski
Copy link
Owner

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

@bratfizyk
Copy link
Author

should be compatible - well said ;).
I'll keep on trying anyway, but preferred to let you know.

@theimowski
Copy link
Owner

Yep, thanks for reporting the issue

@bratfizyk
Copy link
Author

bratfizyk commented Apr 22, 2018

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 ?

@theimowski
Copy link
Owner

does setting the homeFolder explicitly as suggested on SO help here?

@bratfizyk
Copy link
Author

Sadly - no. I'll keep on trying though.

@bratfizyk
Copy link
Author

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 ?

@theimowski
Copy link
Owner

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

@wjkhappy14
Copy link

NDP461-DevPack-KB3105179-ENU.exe

@wjkhappy14
Copy link

https://www.microsoft.com/en-us/download/details.aspx?id=49978

Microsoft .NET Framework 4.6.1 Developer Pack and Language Packs

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

No branches or pull requests

3 participants