Skip to content

Exception has been thrown by the target of an invocation. #4

@SanAngeloMike

Description

@SanAngeloMike

I was following the instructions on page 13 (using the full downloaded boilerplate, rather than the file content specified in the text). I get the following error no whether I do Run, Build, or Clean:

λ forge fake Build

C:\Users\Mike\Documents\fsharp\FsTweet\packages\FAKE\tools\FAKE.exe Build
C:\Users\Mike\AppData\Local\Temp\kudutemp already exists.
C:\Users\Mike\AppData\Local\Temp\kudutarget already exists.
Deleting contents of C:\Users\Mike\AppData\Local\Temp\kudutemp
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: The type initializer for '<StartupCode$FakeLib>.$Fake.Azure.Kudu' threw an exception. ---> System.UnauthorizedAccessException: Access to the path 'C:\Users\Mike\AppData\Local\Temp\kudutemp\FsTweet.Db.Migrations.dll' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileInfo.Delete()
at Fake.FileHelper.CleanDir@267-1.Invoke(String file) in D:\code\fake\src\app\FakeLib\FileHelper.fs:line 270
at Microsoft.FSharp.Collections.SeqModule.Iterate[T](FSharpFunc2 action, IEnumerable1 source)
at Fake.FileHelper.CleanDir(String path) in D:\code\fake\src\app\FakeLib\FileHelper.fs:line 267
at <StartupCode$FakeLib>.$Fake.Azure.Kudu..cctor() in D:\code\fake\src\app\FakeLib\AzureKudu.fs:line 26
--- End of inner exception stack trace ---
at Fake.Azure.Kudu.get_deploymentTemp()
at <StartupCode$FSI_0005>.$FSI_0005_Build$fsx.main@()
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Fake.FSIHelper.runScriptCached@315.Invoke(Unit unitVar0) in D:\code\fake\src\app\FakeLib\FSIHelper.fs:line 323

Error while running 'C:\Users\Mike\Documents\fsharp\FsTweet\packages\FAKE\tools\FAKE.exe' with args: Build

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions