Coder Social home page Coder Social logo

mbraceproject / vagabond Goto Github PK

View Code? Open in Web Editor NEW
75.0 75.0 16.0 26.32 MB

A runtime assembly management library

Home Page: http://mbraceproject.github.io/Vagabond

License: MIT License

Shell 0.20% F# 77.16% C# 22.40% Batchfile 0.04% Dockerfile 0.19%

vagabond's People

Contributors

dsyme avatar eiriktsarpalis avatar forki avatar krontogiannis avatar mchylek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vagabond's Issues

Execution of Thunkserver sample in FSI

Running VS 2019 on windows 10.
Clone Vagabond.
Restore and Build
Highlight lines 14-25 of thunkServer.fsx
Alt+Enter to throw into FSI.

Get the following error in FSI

System.MissingMethodException: Method not found: '!!0 Microsoft.FSharp.Control.FSharpAsync.RunSynchronously(Microsoft.FSharp.Control.FSharpAsync`1<!!0>, Microsoft.FSharp.Core.FSharpOption`1<Int32>, Microsoft.FSharp.Core.FSharpOption`1<System.Threading.CancellationToken>)'.
   at ThunkServer.ThunkClient.InitLocal()
   at <StartupCode$FSI_0005>.$FSI_0005.main@()
Stopped due to error

Thought it was some sort of BindingRedirect issue, but cannot seem to get around it.

Have managed to get the Thunkserver working via an alternative method, so not super critical to have the FSI route specifically resolved.

Am more interested to learn why FSI cant find the method, to improve my overall F# knowledge

AppDomainEvaluatorPool.EvaluateAsync fails

AppDomainEvaluatorPool.EvaluateAsync fails to execute when given task takes much time.

Repro:

let pool = AppDomainEvaluatorPool.Create(ignore)
pool.EvaluateAsync(Async.Sleep(301*1000))
|> Async.RunSynchronously

Exception:

Unhandled Exception: System.Runtime.Remoting.RemotingException: Object '/e2b6a970_9fab_4127_bedf_41b129bd5b7b/sv4tot6qfn
m5xaa6plzpktd0_10.rem' has been disconnected or does not exist at the server.
   at Nessos.Vagabond.AppDomainPool.EvaluatorImpl.MarshalledTaskCompletionSource`1.SetResult(T t)
   at Nessos.Vagabond.AppDomainPool.EvaluatorImpl.setResult@449(AppDomainEvaluatorManager e, MarshalledTaskCompletionSou
rce`1 mtcs, Exn`1 result) in c:\Users\eirik\Development\nessos\Vagabond\src\Vagabond\Extras\AppDomainPool.fs:line 453
   at [email protected](Object x) in c:\Users\eirik\Development\nessos\Vagab
ond\src\Vagabond\Extras\AppDomainPool.fs:line 460
   at Microsoft.FSharp.Control.CancellationTokenOps.StartWithContinuations@1230.Invoke(T x)
   at <StartupCode$FSharp-Core>.$Control.loop@425-40(Trampoline this, FSharpFunc`2 action)
   at Microsoft.FSharp.Control.Trampoline.ExecuteAction(FSharpFunc`2 firstAction)
   at Microsoft.FSharp.Control.TrampolineHolder.Protect(FSharpFunc`2 firstAction)
   at <StartupCode$FSharp-Core>[email protected](Object state)
   at System.Threading.TimerQueueTimer.CallCallbackInContext(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object
state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, B
oolean preserveSyncCtx)
   at System.Threading.TimerQueueTimer.CallCallback()
   at System.Threading.TimerQueueTimer.Fire()
   at System.Threading.TimerQueue.FireNextTimers()
   at System.Threading.TimerQueue.AppDomainTimerCallback()

Probably related to this: http://stackoverflow.com/questions/2410221/appdomain-and-marshalbyrefobject-life-time-how-to-avoid-remotingexception

/cc mbraceproject/MBrace.Azure#75

Cecil error

Taken from mbraceproject/MBrace.Core#169
Adding the following code in any Vagabond/Fsi session:

type A<'T> = class end
type B<'T,'U> = class end

type C =
    static member G x : A<'T> = failwith ""
    static member F x : A<'T> = C.G (fun () -> x)

type D =
    static member F (x:A<B<_,_>>) = C.F x

Will result in the following error:

System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
   at Mono.Collections.Generic.Collection`1.get_Item(Int32 index)
   at Mono.Cecil.MetadataImporter.ImportGenericParameter(Type type, ImportGenericContext context)
   at Mono.Cecil.MetadataImporter.ImportTypeSpecification(Type type, ImportGenericContext context)
   at Mono.Cecil.MetadataImporter.ImportType(Type type, ImportGenericContext context, ImportGenericKind import_kind)
   at Mono.Cecil.MetadataImporter.ImportMethodSpecification(MethodBase method, ImportGenericContext context)
   at Mono.Cecil.MetadataImporter.ImportMethod(MethodBase method, ImportGenericContext context, ImportGenericKind import_kind)
   at Nessos.Vagabond.AssemblyParser.AssemblyParser.CreateReference(MethodBase method, MethodReference context) in C:\Users\eirik\Development\nessos\Vagabond\src\Vagabond.AssemblyParser\AssemblyParser.cs:line 704
   at Nessos.Vagabond.AssemblyParser.AssemblyParser.MapInstructions(MethodBase method, MethodDefinition method_definition) in C:\Users\eirik\Development\nessos\Vagabond\src\Vagabond.AssemblyParser\AssemblyParser.cs:line 383
   at Nessos.Vagabond.AssemblyParser.AssemblyParser.MapMethodBody(MethodBase method, MethodDefinition method_definition) in C:\Users\eirik\Development\nessos\Vagabond\src\Vagabond.AssemblyParser\AssemblyParser.cs:line 363
>    at Nessos.Vagabond.AssemblyParser.AssemblyParser.MapMethod(TypeDefinition type_definition, MethodBase method) in C:\Users\eirik\Development\nessos\Vagabond\src\Vagabond.AssemblyParser\AssemblyParser.cs:line 140
   at Nessos.Vagabond.AssemblyParser.AssemblyParser.MapType(Type type, TypeDefinition declaringType) in C:\Users\eirik\Development\nessos\Vagabond\src\Vagabond.AssemblyParser\AssemblyParser.cs:line 108
   at Nessos.Vagabond.AssemblyParser.AssemblyParser.MapType(Type type, TypeDefinition declaringType) in C:\Users\eirik\Development\nessos\Vagabond\src\Vagabond.AssemblyParser\AssemblyParser.cs:line 120
   at Nessos.Vagabond.AssemblyParser.AssemblyParser.Map() in C:\Users\eirik\Development\nessos\Vagabond\src\Vagabond.AssemblyParser\AssemblyParser.cs:line 75
   at Nessos.Vagabond.AssemblyParser.AssemblyParser.Parse(Assembly assembly, IAssemblyParserConfig options) in C:\Users\eirik\Development\nessos\Vagabond\src\Vagabond.AssemblyParser\AssemblyParser.cs:line 40
   at Nessos.Vagabond.AssemblyParser.parseDynamicAssemblySlice(AssemblyCompilerState state, Assembly assembly) in C:\Users\eirik\Development\nessos\Vagabond\src\Vagabond\SliceCompiler\AssemblyParser.fs:line 180
   at Nessos.Vagabond.SliceCompiler.compileDynamicAssemblySlice(AssemblyCompilerState state, Assembly dynamicAssembly) in C:\Users\eirik\Development\nessos\Vagabond\src\Vagabond\SliceCompiler\AssemblyCompiler.fs:line 71
   at Nessos.Vagabond.SliceCompiler.compileAssembly(AssemblyCompilerState state, Assembly assembly) in C:\Users\eirik\Development\nessos\Vagabond\src\Vagabond\SliceCompiler\AssemblyCompiler.fs:line 124
   at [email protected](Assembly assembly) in C:\Users\eirik\Development\nessos\Vagabond\src\Vagabond\SliceCompiler\AssemblyCompiler.fs:line 137
   at Microsoft.FSharp.Core.Operators.Raise[T](Exception exn)
   at Nessos.Vagabond.Utils.MailboxProcessor`1.PostAndReply[Msg,R](FSharpMailboxProcessor`1 m, FSharpFunc`2 msgB) in C:\Users\eirik\Development\nessos\Vagabond\src\Vagabond\Utils.fs:line 302
   at Nessos.Vagabond.Control.VagabondController.PostAndReply[a](FSharpFunc`2 msgB) in C:\Users\eirik\Development\nessos\Vagabond\src\Vagabond\AssemblyManagement\Control.fs:line 193
   at Nessos.Vagabond.VagabondManager.compile(Assembly[] assemblies) in C:\Users\eirik\Development\nessos\Vagabond\src\Vagabond\Vagabond.fs:line 34
   at Nessos.Vagabond.VagabondManager.ComputeObjectDependencies(Object graph, FSharpOption`1 permitCompilation, FSharpOption`1 includeNativeDependencies) in C:\Users\eirik\Development\nessos\Vagabond\src\Vagabond\Vagabond.fs:line 112
   at Nessos.Vagabond.AssemblyProtocols.VagabondManager-SubmitObjectDependencies@72.Invoke(Unit unitVar) in C:\Users\eirik\Development\nessos\Vagabond\src\Vagabond\Extras\AssemblyProtocols.fs:line 72
   at [email protected](AsyncParams`1 args)
--- End of stack trace from previous location where exception was thrown ---

Use alternative AssemblyLoadContext other than default runtime context

I came across a problem when trying to use Vagabond in my project.
In my situation some assemblies were failing to load via Vagabond.

After some digging, I narrowed it down to the runtime being unable to load the said assemblies due to some conflict in the default AssemblyLoadContext. (I could not actually tell what the issue was as all all I get is a FileLoadException from the AssemblyLoadContext)

I noticed in Vagabond Utils that everything uses the currentLoadContext as here

 let asm = Assembly.GetExecutingAssembly()
        AssemblyLoadContext.GetLoadContext asm

But the current docs tend to suggest that it might be a better idea to load things to a seperate AssemblyLoadContext to get around any conflicts (version issues etc).

I refactored Vagabond to weave in a new AssemblyLoadContext and my project now runs without error, but the implementation smells.

The key idea was to create a new AssemblyLoadContext with each VagabondManager, like this

type VagabondManager internal (config : VagabondConfiguration) =
  let ctx = VagaBondLoadContext() :> AssemblyLoadContext
  do registerAssemblyResolutionHandler (Some (ctx))

And then I adjusted the tryGetLoadedAssembly and registerAssemblyResolutionHandler functions in Utils to take the AssemblyLoadContext option or use the default if None, Lastly adjusting the VagaBondState to carry round the new AssemblyLoadContext

Just thought I'd kick off a discussion if this looks reasonable, or if other developments have progressed in light of #23 and a better way is known.
Can stick up a repo if it is helpful.

Partial trust

Could you please add an option to execute an assembly in a partial trust? E.g. if I want to read or delete files in the ThunkServer sample then that action should fail. It is easy to do for a standalone app domain http://stackoverflow.com/a/1761491/801189, but I am not sure how to do it in this library.

Use System.Reflection.Metadata for reading assembly metadata

The library originally use Assembly.ReflectionOnlyLoadFrom() as a mechanism for reading assembly metadata. This function is no longer supported in netcoreapp, and as a temporary workaround it has been crudely replaced with Assembly.Load(), resulting in unneeded assemblies being loaded in the current context. This should be replaced with something like System.Reflection.Metadata eventually.

Mixed-mode DLLs get renamed with MD5 suffix and thus do not load

When using a 64-bit mixed mode DLL like Google.OrTools.dll, the Vagabond code transport renames the DLL.

e.g. when I run this:

cloud { return typeof<Google.OrTools.Algorithms.KInt64Vector>.Assembly.Location } |> cluster.Run 

I get

"C:\Resources\directory\4c431b785bb042528d3c416cf4e1d7a5.MBraceWorkerRole.CustomTempLocalStore\mbrace-process-3224\vagabond\Google.OrTools-2.0.3300.1260-qq7bbqqvmklk7c6pmbbachnnmc4r37jt.dll" 

But the PINvoke is like this:

.method public hidebysig static pinvokeimpl("Google.OrTools.dll" as "CSharp_Constraint_BasisStatus" winapi) 
    int32  Constraint_BasisStatus(valuetype [mscorlib]System.Runtime.InteropServices.HandleRef jarg1) cil managed preservesig

referring to the original name of the DLL. This causes a later failure BadImageFromatException when running the PInvoke:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: The type initializer for 'Google.OrTools.LinearSolver.Solver' threw an exception. ---> System.TypeInitializationException: The type initializer for 'Google.OrTools.LinearSolver.operations_research_linear_solverPINVOKE' threw an exception. ---> System.TypeInitializationException: The type initializer for 'SWIGExceptionHelper' threw an exception. ---> System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
   at Google.OrTools.LinearSolver.operations_research_linear_solverPINVOKE.SWIGExceptionHelper.SWIGRegisterExceptionCallbacks_operations_research_linear_solver(ExceptionDelegate applicationDelegate, ExceptionDelegate arithmeticDelegate, ExceptionDelegate divideByZeroDelegate, ExceptionDelegate indexOutOfRangeDelegate, ExceptionDelegate invalidCastDelegate, ExceptionDelegate invalidOperationDelegate, ExceptionDelegate ioDelegate, ExceptionDelegate nullReferenceDelegate,

Circular dependency

Got this when by MBrace scripting session had included some WPF and charting. Can give a full repro if needed.

#load "../../../FSharpDemoScripts/extlib/EventEx-0.1.fsx"
#load "../../../FSharpDemoScripts/packages/FSharp.Charting/FSharp.Charting.fsx"
#load "../../../FSharpDemoScripts/vizlib/load-wpf.fsx"
#load "../../../FSharpDemoScripts/vizlib/show.fsx"


Nessos.Vagabond.VagabondException: Found circular dependencies: PresentationFramework, ReachFramework, System.Printing.
   at Nessos.Vagabond.DependencyAnalysis.getAssemblyOrdering(FSharpList`1 dependencies) in c:\Users\eirik\Development\nessos\Vagabond\src\Vagabond\SliceCompiler\DependencyAnalysis.fs:line 23
   at Nessos.Vagabond.DependencyAnalysis.traverseDependencies(FSharpFunc`2 ignoreF, Boolean requireLoaded, FSharpOption`1 state, IEnumerable`1 assemblies) in c:\Users\eirik\Development\nessos\Vagabond\src\Vagabond\SliceCompiler\DependencyAnalysis.fs:line 107
   at MBrace.Azure.Runtime.Primitives.BlobAssemblyManager.ComputeDependencies[T](T graph) in C:\workspace\krontogiannis\MBrace.Azure\src\MBrace.Azure.Runtime\Primitives\BlobAssemblyManager.fs:line 193
   at <StartupCode$MBrace-Azure-Client>[email protected](Unit unitVar) in C:\workspace\krontogiannis\MBrace.Azure\src\MBrace.Azure.Client\Client.fs:line 248
   at [email protected](AsyncParams`1 args)
   at MBrace.Core.Internals.ExceptionDispatchInfoUtils.Async.RunSync[T](FSharpAsync`1 workflow, FSharpOption`1 cancellationToken) in c:\Users\eirik\Development\mbrace\MBrace.Core\src\MBrace.Core\Utils\ExceptionDispatchInfo.fs:line 136
   at <StartupCode$FSI_0028>.$FSI_0028.main@() in C:\GitHub\dsyme\MBrace.StarterKit\azure\HandsOnTutorial\0-demo.fsx:line 79

Mono runtime crashes when running Vagabond

The MethodInfo.GetInstructions() extension found in Mono.Reflection can result in crashes when parsing dynamic assembly IL. This makes Vagrant practically unusable in mono. The following F# script reproduces the issue

#r "Mono.Reflection.dll" // the standard Mono.Reflection library found on nuget

open System
open System.Reflection
open Mono.Reflection

type Foo<'T> = Foo of 'T

type Mapper =
    static member map (f : 'a -> 'b, Foo x) = Foo (f x)


let m = typeof<Mapper>.GetMethod("map")

let instructions = m.GetInstructions()

let field = 
    instructions 
    |> Seq.pick(fun i -> match i.Operand with :? FieldInfo as f -> Some f | _ -> None)


field.ToString() // "a item"

field.MetadataToken // crashes with '* Assertion at reflection.c:7764, condition `field_index >= 0 && field_index < dgclass->count_fields' not met'

Question: Send assembly with MS Orleans from client to server

I'm trying to use Vagabond with MS Orleans, to send F# expression with dependencies from client to server.
But seems like it does not work out.
Can you tell me what I'm doing wrong?

Here is how to add custom serialization to Orleaans
I need to implement this interface:

public interface IExternalSerializer
{
 bool IsSupportedType(Type itemType);
 object DeepCopy(object source, ICopyContext context);
 void Serialize(object item, ISerializationContext context, Type expectedType);
 object Deserialize(Type expectedType, IDeserializationContext context); 
}

I'm trying to implement it like this:

type MyFuncSerializer(log:ILogger<MyFuncSerializer>) =
  let typedExpr = typedefof<Expr<_>>
  let expr = typeof<Expr>
  let vmanager = Vagabond.Initialize()
  interface Orleans.Serialization.IExternalSerializer with
    member this.IsSupportedType (t:Type) =
       /// some validation code
        t = typedExpr || t = expr
    member this.DeepCopy (source:obj, context:ICopyContext) =
      FsPickler.Clone source
    member this.Serialize(item: obj, context:ISerializationContext , expectedType:Type) =
        /// usual ON CLIENT
        // some validation code
        let assemblies = vmanager.ComputeObjectDependencies(item, permitCompilation = true)
        let bs = vmanager.Serializer
        let asmbBin = bs.Pickle assemblies
        use stream = new System.IO.MemoryStream()
        let bin =
          if item.GetType() = expr then
            item :?> Expr
            |> bs.Pickle
          else
            item :?> Expr<_>
            |> bs.Pickle
        ct.StreamWriter.Write(asmbBin.Length)
        ct.StreamWriter.Write(asmbBin)
        ct.StreamWriter.Write(bin.Length)
        ct.StreamWriter.Write(bin)
    member this.Deserialize(expectedType:Type, context:IDeserializationContext ) =
      /// usual ON SERVER
      /// some validation code
      let asmblLength = context.StreamReader.ReadInt()
      let asmblBts  = context.StreamReader.ReadBytes(asmblLength)
      let exprLength = context.StreamReader.ReadInt()
      let exprBts = context.StreamReader.ReadBytes(exprLength)
      let bs  = vmanager.Serializer
      let assmbls = bs.UnPickle<VagabondAssembly []> (asmblBts)
      vmanager. LoadVagabondAssemblies assmbls |> ignore
      if expectedType = typeof<Expr> then
        bs.UnPickle<Expr>(exprBts) :> obj
      else
        bs.UnPickle(exprBts)

And use it from like this

// Contract shared with client and server
type IRemoteExecutor = 
  abstract Exec<'a> :  (Expr<string -> 'a>) -> Task<'a>

//Grain(actor) implement contract on server

type RemoteExecutor() =
  /// some code
  interface IRemoteExecutor with
   this.Exec(f:Expr<string -> 'a>) = 
     let f = f.Compile()
     f "My string" |> Task.FromResult

/// Client call  server
let doClientWork (client:IClusterClient) = task {
  let executor = client.GetGrain<IRemoteExecutor>("remoteExec")
  let myString = "   From client    "
  let! count = executor.Exec(<@ fun s -> (s + myString).ToCharArray() |> Array.length @>)
  let! concated = executor.Exec(<@ fun s -> (s + myString) @>)
  printfn "count %d and concated - %s" count concated
} 

This client code work well. Since I have no types I want to send from client to server.
But when I change client like this:

///client 
type MyRec = { Field : string }
/// call server
let doClientWork (client:IClusterClient) = task {
  let executor = client.GetGrain<IRemoteExecutor>("remoteExec")
  let myString = "   From client    "
  let! myRecObj = executor.Exec(<@ fun s -> { Field : s } @>)
  printfn "count %A"  myRecObj
}

It's fail.
And as I see this code
let assemblies = vmanager.ComputeObjectDependencies(item, permitCompilation = true)
does not find assemblies cause assemblies.Count = 0

Maybe you can see where I made a mistake with serialization assemblies?

Master does not build on Windows

It looks like build.cmd is pointing to the wrong path for the FAKE executable. Once I run paket restore, the FAKE binary is under packages/build/FAKE/tools/FAKE.exe, whereas build.cmd tries to find it in packages\FAKE\tools\FAKE.exe.

I'd PR the change, but this in itself doesn't completely fix the issue and I'm not confident this isn't a case of PEBKAC. If I instead invoke .\packages\build\FAKE\tools\FAKE.exe .\build.fsx, I get build errors:

PS D:\depot\git\Vagabond> .\packages\build\FAKE\tools\FAKE.exe .\build.fsx
Building project with version: LocalBuild
Shortened DependencyGraph for Target Default:
<== Default
   <== RunTests
      <== Build
         <== Prepare
            <== AssemblyInfo
               <== Clean

The resulting target order is:
 - Clean
 - AssemblyInfo
 - Prepare
 - Build
 - RunTests
 - Default
Starting Target: Clean
Deleting contents of bin
Finished Target: Clean
Starting Target: AssemblyInfo (==> Clean)
Created AssemblyInfo file "src/Vagabond.AssemblyParser/Properties/AssemblyInfo.cs".
Created AssemblyInfo file "src/Vagabond/AssemblyInfo.fs".
Finished Target: AssemblyInfo
Starting Target: Prepare (==> AssemblyInfo)
Finished Target: Prepare
Starting Target: Build (==> Prepare)
Building project: D:\depot\git\Vagabond\Vagabond.sln
  C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe  D:\depot\git\Vagabond\Vagabond.sln /t:Build /m      /p:RestorePackages="False" /p:Configuration="Release" /logger:Fake.MsBuildLogger+ErrorLogger,"D:\depot\git\Vagabond\packages\build\FAKE\tools\FakeLib.dll"
C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe  D:\depot\git\Vagabond\Vagabond.sln /t:Build /m      /p:RestorePackages="False" /p:Configuration="Release" /logger:Fake.MsBuildLogger+ErrorLogger,"D:\depot\git\Vagabond\packages\build\FAKE\tools\FakeLib.dll"
Microsoft (R) Build Engine version 14.0.25420.1
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 3/1/2017 11:38:29 AM.
     1>Project "D:\depot\git\Vagabond\Vagabond.sln" on node 1 (Build target(s)).
     1>ValidateSolutionConfiguration:
         Building solution configuration "Release|Any CPU".
     1>Project "D:\depot\git\Vagabond\Vagabond.sln" (1) is building "D:\depot\git\Vagabond\src\Vagabond\Vagabond.fsproj" (2) on node 1 (default targets).
     2>D:\depot\git\Vagabond\src\Vagabond\Vagabond.fsproj(52,3): error MSB4102: The value "" of the "Project" attribute in element <Import> is invalid. Parameter "path" cannot have zero length.
     2>Done Building Project "D:\depot\git\Vagabond\src\Vagabond\Vagabond.fsproj" (default targets) -- FAILED.
     1>Project "D:\depot\git\Vagabond\Vagabond.sln" (1) is building "D:\depot\git\Vagabond\tests\Vagabond.Tests\Vagabond.Tests.fsproj" (3) on node 2 (default targets).
     3>D:\depot\git\Vagabond\tests\Vagabond.Tests\Vagabond.Tests.fsproj(83,3): error MSB4102: The value "" of the "Project" attribute in element <Import> is invalid. Parameter "path" cannot have zero length.
     3>Done Building Project "D:\depot\git\Vagabond\tests\Vagabond.Tests\Vagabond.Tests.fsproj" (default targets) -- FAILED.
     1>Project "D:\depot\git\Vagabond\Vagabond.sln" (1) is building "D:\depot\git\Vagabond\samples\ThunkServer\ThunkServer.fsproj" (4) on node 4 (default targets).
     4>D:\depot\git\Vagabond\samples\ThunkServer\ThunkServer.fsproj(55,3): error MSB4102: The value "" of the "Project" attribute in element <Import> is invalid. Parameter "path" cannot have zero length.
     4>Done Building Project "D:\depot\git\Vagabond\samples\ThunkServer\ThunkServer.fsproj" (default targets) -- FAILED.
     1>Project "D:\depot\git\Vagabond\Vagabond.sln" (1) is building "D:\depot\git\Vagabond\src\Vagabond.AssemblyParser\Vagabond.AssemblyParser.csproj" (5) on node 3 (default targets).
     5>GenerateTargetFrameworkMonikerAttribute:
       Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
       CoreCompile:
         C:\Program Files (x86)\MSBuild\14.0\bin\csc.exe /noconfig /nowarn:1701,1702 /nostdlib+ /errorreport:prompt /warn:4 /doc:..\..\bin\Vagabond.AssemblyParser.XML /define:TRACE /highentropyva+ /reference:"C:\Program Files (x86)
         \Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Microsoft.CSharp.dll" /reference:D:\depot\git\Vagabond\packages\Mono.Cecil\lib\net45\Mono.Cecil.dll /reference:D:\depot\git\Vagabond\packages\Mono.Cecil\lib\net4
         5\Mono.Cecil.Mdb.dll /reference:D:\depot\git\Vagabond\packages\Mono.Cecil\lib\net45\Mono.Cecil.Pdb.dll /reference:D:\depot\git\Vagabond\packages\Mono.Cecil\lib\net45\Mono.Cecil.Rocks.dll /reference:"C:\Program Files (x86)\
         Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\mscorlib.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Core.dll" /reference:"C:\Program Files (x86)\R
         eference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.DataSetExtensions.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.dll" /reference:"C:\P
         rogram Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Xml.dll" /reference:"C:\Progr
         am Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Xml.Linq.dll" /debug:pdbonly /filealign:512 /optimize+ /out:obj\Release\Vagabond.AssemblyParser.dll /ruleset:"C:\Program Files (x86)\Microso
         ft Visual Studio 14.0\Team Tools\Static Analysis Tools\\Rule Sets\MinimumRecommendedRules.ruleset" /subsystemversion:6.00 /target:library /utf8output AssemblyParser.cs AssemblyParserConfig.cs ByteBuffer.cs Disassembler.cs
         Instruction.cs MethodBodyReader.cs Properties\AssemblyInfo.cs "C:\Users\asaeeduddin\AppData\Local\Temp\.NETFramework,Version=v4.5.AssemblyAttributes.cs"
         Using shared compilation with compiler from directory: C:\Program Files (x86)\MSBuild\14.0\bin
       _CopyFilesMarkedCopyLocal:
         Copying file from "D:\depot\git\Vagabond\packages\Mono.Cecil\lib\net45\Mono.Cecil.dll" to "..\..\bin\Mono.Cecil.dll".
         Copying file from "D:\depot\git\Vagabond\packages\Mono.Cecil\lib\net45\Mono.Cecil.Mdb.dll" to "..\..\bin\Mono.Cecil.Mdb.dll".
         Copying file from "D:\depot\git\Vagabond\packages\Mono.Cecil\lib\net45\Mono.Cecil.Pdb.dll" to "..\..\bin\Mono.Cecil.Pdb.dll".
         Copying file from "D:\depot\git\Vagabond\packages\Mono.Cecil\lib\net45\Mono.Cecil.Rocks.dll" to "..\..\bin\Mono.Cecil.Rocks.dll".
       CopyFilesToOutputDirectory:
         Copying file from "obj\Release\Vagabond.AssemblyParser.dll" to "..\..\bin\Vagabond.AssemblyParser.dll".
         Vagabond.AssemblyParser -> D:\depot\git\Vagabond\bin\Vagabond.AssemblyParser.dll
         Copying file from "obj\Release\Vagabond.AssemblyParser.pdb" to "..\..\bin\Vagabond.AssemblyParser.pdb".
     5>Done Building Project "D:\depot\git\Vagabond\src\Vagabond.AssemblyParser\Vagabond.AssemblyParser.csproj" (default targets).
     1>Done Building Project "D:\depot\git\Vagabond\Vagabond.sln" (Build target(s)) -- FAILED.

Build FAILED.

       "D:\depot\git\Vagabond\Vagabond.sln" (Build target) (1) ->
       "D:\depot\git\Vagabond\src\Vagabond\Vagabond.fsproj" (default target) (2) ->
         D:\depot\git\Vagabond\src\Vagabond\Vagabond.fsproj(52,3): error MSB4102: The value "" of the "Project" attribute in element <Import> is invalid. Parameter "path" cannot have zero length.


       "D:\depot\git\Vagabond\Vagabond.sln" (Build target) (1) ->
       "D:\depot\git\Vagabond\tests\Vagabond.Tests\Vagabond.Tests.fsproj" (default target) (3) ->
         D:\depot\git\Vagabond\tests\Vagabond.Tests\Vagabond.Tests.fsproj(83,3): error MSB4102: The value "" of the "Project" attribute in element <Import> is invalid. Parameter "path" cannot have zero length.


       "D:\depot\git\Vagabond\Vagabond.sln" (Build target) (1) ->
       "D:\depot\git\Vagabond\samples\ThunkServer\ThunkServer.fsproj" (default target) (4) ->
         D:\depot\git\Vagabond\samples\ThunkServer\ThunkServer.fsproj(55,3): error MSB4102: The value "" of the "Project" attribute in element <Import> is invalid. Parameter "path" cannot have zero length.

    0 Warning(s)
    3 Error(s)

Time Elapsed 00:00:00.55
Running build failed.
Error:
Building D:\depot\git\Vagabond\Vagabond.sln failed with exitcode 1.

---------------------------------------------------------------------
Build Time Report
---------------------------------------------------------------------
Target         Duration
------         --------
Clean          00:00:00.0075835
AssemblyInfo   00:00:00.0128372
Prepare        00:00:00.0000411
Total:         00:00:01.2203328
Status:        Failure
---------------------------------------------------------------------
  1) Building D:\depot\git\Vagabond\Vagabond.sln failed with exitcode 1.
  2) MSB4102: D:\depot\git\Vagabond\src\Vagabond\Vagabond.fsproj(52,3): The value "" of the "Project" attribute in element <Import> is invalid. Parameter "path" cannot have zero length.
  3) MSB4102: D:\depot\git\Vagabond\tests\Vagabond.Tests\Vagabond.Tests.fsproj(83,3): The value "" of the "Project" attribute in element <Import> is invalid. Parameter "path" cannot have zero length.
  4) MSB4102: D:\depot\git\Vagabond\samples\ThunkServer\ThunkServer.fsproj(55,3): The value "" of the "Project" attribute in element <Import> is invalid. Parameter "path" cannot have zero length.
---------------------------------------------------------------------

I think this might be because I'm trying to build with Visual Studio 2017, which confuses the MSBuild logic for choosing an FSharpTargetsPath in your fsprojs:

  <Choose>
    <When Condition="'$(VisualStudioVersion)' == '11.0'">
      <PropertyGroup Condition="Exists('$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets')">
        <FSharpTargetsPath>$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath>
      </PropertyGroup>
    </When>
    <Otherwise>
      <PropertyGroup Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets')">
        <FSharpTargetsPath>$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets</FSharpTargetsPath>
      </PropertyGroup>
    </Otherwise>
  </Choose>

Vagabond fails when using FsPickler 3.1.0 and beyond

I tried to update to FsPickler 3.3.0 but test 23. Quotation literal references fsi code fails. It would be good to work out what's changed to cause this

Vagabond currently uses FsPickler 3.0.0. Am trying 3.2.0 now

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.