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

Nuget v0.9.4 throws TypeInitializationException where 0.9.3 does not #48

Closed
pmonson711 opened this issue Jul 21, 2014 · 2 comments
Closed

Comments

@pmonson711
Copy link

To reproduce:

  1. use git to checkout v0.9.4 tag.
  2. open solution in Visual Studio
  3. open FsCheck.CSharpExamples
  4. remove the project reference to FsCheck
  5. run Install-Package FsCheck -Version 0.9.4.0
  6. Run the console application

Note the error as included below

Test the regression

  1. run Uninstall-Package FsCheck
  2. run Install-Package FsCheck -Version 0.9.3.0
  3. Run the console application, and all works.

Exception included

System.TypeInitializationException was unhandled
  HResult=-2146233036
  Message=The type initializer for 'FsCheck.Fluent.Spec' threw an exception.
  Source=FsCheck
  TypeName=FsCheck.Fluent.Spec
  StackTrace:
       at FsCheck.Fluent.Spec.ForAny[a](Func`2 assertion)
       at FsCheck.CSharpExamples.Program.Main(String[] args) in \\psf\home\src\EchoX\FsCheck\FsCheck.CSharpExamples\Program.cs:line 54
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: System.TypeInitializationException
       HResult=-2146233036
       Message=The type initializer for '<StartupCode$FsCheck>.$Fluent' threw an exception.
       Source=FsCheck
       TypeName=<StartupCode$FsCheck>.$Fluent
       StackTrace:
            at FsCheck.Fluent.Spec..cctor()
       InnerException: System.TypeInitializationException
            HResult=-2146233036
            Message=The type initializer for '<StartupCode$FsCheck>.$Runner' threw an exception.
            Source=FsCheck
            TypeName=<StartupCode$FsCheck>.$Runner
            StackTrace:
                 at FsCheck.Runner.get_init()
                 at <StartupCode$FsCheck>.$Fluent..cctor()
            InnerException: System.IO.FileNotFoundException
                 HResult=-2147024894
                 Message=Could not load file or assembly 'FSharp.Core, Version=4.3.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
                 Source=FsCheck
                 FileName=FSharp.Core, Version=4.3.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
                 FusionLog==== Pre-bind state information ===
LOG: DisplayName = FSharp.Core, Version=4.3.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
 (Fully-specified)
LOG: Appbase = file://psf/Home/src/EchoX/FsCheck/FsCheck.CSharpExamples/bin/Release/
LOG: Initial PrivatePath = NULL
Calling assembly : FsCheck, Version=0.9.4.0, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: \\psf\Home\src\EchoX\FsCheck\FsCheck.CSharpExamples\bin\Release\FsCheck.CSharpExamples.vshost.exe.config
LOG: Using host configuration file: 
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Post-policy reference: FSharp.Core, Version=4.3.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
LOG: Attempting download of new URL file://psf/Home/src/EchoX/FsCheck/FsCheck.CSharpExamples/bin/Release/FSharp.Core.DLL.
LOG: Attempting download of new URL file://psf/Home/src/EchoX/FsCheck/FsCheck.CSharpExamples/bin/Release/FSharp.Core/FSharp.Core.DLL.
LOG: Attempting download of new URL file://psf/Home/src/EchoX/FsCheck/FsCheck.CSharpExamples/bin/Release/FSharp.Core.EXE.
LOG: Attempting download of new URL file://psf/Home/src/EchoX/FsCheck/FsCheck.CSharpExamples/bin/Release/FSharp.Core/FSharp.Core.EXE.

                 StackTrace:
                      at <StartupCode$FsCheck>.$Runner..cctor()
                 InnerException: 
@mausch
Copy link
Member

mausch commented Jul 21, 2014

It looks like you don't have FSharp.Core 4.3.1.0. Try either installing Visual F# or the NuGet package for FSharp.Core

@pmonson711
Copy link
Author

Thanks for the quick response. Installing the pre-release FSharp.Core via NuGet does in fact work for me.

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

2 participants