Visual Studio F# error - FSharp.Core.sigdata - visual-studio-2013

I've installed the latest FSharp bundle, but now whenever I hit control-spacebar in Visual Studio, I get this error:
Problem reading assembly 'FSharp.Core, Version=4.3.1.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a': Error opening
binary file
'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\FSharp.Core\v4.0_4.3.1.0__b03f5f7f11d50a3a\FSharp.Core.dll':
FSharp.Core.sigdata not found alongside FSharp.Core
Edit 1
Also, when I try to compile, I get the following errors:
FSC: error FS1223: FSharp.Core.sigdata not found alongside FSharp.Core
FSC: error FS0229: Error opening binary file 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\FSharp.Core\v4.0_4.3.1.0__b03f5f7f11d50a3a\FSharp.Core.dll': FSharp.Core.sigdata not found alongside FSharp.Core
FSC: error FS3160: Problem reading assembly 'FSharp.Core, Version=4.3.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a': Error opening binary file 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\FSharp.Core\v4.0_4.3.1.0__b03f5f7f11d50a3a\FSharp.Core.dll': FSharp.Core.sigdata not found alongside FSharp.Core
Done building project "Library1.fsproj" -- FAILED.
Edit 2
On top of that, I get the following errors when I try to run fsi.exe:
> Session termination detected. Press Enter to restart.
unknown(1,1): error FS1223: FSharp.Core.sigdata not found alongside FSharp.Core
unknown(1,1): error FS0229: Error opening binary file 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\FSharp.Core\v4.0_4.3.1.0__b03f5f7f11d50a3a\FSharp.Core.dll': Exception of type 'Microsoft.FSharp.Compiler.ErrorLogger+StopProcessing' was thrown.
unknown(1,1): error FS3160: Problem reading assembly 'FSharp.Core, Version=4.3.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a': Exception of type 'Microsoft.FSharp.Compiler.ErrorLogger+StopProcessing' was thrown.
Note: I can still run fsi.exe for F# 3.0. I'm only having this issue with 3.1 (C:\Program Files (x86)\Microsoft SDKs\F#\3.1\Framework\v4.0)
Any idea how I can get back to functioning F#?
Edit 3
It appears that I am again able to compile my F# projects after numerous repair installs/system reboots of things. The issues with fsi.exe and Visual Studio Intellisense remain.

Related

"XAMLTaskFactory" could not be loaded from Assembly

I've been trying to run x86 assembly code on my machine for schoolwork. Sadly I've been getting this error when trying to build the project files and I can't figure out what it's about and how to fix it:
Error MSB4175 The task factory "XamlTaskFactory" could not be loaded from the assembly "Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". The system cannot find the path specified hi C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\BuildCustomizations\masm.targets 70
Has anyone had the same problem? I've tried making new projects, running as administrator, done a clean install of Visual Studio and all the packages, even factory reset my laptop.

VS Community - Cannot run a simple console application: Could not load file or assembly ‘System.Reflection.Metadata'

I’ve installed Microsoft Visual Studio Community 2019 Version 16.9.4 and tried to create a simple console application to print “Hello World”.
If I run the app with dotnet run from the Windows Command Prompt, it will run successfully, but opening the project in VS and trying to start the console app is causing the following error:
Unhandled Exception: System.BadImageFormatException: Could not load file or assembly ‘System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. The file or directory is corrupted and unreadable. (Exception from HRESULT: 0x80070570)
I’ve already tried to start the console app as x86 and x64, but that did not help.
Another attempt was to uninstall VS 2019 and install VS 2017 Community. Have the same exception when I build the console app.
Unhandled Exception: System.BadImageFormatException: Could not load file or assembly 'System.Reflection.Metadata, Version=1.4.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The file or directory is corrupted and unreadable. (Exception from HRESULT: 0x80070570)
Could someone please help me with this?

Visual Studio unable to read the project file (anymore)

Ever since my latest windows update, (which system restore is failing to undo) I can't load any projects with visual studio 2010. The project are greyed out (unavailable) and when I try to reload them I get the error:
C:\Users\Benoit\Documents\Visual Studio 2010\Projects\Test123\Test123\Test123.csproj : error : Unable to read the project file 'Test123.csproj'. Could not load file or assembly 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
I tried creating new projects: same error
I tried creating different type of projects (command prompt, silverlight, windows phone): same error
Deleting the .suo and .user files did not change anything
I did not move the projects
Using Visual Studio 2010 with Windows Vista
It looks like the Global Assembly Cache (GAC) is messed up, or possibly the update has done something with the Microsoft.Build assembly file itself.
Try repairing .NET 4.0, and if that does not work you can try completely uninstalling and reinstalling the framework.

invalid MEX (The specified procedure could not be found): Building a CUDA MEX function in visual studio and calling it in MATLAB

I have an old visual studio project (cuSVM project) that previously is used in 32-bit WinXP using visual studio 2005 SP1. I want to run it in my 64-bit Win7. I compiled it in 64-bit mode, using visual studio 2008. but it can not run because of some missing dlls.
I used "Dependency Walker", missing dll s was :
MSVCR80.DLL
MSVCR90D.DLL
IESHIMS.DLL
with the yellow question marks that says: "The system cannot find the file specified".
in DLL-tree I have a red "NVCUDA.DLL" in "c:\windows\system32\NVCUDA.DLL" and a red block "IEFRAME.DLL", "c:\windows\system32\IEFRAME.DLL" in this file sub-tree.
and error messages:
Error: At least one required implicit or forwarded dependency was not found.
Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.
Warning: At least one delay-load dependency module was not found.
Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.
Next I copied the "MSVCR80.DLL" and "MSVCR90D.DLL" files from Visual Studio installations :
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\redist\Debug_NonRedist\amd64\Microsoft.VC90.DebugCRT
and
C:\Program Files (x86)\Microsoft Visual Studio 8\VC\redist\amd64\Microsoft.VC80.CRT
The file version of "MSVCR80.DLL" is "8.0.50727.42" and file version of "MSVCR90D.DLL" is "9.0.21022.8".
The embed.manifest file information is:
type="win32" name="Microsoft.VC90.DebugCRT" version="9.0.21022.8" processorArchitecture="amd64" publicKeyToken="1fc8b3b9a1e18e3b"
I have a little knowledge about visual studio and dll files, so I really need your help.
I found that the error may not be related to missing dll s. The MATLAB error is "invalid mex file" .When the error message is : 'The specified "module" could not be found' then missing dlls are the cause. But when the error message is : 'The specified "procedure" could not be found', the problem may be different
I had this same problem. Solving the problem was a strange, hard to see issue.
Go to Project > Properties. Select Configuration Properties > Linker > Advanced as shown in the picture below. Then where it says "Target Machine" change the setting from 'Not set' to MachineX64 (/Machine:X64) as shown in the picture again. It took me a while to figure this out and I have successfully been compiling mex+cuda files from visual studio from scratch since. Hopefully this fixes the issue for you as well.

Cant Build c# asp.net mvc application

When I try to build the application i get:
Error 1 Unexpected error reading metadata from file 'c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\mscorlib.dll' -- 'Index not found.' NHMDLive.Models
I cant figure out what the problem might be. I have checked the mscorlib.dll and did a checksum and it is not corrupted. Must be something else.
you can't code for the version 4 of dotnet with vs 2008.
You will have either to upgrade to VS 2010, or use 3.5 or less version of assemblies

Resources