-
Notifications
You must be signed in to change notification settings - Fork 789
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
Support modern MSBuild 15 like fsproj #2316
Comments
@forki -- the dotnet sdk team are creating templates for F# VS and coreclr. |
We don't need templates. We need vs to load fsproj - or what am I missing?
Am 24.01.2017 8:14 nachm. schrieb "Kevin Ransom (msft)" <
[email protected]>:
… @forki <https://github.com/forki> -- the dotnet sdk team are creating
templates for F# VS and coreclr.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2316 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADgNHXdVdtC4HLBpM6O8GhYedoG4WZCks5rVk14gaJpZM4LskAL>
.
|
FTR: my sample project has absolutely valid fsproj according to dotnetcore and MSBuild. It works absolutely nice with paket integration and ionide understands everything correctly. |
Sounds great ... looks like it's using the new dotnet SDK ... perhaps you can chat with them about what is missing ... @enricosada might also be able to point you in the right direction. |
who is them? |
@KevinRansom just to clarify the scenario:
I'm not sure this is a CLI or SDK concern; I think this is squarely our problem to solve. As it stands, there is no way to open an F# project using the MSBuild15 |
Thanks @cartermp - started to completely question myself. |
I think the generated fsproj is fine dotnetcli is doing the right thing thanks to @enricosada. It's "just" VS is rejecting it. So it's definitely a VF# concern. |
Visual Studio is apparently not yet shipping with an SDK that installs enrico's sdk additions. I am looking at a build from the latest rtm branch. I will follow up with the DOTNET SDK team directly, or someone can follow up with them on the dotnet cli repo. Piotr is in a one on one and then shiproom right now otherwise I would have a definitive answer. Kevin |
@KevinRansom preview4 already works, What's needed always ship with sdk, after preview3 are just enhancement and cleanups. Also preview3 was working. AFAIK vs should
How vscode works now? How can have intellisense? On build a compile-fsc.rsp is generated who is the response file use for fsc, and ionide read that to initialize the FCS. If you want to try latest version with preview4, see my pr. |
@KevinRansom what sdk version is used? Becuase fsproj works with all msbuild based preview3,4 and new rc. If we know a valid c# template is also easy to modify to be an f# one, changes are minimal. I hope to have an installed VS2017 RC soon, to try it. |
@ enrico so ... Moving the project system to CPS should now be orthogonal. The "joy" of moving back to msbuild based projects means that our current project system should work reasonably well. As I said I will chat with Piotr and find out why your stuff didn't yet ship. And see if there are some modifications we can propose to the templates. Kevin |
@KevinRansom about c# I mean seeing the template can show what version of f# template use. In Preview3 for example The f# is just an additional normal PackageReference, so nothing ship with sdk. About cps/Roslyn yes is orthogonal, but maybe we can start work on that on master branch, more work becuase need to be implemented, but less work to adapt current code to msbuild. |
It seems to me that Goal 1 should be that VS can load a dotnet/cli fsharp template so that we can edit the source. Since we are now using msbuild that should not be too bad a problem to solve. Most of the project file editing would not have UI because we aren't yet on CPS but we should be able to add --- move, rename and remove F# source files. References will be problematic because they are quite different now and moving to CPS will help address that. It seems that we are not at Goal 1 - Piotr on DotnetCLI and Daniel on the MSBuild team tells me that your SDK project is included in box for dotnet cli, but not included inbox for VS. However, we should be able to author an F# template that doesn't use the SDK wiring which can be loaded into the F# Project System as is. For sure the current templates do not do so. |
Any progress on this? A month has passed. Could you be more clear where people can click New -> F# -> .NET Core console application and it will work, including debugging? Are we waiting until @enricosada has finished something? MSBuild team? Other people? |
@vasily-kirichenko i have nothing more to do for f# in .net core sdk 1.0 and the new fsproj afaik. I added f# templates to About intellisense/projectsystem/debug/etc in VS dunno, i'll try to work on it, but on the long term roslyn-project-system based option, and later after rtm. |
@vasily-kirichenko some wip by kevin about this in #2482 |
@enricosada and I were trying to make it work. Results (VS RC4 + OSS VSIX built from current master):
<Project Sdk="FSharp.NET.Sdk;Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp1.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="Program.fs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="FSharp.NET.Sdk" Version="1.0.*" PrivateAssets="All" />
<PackageReference Include="FSharp.Core" Version="4.1.*" />
</ItemGroup>
</Project>
<DontRunFscWithDotnet>true</DontRunFscWithDotnet>
<FscToolExe>fsc.exe</FscToolExe>
<FscToolPath>e:\github\visualfsharp\release\net40\bin\</FscToolPath> and we had to copy a bunch of assemblies from related packages to
and we had to copy After all these hacks:
What does not work:
<ItemGroup>
<PackageReference Include="FSharp.NET.Sdk" Version="1.0.*" PrivateAssets="All" />
<PackageReference Include="FSharp.Core" Version="4.1.*" />
</ItemGroup> I think they should be moved to Debugging: |
Love seeing progress on this 😃 .NET Core console apps should be launched with just |
@slang25 thanks :) |
Added dotnet/netcorecli-fsc#87 to locate dotnet, so netcore fsc will work (no need to override with .net full version of fsc) |
I'll add some todo there, but should be a checklist in another meta issue (not this one) about "modify current project system to handle new fsproj", with all open points, issues found.
|
@vasily-kirichenko good, but that @vasily-kirichenko i am more scared about file moves/deleted/added, or references added
that's probably because the fsproj has no f# project guid (is not used anymore in new msbuild, because all csproj is using cps capabilities instead). we can add that, but maybe is better not do so? (ref scared about add files) |
So I think project modifying and saving inside VS is not the main concern right now. |
After the really promising and unexpected work in dotnet/project-system#1670 to enable F# with CPS and new roslyn project system, ihmo is useless to do work to patch the old project system. @KevinRansom what do you think? |
How can this process be speed up? Which help is required? |
@xperiandri see comments in dotnet/project-system#1670 |
That is excellent! |
@cartermp any update on when we might see a usable (even if beta) release for VS2017? |
AFAIK, July is a super optimistic estimate. |
@GiorgioG Current target is July. Issues tracking it are here: https://github.com/dotnet/project-system/issues?q=is%3Aopen+is%3Aissue+label%3AArea-F%23 The "15.3" milestone represents the third update to VS 2017, which is likely to be around July. |
I apologize if I missed something, but here is my issue/question: I created a FSharp project with From command line:
My understanding is that dotnet CLI uses MSBuild 15 engine (APIs) under the covers, so why does My environment:
Thanks |
@stanuku because VS msbuild doesnt include See #2928 (comment) If you copy But will not work in VS, because VS doesnt yet understand new project format ( more info in #3069 ) expected in July update |
@enricosada: Ok, understood. Thank you and please keep up the great work on F# front. |
@enricosada I've copied the F# SDK to the MSBuild cache and when I opened the .fsproj I got this error: Please let me know if I should wait till the next VS 2017 update or if there is a work around for this error. or post this error/issue in some other repo? |
@stanuku while copying sdk directory will make msbuild work from command line, is not enough for VS VF# extension, who need work for support the new project format (is a big change, but near completion). See roadmap, need to wait until VS 2017 15.3 update at least (july timeframe) |
Closing this now, as these projects load with 15.3. The current way to use them:
(Yes, the .NET SDK is independent of VS. You will also need this to get .NET Core 2.0 support in VS 2017 Update 3 Previews). There is a small amount of remaining work left in our own language service to no longer depend on |
Should it be Preview 3 CLI? |
Nope, the one linked above is the one to use. There is no Preview 3 of the CLI (at the time of writing this). There is also no affinity between the VS version and CLI version. They have been designed so that you can update the .NET Core CLI and SDK out of band from VS. |
@cartermp, thanks. Here is an issue dotnet/project-system#2534 |
Should the files be in alphabetical order? |
@Thorium Most issues are being tracked here: https://github.com/dotnet/project-system/issues?q=is%3Aopen+is%3Aissue+label%3AArea-F%23 If you're using 15.5, then I suspect your issues with IntelliSense are due to #3653, which enables project-to-project references and fixes a bug where adding files results in IntelliSense issues. In 15.3, the projects will load but they're not fully supported at all. Also, the alphabetical issue is tracked in this repo, along with a few other issues: https://github.com/dotnet/project-system/issues?q=is%3Aopen+is%3Aissue+label%3AArea-F%23 |
Thanks, I'm using 15.3 as there is no official 15.5 yet. Let's hope it won't vanish from the release version of 15.5 like F# features of Visual Studio often tend to. |
I have a project with MSBuild 15 see
https://github.com/fable-compiler/fable-suave-scaffold/blob/master/src/Server/Server.fsproj and works perfectly in ionide. Visual Studio 2017 RC says it is not supported.
@cartermp @KevinRansom @enricosada what's the plan for this?
The text was updated successfully, but these errors were encountered: