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
Support new sdk, the new fsproj of .NET Core Sdk #705
An important note: the .NET Core Sdk can build all target frameworks (net, netcore, pcl), so both .NET Framework and .NET Core projects. New fsproj is going to be the replacement for old fsproj, because is based on the new .NET Sdk
the msbuild from mono, .net full can run same project too.
FSC and related consumer (FSAC based ide) should support the new .NET Sdk, so for f# the new fsproj.
Ignore project.json because is dead, and there is a clean project.json -> fsproj migration, same features.
The workflow is the same, msbuild call Build target, who invoke fscusingFscTask from FSharp.Build.dll
The rest of sdk (Microsoft.NET.Sdk) is shared with the rest of .net (c#, vb)
Some notable changes from old fsproj atm: fsc is inside FSharp.Compiler.Tools, the target files in FSharp.NET.Sdk.
I miss some info.
Starting from the basics. What FCS need? What editors need? Previously that was done using project cracker, but maybe we can fix that without duplicate code/hacks.
My idea is also reuse code/lib from sdk/c#/omnisharp for common info (like compile items, etc), without hack/fork these in project cracker.
@enricosada
With the CPS work that is about to get moving in earnest, I believe that parts of the fsharp.sdk at least the targets and props are going to move into the dotnetsdk. which will mean it will always get deployed with the dotnet cli and VS. Which is a blessing because the IDE experience will be vastly improved by having these items immediately available on project new.
I'm not sure what that all means or how what the right distribution is.
Please work with @srivatsn and @brettfo and @piotrpMSFT to work out the correct distribution.
The actual language targets don't live in the dotnet/SDK repo. The only targets in the SDK repo are about the app models (for netcore generating deps.json for eg) or setting defaults for frameworks. The actual language targets should live elsewhere (preferably closer to the compiler\build task). For C# for eg, the targets file that has CoreCompile lives in the roslyn repo next to the csc task itself and the SDK.targets file in the Dotnet/SDK repo just imports it with a relative path in MSBuild. If we can standardize on where the FSharp.targets are deployed relative to msbuild (which we already have for projects created in VS atleast), then the SDK.targets can add a check for .fsproj and pull in the FSharp.targets similar to how it pulls in the csharp.targets.
I don't fully understand all the places fsproj is used but in my mind, there should be one fsharp.targets instead of the two it looks like we have today (VF# repo and the fSharp.sdk) - should we be consolidating to one place or another?
Using the path relative to msbuild in VS has been a stumbling point for a bunch of people who didn't realize VS2017 changed the path structure relative to older versions. I've had to change the targets for almost every F# OSS project I work on.
Has worked decently for me although for some people XBuild doesn't seem to support <= in project files, but they can use msbuild now so that's not a huge issue.
Why not set Environment variabales during the F# SDK installation and use that to find the targets like VS does?
or maybe set an envar per compiler version installation that way it'll be set to wherever the user decides and most of the guesswork will be out of the picture.
plus the envar can be aliased over in the process before the build starts if a different target set or a custom compiler build is needed for w/e reason.
Can someone give me a hand here please? I'd really, really appreciate help in getting this project to match the latest version of the .NET Core tooling - at least so it builds out of the box when that tooling is installed on the machine, and creates a good nuget package.
Currently this project requires the old preview2-1-003177 version of the .NET Core tooling to even build build.cmd All.NetCore. (If you have a later version installed then the command dotnet restore -v Information fails while running build.cmd All.NetCore). This is wrong since most people now have a later version of the tooling installed.
The AppVeyory CI machine configuration seems to have the old version of the .NET Core tooling preview2-1-003177 installed by default, which is why AppVeyor is able to build things for .NET Core. However fewer and fewer developer machines have this installed. This is a major problem but maybe there's a way to tell AppVeyor to acquire the latest version of the tooling?
I don't understand enough about the old/new versions of the .NET Core tooling to make this change easily. Nor do I understand how we are expected to check for the right version and acquire it if necessary.
I don't really care about ProjectCracker etc understanding the new project format just yet - i just want this project to build and test cleanly both on developer machines and on AppVeyor CI.
If someone who is up-to-date with .NET Core tooling coud update this project please I'd be hugely grateful....
I was working on this, on intellisense (with https://github.com/enricosada/dotnet-proj-info is pratically done, need refactor as lib) but i can do this migration now that 1.0 is out, if you think will unblock more.
@dsyme since the packages are getting cleaned up could this be ironed out at the same time #675 ?
The version on appveyor doesn't really matter, most netcore projects specify the version they want and download and use it instead of the one on the CI. I can get started on this
I think we should put somewhere information that point towards Enrico's project cracker that we use to obtain FSharpProjectOptions for "new fsrpoj" (https://github.com/enricosada/dotnet-proj-info/)
I think we should put somewhere information that point towards Enrico's project cracker that we use to obtain FSharpProjectOptions for "new fsrpoj" (https://github.com/enricosada/dotnet-proj-info/)
Activity
enricosada commentedon Feb 22, 2017
added a proposed solution on how to replace projectcracker for fsc args #707
enricosada commentedon Mar 3, 2017
Given now with #707 i can read the fscargs and p2p refs, what's missing there?
How to package it? more properties are needed?
KevinRansom commentedon Mar 3, 2017
@enricosada
With the CPS work that is about to get moving in earnest, I believe that parts of the fsharp.sdk at least the targets and props are going to move into the dotnetsdk. which will mean it will always get deployed with the dotnet cli and VS. Which is a blessing because the IDE experience will be vastly improved by having these items immediately available on project new.
I'm not sure what that all means or how what the right distribution is.
Please work with @srivatsn and @brettfo and @piotrpMSFT to work out the correct distribution.
srivatsn commentedon Mar 4, 2017
The actual language targets don't live in the dotnet/SDK repo. The only targets in the SDK repo are about the app models (for netcore generating deps.json for eg) or setting defaults for frameworks. The actual language targets should live elsewhere (preferably closer to the compiler\build task). For C# for eg, the targets file that has CoreCompile lives in the roslyn repo next to the csc task itself and the SDK.targets file in the Dotnet/SDK repo just imports it with a relative path in MSBuild. If we can standardize on where the FSharp.targets are deployed relative to msbuild (which we already have for projects created in VS atleast), then the SDK.targets can add a check for .fsproj and pull in the FSharp.targets similar to how it pulls in the csharp.targets.
I don't fully understand all the places fsproj is used but in my mind, there should be one fsharp.targets instead of the two it looks like we have today (VF# repo and the fSharp.sdk) - should we be consolidating to one place or another?
cloudRoutine commentedon Mar 5, 2017
Using the path relative to msbuild in VS has been a stumbling point for a bunch of people who didn't realize VS2017 changed the path structure relative to older versions. I've had to change the targets for almost every F# OSS project I work on.
Has worked decently for me although for some people XBuild doesn't seem to support
<=in project files, but they can use msbuild now so that's not a huge issue.Why not set Environment variabales during the F# SDK installation and use that to find the targets like VS does?
FSharpSDKs="C:\Program Files (x86)\Microsoft SDKs\F#"or maybe set an envar per compiler version installation that way it'll be set to wherever the user decides and most of the guesswork will be out of the picture.
plus the envar can be aliased over in the process before the build starts if a different target set or a custom compiler build is needed for w/e reason.
dsyme commentedon Mar 8, 2017
@enricosada @ncave
Can someone give me a hand here please? I'd really, really appreciate help in getting this project to match the latest version of the .NET Core tooling - at least so it builds out of the box when that tooling is installed on the machine, and creates a good nuget package.
Currently this project requires the old preview2-1-003177 version of the .NET Core tooling to even build
build.cmd All.NetCore. (If you have a later version installed then the commanddotnet restore -v Informationfails while runningbuild.cmd All.NetCore). This is wrong since most people now have a later version of the tooling installed.The AppVeyory CI machine configuration seems to have the old version of the .NET Core tooling preview2-1-003177 installed by default, which is why AppVeyor is able to build things for .NET Core. However fewer and fewer developer machines have this installed. This is a major problem but maybe there's a way to tell AppVeyor to acquire the latest version of the tooling?
I don't understand enough about the old/new versions of the .NET Core tooling to make this change easily. Nor do I understand how we are expected to check for the right version and acquire it if necessary.
I don't really care about ProjectCracker etc understanding the new project format just yet - i just want this project to build and test cleanly both on developer machines and on AppVeyor CI.
If someone who is up-to-date with .NET Core tooling coud update this project please I'd be hugely grateful....
thanks
don
enricosada commentedon Mar 8, 2017
there are two separate stuff:
I was working on this, on intellisense (with https://github.com/enricosada/dotnet-proj-info is pratically done, need refactor as lib) but i can do this migration now that 1.0 is out, if you think will unblock more.
i'll add more comments in #700
dsyme commentedon Mar 8, 2017
@enricosada Cool, thanks. Yes let's discuss the repo upgrade in #700
cloudRoutine commentedon Mar 8, 2017
@dsyme since the packages are getting cleaned up could this be ironed out at the same time #675 ?
The version on appveyor doesn't really matter, most netcore projects specify the version they want and download and use it instead of the one on the CI. I can get started on this
enricosada commentedon Mar 15, 2017
Added a working example using FSAC (called by vscode) in ionide/FsAutoComplete#53
There are also samples ready to use, see PR.
Now just restore Ian needed, project to project works, and in vscode also intellisense and F5 debug.
The integration to read fsproj (props/fsc args/p2p) exists as cli console app or library (lib is used by FSAC)
Feedback welcome!
enricosada commentedon Mar 16, 2017
as a note on progress with PR ionide/FsAutoComplete#53 , if someone want to review it (please! contains link to ready to use sample project too):
Is just FSAC code, so should work for everyone.
dotnet restore) is required, because need to restore FSharp.NET.Sdk. not build like previous implementationenricosada commentedon Mar 17, 2017
An update, released all required components:
and final FSAC integration (to replace projectcracker) wip in ionide/FsAutoComplete#55
in the PR there are info about how to test (with vscode), but is just FSAC code, so any client will do.
Added also ready to use projects (with packageref, p2p) in https://github.com/enricosada/DotnetNewFsprojTestingSamples
Krzysztof-Cieslak commentedon Jul 28, 2017
I think it can be closed, FCS behaves well as long as right compiler arguments are passed
dsyme commentedon Aug 14, 2017
@Krzysztof-Cieslak @enricosada I'm wondering, could/should a doc page or note be added to cover this?
Krzysztof-Cieslak commentedon Aug 14, 2017
I think we should put somewhere information that point towards Enrico's project cracker that we use to obtain FSharpProjectOptions for "new fsrpoj" (https://github.com/enricosada/dotnet-proj-info/)
dsyme commentedon Aug 14, 2017
@Krzysztof-Cieslak Yes, agreed!
baronfel commentedon Jun 10, 2020
Closing as done a long while back.