Skip to content

VS2015 build: unable to resolve Microsoft.Build.Framework #7

Closed

Description

@simra

Error:

Unhandled Exception: System.TypeInitializationException: The type initializer for '<StartupCode$IfSharp>.$Evaluation' threw an exception. ---> System.Exception: Error creating evaluation session: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Build.Framework, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.Build.Framework, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
   at Microsoft.FSharp.Compiler.MSBuildResolver.ResolveCore$cont@266(String targetProcessorArchitecture, String targetFrameworkVersion, FSharpList`1 targetFrameworkDirectories, ResolutionEnvironment resolutionEnvironment, Tuple`2[] references, String outputDirectory, FSharpFunc`2 logWarning, FSharpFunc`2 logMessage, FSharpFunc`2 logError, String implicitIncludeDir, String fsharpCoreExplicitDirOrFSharpBinariesDir, String frameworkRegistryBase, FSharpList`1 explicitIncludeDirs, String assemblyFoldersSuffix, String assemblyFoldersConditions, Boolean allowRawFileName, Unit unitVar)
   at Microsoft.FSharp.Compiler.MSBuildResolver.ResolveCore(ResolutionEnvironment resolutionEnvironment, Tuple`2[] references, String targetFrameworkVersion, FSharpList`1 targetFrameworkDirectories, String targetProcessorArchitecture, String outputDirectory, String fsharpCoreExplicitDirOrFSharpBinariesDir, FSharpList`1 explicitIncludeDirs, String implicitIncludeDir, String frameworkRegistryBase, String assemblyFoldersSuffix, String assemblyFoldersConditions, Boolean allowRawFileName, FSharpFunc`2 logMessage, FSharpFunc`2 logWarning, FSharpFunc`2 logError) in C:\GitHub\fsharp\FSharp.Compiler.Service\src\fsharp\ReferenceResolution.fs:line 266
   at Microsoft.FSharp.Compiler.MSBuildResolver.Resolve(ResolutionEnvironment resolutionEnvironment, IEnumerable`1 references, String targetFrameworkVersion, FSharpList`1 targetFrameworkDirectories, String targetProcessorArchitecture, String outputDirectory, String fsharpCoreExplicitDirOrFSharpBinariesDir, FSharpList`1 explicitIncludeDirs, String implicitIncludeDir, String frameworkRegistryBase, String assemblyFoldersSuffix, String assemblyFoldersConditions, FSharpFunc`2 logMessage, FSharpFunc`2 logWarning, FSharpFunc`2 logError) in C:\GitHub\fsharp\FSharp.Compiler.Service\src\fsharp\ReferenceResolution.fs:line 414
   at Microsoft.FSharp.Compiler.CompileOps.Resolve@2949-2(TcConfig tcConfig, ResolveAssemblyReferenceMode mode, range errorAndWarningRange, String targetFrameworkMajorMinor, String targetProcessorArchitecture, String outputDirectory, FSharpList`1 targetFrameworkDirectories, IEnumerable`1 references, Boolean showMessages) in C:\GitHub\fsharp\FSharp.Compiler.Service\src\fsharp\CompileOps.fs:line 2966
   at Microsoft.FSharp.Compiler.CompileOps.TcConfig.TryResolveLibsUsingMSBuildRules(TcConfig tcConfig, FSharpList`1 originalReferences, range errorAndWarningRange, ResolveAssemblyReferenceMode mode) in C:\GitHub\fsharp\FSharp.Compiler.Service\src\fsharp\CompileOps.fs:line 2975
   at Microsoft.FSharp.Compiler.CompileOps.TcAssemblyResolutions.Resolve(TcConfig tcConfig, FSharpList`1 assemblyList, FSharpList`1 knownUnresolved) in C:\GitHub\fsharp\FSharp.Compiler.Service\src\fsharp\CompileOps.fs:line 3391
   at Microsoft.FSharp.Compiler.CompileOps.TcAssemblyResolutions.SplitNonFoundationalResolutions(TcConfig tcConfig) in C:\GitHub\fsharp\FSharp.Compiler.Service\src\fsharp\CompileOps.fs:line 3417
   at Microsoft.FSharp.Compiler.IncrementalFSharpBuild.GetFrameworkTcImports(TcConfig tcConfig) in C:\GitHub\fsharp\FSharp.Compiler.Service\src\fsharp\vs\IncrementalBuild.fs:line 1095
   at Microsoft.FSharp.Compiler.Interactive.Shell.FsiEvaluationSession..ctor(FsiEvaluationSessionHostConfig fsi, String[] argv, TextReader inReader, TextWriter outWriter, TextWriter errorWriter, Boolean fsiCollectible) in C:\GitHub\fsharp\FSharp.Compiler.Service\src\fsharp\fsi\fsi.fs:line 2363

Activity

  1. simra commented on Oct 7, 2015

    @simra
    OwnerAuthor
  2. simra commented on Oct 7, 2015

    @simra
    OwnerAuthor

    Updated app.config solves the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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