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

F# interactive error: TypeProviderAssemblyAttribute refers to FSharp.Data.DesignTime #844

Closed
iainnicol opened this issue Jun 10, 2015 · 2 comments

Comments

@iainnicol
Copy link

Create a new F# project and add FSharp.Data from Nuget.

Next, create an fsx script:

#I "bin/Debug"
#r "FSharp.Data.dll"
open FSharp.Data.CsvExtensions

module Main =
    let main () = ()
Main.main ()

Send the script to the F# interactive window (using alt+enter). Then you get the following error message:

Script1.fsx(2,1): error FS3031: The type provider 'C:\Users\Foo\Documents\Visual Studio 2015\Projects\fsharpdata\fsharpdata\bin/Debug\FSharp.Data.dll' reported an 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 'file:///C:\Users\Foo\Documents\Visual Studio 2015\Projects\fsharpdata\fsharpdata\bin\Debug\FSharp.Data.DesignTime.dll' or one of its dependencies. The system cannot find the file specified.

Weirdly, this error doesn't happen if you send the script to the F# interactive window again.

@franssu
Copy link

franssu commented Feb 19, 2016

I was trying to reference bin/Debug/FSharp.Data.dll from a .fsx, got the same error. So I referenced it from the Nuget package, i.e. "../packages/FSharp.Data.2.2.5/lib/net40/FSharp.Data.dll" in my case, and the error's gone (because this directory contains FSharp.Data.DesignTime.dll)

@kmadof
Copy link

kmadof commented Dec 22, 2016

I had the same when I copied project with FSharp.Data installed via NuGet. A reinstallation FSharp.Data on this project via NuGet helped.

@ovatsus ovatsus closed this as completed Apr 9, 2018
rdipardo added a commit to rdipardo/Fornax.Seo that referenced this issue Apr 26, 2021
Package builds now generate a copy of FSharp.Data.DesignTime.dll

This avoids the assembly path resolution problems reported in many
places, for example:

- fsprojects/FSharp.Data/issues/844
- dotnet/netcorecli-fsc/issues/16
- https://stackoverflow.com/q/3102472

Unfortunately we can't use any of the better solutions explained at
dotnet/fsharp/issues/3303, since they only apply to full-fledged
.NET projects, not scripts
rdipardo added a commit to rdipardo/Fornax.Seo that referenced this issue Apr 26, 2021
Package builds now generate a copy of FSharp.Data.DesignTime.dll

This avoids the assembly path resolution problems reported in many
places, for example:

- fsprojects/FSharp.Data/issues/844
- dotnet/netcorecli-fsc/issues/16
- https://stackoverflow.com/q/3102472

Unfortunately we can't use any of the better solutions explained at
dotnet/fsharp/issues/3303, since they only apply to full-fledged
.NET projects, not scripts
rdipardo added a commit to rdipardo/Fornax.Seo that referenced this issue Apr 26, 2021
Package builds now generate a copy of FSharp.Data.DesignTime.dll

This avoids the assembly path resolution problems reported in many
places, for example:

- fsprojects/FSharp.Data/issues/844
- dotnet/netcorecli-fsc/issues/16
- https://stackoverflow.com/q/3102472

Unfortunately we can't use any of the better solutions explained at
dotnet/fsharp/issues/3303, since they only apply to full-fledged
.NET projects, not scripts
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

4 participants