You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[15.3 pre] loading in VS / publish fails if FSharp.Compiler.Tools is imported #3335
I have tried to test if / how a project using paket works in the new world of dotnet 2, comparing C#, F#, and the previous F# sdk (FSharp.NET.Sdk). I have also tested if using F# without paket works.
I am mostly interested in how to find out the cause of "Project file is incomplete. Expected imports missing." That may be something that could be changed on the paket side. (It would be even better if it worked without changes on the paket side).
@forki Thinking about this a little more, here is my preference for paket:
Always set DisableImplicitFSharpCoreReference and DisableImplicitSystemValueTupleReference.
Error out if there is no reference to the FSharp.Core nuget package, either explicitly, or as a transitive.
Maybe we should move that discussion to the paket repo ...
@0x53A@forki
Those switches are specifically to enable developers to override the defaults. So a paket converted project should set them if a developer wishes to use paket to override the behavior.
@KevinRansom yes but we're discussing if it should reference fsharp.core and valuetuple at all. I personally see only disadvantages of this. I think it should be removed right now before it hits a release and we have backwards compatibility issues.
Instead the dotnet template should explicitly reference it.
I think the auto referencing is great if you just want to get started. Similar to fsc.exe source.fs working.
But if you have a medium sized project, you never want "something" to be referenced, you need to actually control what you reference.
So I kind of agree with forki. The downside is two more lines in the absolutely simplest project.
The upside is more control and less unexpected behavior.
Activity
0x53A commentedon Jul 14, 2017
I am mostly interested in how to find out the cause of "Project file is incomplete. Expected imports missing." That may be something that could be changed on the paket side. (It would be even better if it worked without changes on the paket side).
0x53A commentedon Jul 14, 2017
I assume it is an issue in the F# implementation of Microsoft.NET.Sdk.
The equivalent C# project does work without issues:
full project: paket-csharp-test.zip
forki commentedon Jul 14, 2017
@enricosada probably knows
cartermp commentedon Jul 14, 2017
This does seem like a bug given that the same import works with C# projects. cc @KevinRansom
KevinRansom commentedon Jul 14, 2017
@0x53A
how is this file "...paket\Paket.Restore.targets" expected to get on the machine?
This is a dotnet sdk csproj with the paket import on a cleanly installed vs2017:
I believe the FSharp.Net sdk may have explicitly added support for paket.
forki commentedon Jul 14, 2017
No there was no support build into the sdk.
Paket.Restore.targets comes from paket itself. When you call install command.
0x53A commentedon Jul 14, 2017
Edited, please see initial post
0x53A commentedon Jul 14, 2017
@KevinRansom Attached is a working (well, at least for me) C# project
paket-csharp-test.zip
KevinRansom commentedon Jul 14, 2017
@0x53A
On my machine paket.exe wasn't in the .paket directory. Copying it to the .paket directory made it work fine.
Looking at the targets that seems to be the case. Does that work for you?
0x53A commentedon Jul 14, 2017
@KevinRansom Sorry, my initial post was a bit sloppy, just copy-pasting project xmls.
I have created a repository, with one branch for each test.
Can you please test if this works on your machine? My result is in readme.md https://github.com/0x53A/dotnet-tests/tree/fsharp+paket
cartermp commentedon Jul 14, 2017
Should there be a
paket.exein both the root director and the .paket folder?0x53A commentedon Jul 14, 2017
it looks like it doesn't matter, as long as there is one in either the root or the .paket.
39 remaining items
0x53A commentedon Jul 15, 2017
@forki Thinking about this a little more, here is my preference for paket:
Always set
DisableImplicitFSharpCoreReferenceandDisableImplicitSystemValueTupleReference.Error out if there is no reference to the FSharp.Core nuget package, either explicitly, or as a transitive.
Maybe we should move that discussion to the paket repo ...
KevinRansom commentedon Jul 16, 2017
@0x53A @forki
Those switches are specifically to enable developers to override the defaults. So a paket converted project should set them if a developer wishes to use paket to override the behavior.
forki commentedon Jul 17, 2017
@KevinRansom yes but we're discussing if it should reference fsharp.core and valuetuple at all. I personally see only disadvantages of this. I think it should be removed right now before it hits a release and we have backwards compatibility issues.
Instead the dotnet template should explicitly reference it.
0x53A commentedon Jul 17, 2017
I think the auto referencing is great if you just want to get started. Similar to
fsc.exe source.fsworking.But if you have a medium sized project, you never want "something" to be referenced, you need to actually control what you reference.
So I kind of agree with forki. The downside is two more lines in the absolutely simplest project.
The upside is more control and less unexpected behavior.
forki commentedon Jul 17, 2017
"The downside is two more lines in the absolutely simplest project."
that would be scaffolded by dotnet new - I don't see that as a downside.
KevinRansom commentedon Jul 17, 2017
There are knobs to disable it. You can control when you need to, and not be bothered by it when you don't want to.
Set the disable flags and type what you want.
forki commentedon Jul 17, 2017
0x53A commentedon Jul 17, 2017
@forki, they do work correctly for the sdk, but unfortunately the compiler has a second magic reference resolution for fsharp.core. see #3340
forki commentedon Jul 17, 2017
yes that's what I meant. The sdk build should never succeed - it should probably pass an arg to compiler.
0x53A commentedon Jul 17, 2017
@forki I went through https://docs.microsoft.com/de-de/dotnet/fsharp/language-reference/compiler-options, and there does not seem to be a way to disable that (unless there is an undocumented flag).
forki commentedon Jul 17, 2017
@0x53A yeah it needs to pass a NEW arg ;-)
0x53A commentedon Jul 17, 2017
sooo, do you want to work on the pr? :D
forki commentedon Jul 17, 2017
no I actually just want it to work ;-)