fsprojects / FSharp.Data

F# Data: Library for Data Access
https://fsprojects.github.io/FSharp.Data
Other
815 stars 287 forks source link

Error loading DesignTime assembly. #144

Closed kolektiv closed 11 years ago

kolektiv commented 11 years ago

Trying the new release (1.1.5), I get errors in Visual Studio 2012 (the only place I've tried it so far). This is using the NuGet package, and adding it to a new F# Console Project (.NET 4.5) The error is

The type provider 'C:\Users\Andrew\Documents\Visual Studio 2012\Projects\DataTest\packages\FSharp.Data.1.1.5\lib\net40\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\Andrew\Documents\Visual Studio 2012\Projects\DataTest\packages\FSharp.Data.1.1.5\lib\net40\FSharp.Data.DesignTime.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) C:\Users\Andrew\Documents\Visual Studio 2012\Projects\DataTest\DataTest\Program.fs

It just doesn't seem to want to load that assembly. I'll try building it locally shortly.

kolektiv commented 11 years ago

Just to update on this - it seems it does load, but only when running VS2012 as Administrator. Is that expected/known behaviour? It seems a bit odd, but possibly that's by design?

tpetricek commented 11 years ago

Check out this SO answer with a couple of possible reasons. This really sounds like the third case (especially if you downloaded the type provider dll in a ZIP file).

PS: I'm having trouble loading SO but here is a cached version.

kolektiv commented 11 years ago

Weirdly enough I can't now reproduce (and this was a project reference via NuGet, which though technically a zip file doesn't seem to have that issue). Anyway, I'll close off for now and re-open if I find anything more.