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

Is FSharp.Data needed? #371

Closed
TheAngryByrd opened this issue Jun 16, 2017 · 11 comments
Closed

Is FSharp.Data needed? #371

TheAngryByrd opened this issue Jun 16, 2017 · 11 comments

Comments

@TheAngryByrd
Copy link

Is FSharp.Data a real hard dependency? I only ask because new dotnet proj files fail to build with FSharp.Data dotnet/netcorecli-fsc#16

@lefthandedgoat
Copy link
Owner

I added a feature for json validation and I use FSharp.Data for that.

canopy won't work with .net core right now either because Selenium doesn't work with .net core

@TheAngryByrd
Copy link
Author

TheAngryByrd commented Jun 16, 2017

Yeah, it won't work with .net core but with the new proj you can set the TargetFramework to net4x and get out a .net full exe and run it with .full/mono like normal. Only it won't compile because of the type provider issue list above with FSharp.Data. (dotnet/netcorecli-fsc#16 (comment))

@lefthandedgoat
Copy link
Owner

Hm. I haven't kept up with new proj file stuff.

Can you give me steps to repro? I have a VM I can install the latest whatever on.

If push comes to shove I can split this feature out into a sister package.

@TheAngryByrd
Copy link
Author

Yeah no problem. Give me a few minutes.

Thanks 🐱

@TheAngryByrd
Copy link
Author

TheAngryByrd commented Jun 16, 2017

https://github.com/TheAngryByrd/canopy-newprojstyle

Install .net/mono and .net core 1.x.
Install chrome and chrome driver

./run.sh or .\run.cmd

Should run a test against stackoverflow.

To recreate issue,

  • goto paket.depedencies and change canopy version to 1.4.x.
  • .paket\paket.exe install to get the new version
  • run again but you should be greeted by a build error
Assembly attribute 'TypeProviderAssemblyAttribute' refers to a designer assembly 'FSharp.Data.DesignTime' which cannot be loaded or doesn't exist. Could not load file or assembly 'FSharp.Data.DesignTime, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
warning FS3005: Referenced assembly 

@lefthandedgoat
Copy link
Owner

lefthandedgoat commented Jun 16, 2017 via email

@lefthandedgoat
Copy link
Owner

I removed the reference to FSharp.Data and split that into a sister package. You can download 1.50 and you should be good to go! Sorry about that.

@TheAngryByrd
Copy link
Author

No.problem! Not your fault. Stupid new tooling and living on the bleeding edge...Thanks a ton!

@baronfel
Copy link

baronfel commented Jul 1, 2017

It's definitely possible to use Type Providers in projects that are using the new SDK. You just have to invoke MSBuild directly and not through the dotnet sdk. Currently the dotnet build command always invokes the netcore version of FSC, which doesn't support type providers, but when msbuild is invoked instead you'll build fine. I'm doing this on a work project that still targets 461 but uses the new SDK.

so your overall flow is dotnet restore, then msbuild /t:Build, then dotnet pack or whatever your existing deployment strategy is.

@TheAngryByrd
Copy link
Author

@baronfel in my case I was using mono, do I need to be on 5.0 to be able to use msbuild then?

@baronfel
Copy link

baronfel commented Jul 12, 2017

yeah, it's a bit of a complicated matrix. If you want to do the new sdk/project files then you have to migrate to mono 5, because only msbuild 15 understands those files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants