-
Notifications
You must be signed in to change notification settings - Fork 773
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
Cannot build F# .NET Standard project when referenced from C# .NET Core project #5640
Comments
cc @KevinRansom |
Is this related to #4075? |
@phillip, I tried this on my work machine it works fine; ans also I tried it on a clean VM and it works fine. I think you may have environmental issues. |
Yep, this seems like it was environmental. I had a bunch of SDKs on my machine, multiple previews, and other various weird things with my VS install that may have resulted in the wrong SDK being picked up. With a fresh install, it's all golden. |
I see the same error, but without any C# projects involved. Indeed, at stock Visual F# compilation is ok (version 15.8.20180810.4). But using any later nightly build I see this error:
Here But there is no error when compiling in console.
The |
@cartermp Upping the issue. Maybe open new issue for my problem? |
So … this is is the cause: https://github.com/Microsoft/visualfsharp/blame/89275d2ce1ec3953d737017a8be087c2579259f3/src/fsharp/FSharp.Build/Fsc.fs#L295 The buildtask property for Embedded Source files was renamed from Embed to EmbeddedFiles. The corresponding Microsoft.NetSdk.targets and Microsoft.FSharp.Targets file were updated at the same time. The error would seem to indicate that a mismatched set of targets and buildtask are in use. Could you please set the build verbosity to diagnostic, and build the project within VS, and copy and paste the results to a text file and attach the file to this issue, and I can see if I can figure out why. Thanks Kevin |
@irium yes it is. |
Hmm, now after updating Visual studio to 15.8.5 and installing latest nightly the behavior is strange: |
There isn't really much that we can do about this. It seems to occur because msbuild processes are cached, and shared between instances of visual studio. Which seems a bit wierd to me ... In order to repro this I had to:
This wierdness gave me a reliable repro. An explanation, I hope this helps, Kevin |
One has to love the MSBuild node reuse feature. :) |
@KevinRansom Hmm, I have no VS2017 Preview installed. All my mentioned builds was executed in the same VS2017 Pro instance. |
Can you try to set the environment variable Then reboot, to make sure it is actually applied. This will globally disable the node reuse feature. If you want, you can delete the env var again afterwards, but I always set it first thing after installing VS, got burnt too often ... |
@0x53A, it seems as if this actually a bug in the project system. That causes the design time build to not use the compiler from the nightly. When we do a regular build, the wrong build task is already loaded. Trying to track it down right now. Kevin |
This seems to be the related issue: https://developercommunity.visualstudio.com/content/problem/319486/intellisense-of-nuget-packages-is-broken.html |
I confirm that killing running |
Closing as an underlying root bug is being fixed in 15.8.6, and the F# component to this is solved with #5700. When 15.8.6 is released, the F# nightly feed should have the full fix. |
I am getting the two errors in the OP intermittently with VS 15.9.4 and F# nightly 15.8.20181217.1. The comments above suggest it should be fixed in 15.8.6 and the nightlies, is that no longer the case? I made sure also to delete the .vs folder as mentioned in the link above but the issue still reoccurs. The errors get cleared by killing msbuild.exe but eventually reoccur. Is there more to come regarding a fix in 16.0 or is there potentially another issue? |
@cartermp tested now and couldn't reproduce with nightly uninstalled. However I reinstalled nightly and can't repro at all, so it's kind of random. |
With the nightly installed, I can generally repro a transient/recoverable occurrence of the error by adding a nuget reference to Microsoft.EntityFrameworkCore to a F# .NET Core class library. After producing the error upon package install, it still builds successfully and then clears the error. (I've also experienced a persistent version of the error where the build fails until doing the msbuild kill but don't know how to repro that on demand.) With nightly uninstalled, I cannot repro the above recoverable error. I will run without nightly for a while to see if it occurs at all. |
Another PC, nightly 1217.1: |
No repro since uninstalling nightly. |
Using VS 15.8.4:
Two errors:
MSB4064 The "EmbeddedFiles" parameter is not supported by the "Fsc" task. Verify the parameter exists on the task, and it is a settable public instance property.
MSB4063 The "Fsc" task could not be initialized with its input parameters.
The text was updated successfully, but these errors were encountered: