Closed sergey-tihon closed 5 years ago
@sergey-tihon My understanding is that you should just use this in your TPDTC code:
assembly.Location |> Path.GetDirectoryName |> this.RegisterProbingFolder
and ship all assemblies alongside the TPDTC component(s), similar to here: https://github.com/demetrixbio/FSharp.Data.Npgsql/blob/e0f32ac176f0afac1b22d38f2d07babf3cb46ab2/src/DesignTime/TypeProviderAssembly.fs#L32
Thank you, I close this is favor of #274 with more specific error and repro steps
Description
I am trying to migrate SwaggerProvider to the new project format (for now targetting
net45
only) and I cannot build test project with TP - https://github.com/fsprojects/SwaggerProvider/pull/110The question is - what is the right strategy to resolve dependency for the design-time component? Historically we did it using custom assembly resolver on app domain
and code that able to find dependencies restored from NuGet https://github.com/fsprojects/SwaggerProvider/blob/master/src/SwaggerProvider.DesignTime/Configuration.fs
Seams that it is not enough using
dotnet build
. //cc @dsymeCommand line
It fails from the command line on macOS and Windows with the error (for more details https://ci.appveyor.com/project/sergey-tihon/swaggerprovider/build/0.0.1.585 )
VS 15.6.6
It shows TP error from time to time
but intellisence may work even when TP report an error...
Logs from custom assembly resolver
Rider 2018.1 EAP on Win
Same error in Rider but build works
Logs from custom assembly resolver
Rider 2018.1 EAP on macOS
Rider can show intelligence & compile but it uses Mono msbuild
VS for Mac 7.4.2 (Build 12)
VS for Mac cannot show intellisence and cannot compile
Logs from custom assembly resolver
Repro steps
Check out
newproj
branchExecute
build.sh
Related information