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

WIP Initial support for .NET Core #197

merged 46 commits into from Mar 12, 2019


None yet
1 participant
Copy link

commented Mar 5, 2019

Inspired by discussion on #185 I've tried to add a side-by-side .NET Core and .NET Framework projects. This lets us work on the .NET Core while keeping the existing one working.

cgravill added some commits Feb 24, 2019

Disable debugger starting.
Better coexistence between netframework and netcore
We no longer seem to need NetMQ.dll reference
Getting rid of it eases .NET Core compatibility

@cgravill cgravill self-assigned this Mar 5, 2019


This comment has been minimized.

Copy link
Member Author

commented Mar 7, 2019

I think this is working correctly but Travis fails with:
dpkg-deb: error: archive '/var/cache/apt/archives/aspnetcore-runtime-2.2_2.2.2-1_amd64.deb' has premature member 'control.tar.xz' before 'control.tar.gz', giving up

I'm going to try splitting up the build to run different parts on different providers but it may take a while.

cgravill added some commits Mar 9, 2019

macOS and Linux builds Azure builds
Try enabling the macOS and Linux builds on Azure DevOps
Update FCS and FAKE
Try to workaround Paket fetch issues on Linux
Try stepping SDK back to 2.1 for Travis.
Try Linux builds on AppVeyor

@cgravill cgravill changed the title Initial support for .NET Core WIP Initial support for .NET Core Mar 9, 2019


This comment has been minimized.

Copy link
Member Author

commented Mar 10, 2019

I've tracked through the error. On Ubuntu and macOS it fails with:

/usr/share/dotnet/sdk/2.2.104/FSharp/Microsoft.FSharp.Targets(265,9): error MSB6003: The specified task executable "fsc.exe" could not be run. Permission denied [/home/vsts/work/1/s/src/IfSharp.Kernel/IfSharp.Kernel.fsproj]

I found that if I manually edit Paket's Paket.Restore.targets and comment out these parts:

<PackageReference Include="%(PaketReferencesFileLinesInfo.PackageName)">
  <PrivateAssets Condition=" ('%(PaketReferencesFileLinesInfo.AllPrivateAssets)' == 'true') Or ('$(PackAsTool)' == 'true') ">All</PrivateAssets>
  <ExcludeAssets Condition=" '%(PaketReferencesFileLinesInfo.Splits)' == '6' And %(PaketReferencesFileLinesInfo.CopyLocal) == 'false'">runtime</ExcludeAssets>
  <ExcludeAssets Condition=" '%(PaketReferencesFileLinesInfo.Splits)' != '6' And %(PaketReferencesFileLinesInfo.AllPrivateAssets) == 'exclude'">runtime</ExcludeAssets>
  <Publish Condition=" '$(PackAsTool)' == 'true' ">true</Publish>

then it avoid the error. The error only occurs with a command-line dotnet call. The projects builds on Visual Studio for Mac.

Anyone with any clues on this one? I'll need to try to determine the root cause of this or a minimal reproduction.

cgravill added some commits Mar 10, 2019

Separate out dependency groups
Having one group between net472 and netcore or netstandard appears to cause issues on macOS & Ubuntu. Separate them out.

This comment has been minimized.

Copy link
Member Author

commented Mar 10, 2019

So after a lot of experiments with local and build agent I've concluded that mixing:

  • Paket groups with both net472, netstandard, netcoreapp
  • Package auto-restore
  • macOS or Ubuntu
  • Command-line dotnet builds

all at once has issues. Elsewhere I'll try to isolate an and report the actual problem.

The good news is that I've separated out the dependencies and this now builds for me locally on Windows and macOS. We also have the .NET Core builds going on Ubuntu and macOS agents. The original .NET Framework builds still work correctly on Travis.

I'll let this cool off for a little while but if anyone could give it a go that would be a really good validation. To set expectation the .NET Core version can only do very simple things, this is just a foundational bit of work.

@cgravill cgravill merged commit 0c65682 into master Mar 12, 2019

5 checks passed

IFSharp-CI #75 succeeded
continuous-integration/appveyor/branch AppVeyor build succeeded
continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed
fsprojects.IfSharp #20190310.8 succeeded

@cgravill cgravill referenced this pull request Mar 12, 2019


WIP: Migrate to .Net core #185

@cgravill cgravill deleted the sdkStyleProjects branch Mar 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.