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

Is FCS still .NET 4.0? #160

Closed
forki opened this issue Jun 17, 2014 · 13 comments
Closed

Is FCS still .NET 4.0? #160

forki opened this issue Jun 17, 2014 · 13 comments

Comments

@forki
Copy link
Member

forki commented Jun 17, 2014

I tried to update FSharp.Formatting to use FCS 0.0.54 but now it complains that FCS is .NET 4.5 even if the nuget folder contains only a net40 folder.

image

The primary reference "FSharp.Compiler.Service" could not be resolved because it was built against the ".NETFramework,Version=v4.5" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0"

Any ideas what I'm doing wrong?

@quasilord
Copy link
Contributor

Recent versions of the FCS assembly have been compiled against .NET 4.5. Should we move it to "net45" in the nuget package?

@forki
Copy link
Member Author

forki commented Jun 17, 2014

why is 4.5 needed?

@quasilord
Copy link
Contributor

The change to use .NET 4.5 came via the integration of updates from visualfsharp.codeplex.com.
fsharp/fsharp@0577284

24543fb#diff-d81cb596fee05d911235bc8c0730075b

Possibly it lets FCS determine the correct location of the .NET 4.5 binaries to reference, see https:/fsharp/FSharp.Compiler.Service/blob/master/src/fsharp/ReferenceResolution.fs#L118

Is there any reason not to target .NET 4.5? We continue to target FSharp.Core 4.3.0.0, but that causes an issue too #156

@forki
Copy link
Member Author

forki commented Jun 17, 2014

Is there any reason not to target .NET 4.5?

Yes. FSharp.Formatting and FAKE use 4.0 and now

tumblr_inline_n6iplxea1u1raprkq

@quasilord
Copy link
Contributor

Ok. What do you think of putting both in the .nuget?

@forki
Copy link
Member Author

forki commented Jun 17, 2014

That would be awesome.

@forki
Copy link
Member Author

forki commented Jun 24, 2014

How can I help to get this resolved soon? /cc @dsyme

forki added a commit to forki/FSharp.Compiler.Service that referenced this issue Jun 24, 2014
forki added a commit to forki/FSharp.Compiler.Service that referenced this issue Jun 24, 2014
@dsyme
Copy link
Contributor

dsyme commented Jun 24, 2014

Hi @forki

It's more work, but looking at the feedback above, could you adjust the pull request to build both net40 and net45 versions of the DLL and add both to the nuget package?

@forki
Copy link
Member Author

forki commented Jun 24, 2014

ok will do

forki added a commit to forki/FSharp.Compiler.Service that referenced this issue Jun 25, 2014
forki added a commit to forki/FSharp.Compiler.Service that referenced this issue Jun 25, 2014
@forki
Copy link
Member Author

forki commented Jun 25, 2014

@dsyme It now creates a nuget package for .NET 4.0 and 4.5. but it's twice the size and I'm still wondering why we need the NET 4.5 dll.

Anyway it would be cool if you could merge this and release it. I'd like to update FAKE to the latest FCS.

@dsyme
Copy link
Contributor

dsyme commented Jun 25, 2014

@forki Love the animated GIF - where do you find these!?

Looking at the above discussion, it seems to me that the compiler does exercise the .NET 4.5 MSBuild API, which it uses to help resolve assembly references specified using F# Interactive. I believe these dependencies are currently trimmed out of FCS via CROSS_PLATFORM_COMPILER, (this is done because the MSBuild API implementatin is incomplete on Mono).

It would be good to continue to assess if there is any actual functional difference between the .NET 4.0 and .NET 4.5 versions of the DLL, or if the CROSS_PLATFORM_COMPILER trimming has any substantive impact on behavior w.r.t. reference resolution. In the meantime I'm ok with shipping two of them.

@forki
Copy link
Member Author

forki commented Jun 25, 2014

@forki forki closed this as completed in b84be6e Jun 25, 2014
fsgit added a commit that referenced this issue Jun 25, 2014
@forki
Copy link
Member Author

forki commented Jun 25, 2014

Here is my second trial: #167

ctaggart pushed a commit to ctaggart/FSharp.Compiler.Service that referenced this issue Jul 2, 2014
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