could not load file or assembly 'system.core version=2.0.5.0 - reactiveui

I was trying to use ReactiveUI in a WPF application that makes use of Prism. I installed the packages with NuGet, but simply adding the references led to the exception specified in the title during the initialization of the ModuleCatalog.
Edit:
As Pierre Arnaud pointed out, the problem is Microsoft.Bcl.Async not being able to resolve System.Core version 2.0.5.0.
We moved to Visual Studio 2012 since i first posted this question. The same problem persists and i can't even install the fix suggested by Pierre since i have installed .Net 4.5 now. The project is still targeting .Net 4.0.

Please install KB2468871, which solves the issue related to Microsoft.Bcl.Async not being able to resolve System.Core version 2.0.5.0.
See also Issue 8 in the async targeting pack knowledge base.
Here are the direct download links for the fixes, for the x86 and x64 environments:
http://download.microsoft.com/download/2/B/F/2BF4D7D1-E781-4EE0-9E4F-FDD44A2F8934/NDP40-KB2468871-v2-x86.exe
http://download.microsoft.com/download/2/B/F/2BF4D7D1-E781-4EE0-9E4F-FDD44A2F8934/NDP40-KB2468871-v2-x64.exe

This isn't happening for me. Is it possible that NuGet has added the SL5 DLLs as a reference to your project?

Related

VS 2019 Project Target Framework Not Installed - .Net Framework 4.0

Just installed VS 2019 Pro on a new system. When I open a solution with .net 4.0 project, I get this error: Project Target Framework Not Installed.
When I choose download it, it goes here but does not have option for .net framework 4.0.
In project settings there is no option for .Net Framework 4.0 in targeting framework:
https://dotnet.microsoft.com/en-us/download/visual-studio-sdks?cid=getdotnetsdk
I have tried installing 4.6.2, 4.5.2, etc.
How can I get this project to open? It opens on my other machine. It has these options for Target framework in project settings:
Please don't say change the framework version, we need this older version for very old computers running XP and Win 7 that cannot be upgraded.
thank you
You have to go directly to their download site. As shown in another correct answer that was downvoted, it's still available even though it's past end-of-life.
https://stackoverflow.com/a/72870727/9008140
You can package the install files with your app just in case, although most likely your installer will see that it's missing and download it anyway.
You can try downloading .Net 4.0 here: https://dotnet.microsoft.com/en-us/download/dotnet-framework/net40
Mandatory warning: Installing an old, unmaintained .Net framework comes with security risks. It's up to you to determine how much those Windows XP PCs are vulnerable and manage said risks.

OmniSharp Error: Found dotnet version 5.0.201. Minimum required version is 6.0.100

I use VS Code as my IDE. Today I saw in my C# files that I could no longer use things like "Go To Definition/Implementations" or hover over anything to get the path/type etc.
I found my Omnisharp console and saw they updated last night and there is an error:
Error: Found dotnet version 5.0.201. Minimum required version is 6.0.100.
I can't upgrade my dotnet because 6.0 is not compatible with the runtime in my project and on Mac M1, there are a lot of issues running multiple dotnet instances..
I guess its a bit of a rock and a hard place, anyone know how I can get around this issue?
This is a recent update to Omnisharp, which is used by the VS Code C# extension. Add this to your settings and restart the editor.
"omnisharp.useModernNet": false,
"omnisharp.path": "",
Also if you don't have Visual Studio installed you will likely need to install the Build Tools to get MSBuild:
My understanding of the rationale behind this change is an optimization for modern vanilla c# projects over those using older versions (ie Unity). More info in this issue.
Revert your Omnisharp to previous version
Update 1.25.0 introduces newer OmniSharp build for .NET 6 which does not support non SDK style .NET projects but results in performance improvements.
Fortunately you can disable this in the settings:
C# Extension Settings
Also, the C# extension no longer ships with an included Mono & MSBuild Tools. Download them here: Build Tools
Worst case, you can revert to an older extension version.
Go to extensions in VS Code and search for C# Extension
VS Code Extensions
Go to C# Extension settings
C# Extension Settings
Disable "Use Modern Net" option.
Modern Net Option
Restart VS Code
I haved similar problem and i fixed like this:
Im using win7 and i have VS 2019 IDE which not supporting dotnet 6 cuz of that vs_installer not installing dotnet6 sdk, in result i cant use c# extension v1.25.0 in vs code, because omnisharp needs net6. I installed net 6 sdk to my win7 and problem is solved, now i can use c# extension v1.25.0 in vs code.

IronRuby 1.3.1 VS 2010 SP1 Installation Issue

I've downloaded the latest release of IronRuby from codeplex and ran the install with no issues.
However when I come to create a project i receive the message:
IronRuby installation not found. Although basic scripts should work standard libraries and gems won't be available....."
This seems to be an issue with vs2010 sp1 from the project issue tracker on codeplex, but theres no fix mentioned there. I only really wanted this release for the tools support so using 1.0 is something I want to avoid.
Has anyone got any workrounds/fixes/advice?
I used NuGet to install IronRuby. When I did so, it automatically added the references for me.
Go to Tools -> Library Package Manager -> Package Manager Console.
Type Install-Package ironruby
Viola!
EDIT: If you look here, they have a link where the bug is discussed.

system.diagnostics.contracts.contract exists in both v4.0 v3.5

I just upgraded to visual studio 2010 and installed the code contracts msi. When I try to use it I get a compiler error that the system.diagnostics.contracts.contract dll exists in both the v3.5 and v4 framework. Anyone know what I should do to resolve this? Thanks.
If you're upgrading a .NET 3.5 project that uses contracts to .NET 4.0, make sure you remove your reference to the Microsoft.Contracts assembly.
The Microsoft.Contracts assembly provides code contracts for use in .NET 2.0 or 3.5 projects, but is provided by default with .NET 4.0 in mscorlib, so you don't need it. They both share the System.Diagnostics.Contracts namespace, so by having references to both at the same time, the compiler isn't able to figure out which one you're trying to use.
I solved it by first installing it, thou that did not actually solve it.
Then removed the references and then I changed the project versions to 4.5 and after that, it worked.

Visual Studio 2010 managed c++ targets .NET 2.0 PROBLEM

For someone who's been down this road, please share your breadcrumbs.
I have old VS2005 solution. Most of the parts are c# but I have one c++ managed project. Dev machine: Windows XP. Target framework version: 2.0
I moved the project to the Windows 7 64 BIT, VS 2010, did the project conversion. First thing I noticed were build errors - projects depending on one what is in c++ complained that project referenced has target 4.0 and I want to use it in project that (properly) targets 2.0.
OK, so I used some tips and set my project target to .NET 2.0. NOW: VS2010 complains that it cannot load the project because I need to install framework 2.0. OK, so I try to install it, and nothing - since installer detects .NET 2.0 as a part of the operating system.
WTF?
Admins, please create WTF tag for me here :)
It is not the .NET version that's the problem. The C++ build system currently does not directly support building for pre-.NET 4.0 targets. It requires VS2008 to be installed so it can use its tool chain. Sounds like you don't have it.
This blog post explains the workaround. You can upvote this feedback article if you're unhappy with that. No idea if this is slated to be fixed in SP1, this is not drawing a lot of votes.

Resources