FluentAssertions compile error after upgrade - fluent-assertions

I have upgraded my project to the latest FluentAssertions and got a weird compilation error on the following line:
myArray.Should().Equal(new int[] { 0, 0, 1, 2, 3, 4, 5 });
The error is:
'System.Array' does not contain a definition for 'Should' and no
extension method 'Should' accepting a first argument of type
'System.Array' could be found (are you missing a using directive or an
assembly reference?)

The minimum .NET runtime supported by FA v3.0 is .NET 4.0.3 (which is .NET 4.0 Update 2). In other words, you need to re-target the unit test project to .NET 4.0.3. If you are using Visual Studio 2013, then you already have .NET 4.5 installed and that framework supersedes 4.0.3.

Related

Getting error in umbraco The type or namespace name 'Umbraco' could not be found

The type or namespace name 'Umbraco' could not be found (are you
missing a using directive or an assembly reference?)
I am getting this error when I am inheriting my controller from
Umbraco.Web.Mvc.RenderMvcController
I have checked that umbraco.dll is referenced when I install umbraco from NuGet in Visual Studio 2012.
Intellisense allow me to select this reference but when I compile code it throw this exception like below screen explains it.
All other umbraco is working nice I have designs some static views, master pages, macros etc. all working fine.
In case of Umbraco.
my application was on .Net FrameWork 4.0
umbraco previous version was using .Net FrameWork 4.0
so i was try to use new release of Umbraco 7.0.1 on same FrameWork 4.0 after reading an post i check for .Net Framework for new release i found that was on .Net FrameWork 4.5 so i upgraded my application to 4.5 it resolve the issue.
thanks to everyone who visit to this post.

TryParse is not a member of System.Enum error in VB.NET

I checked out http://msdn.microsoft.com/en-us/library/dd783499.aspx?cs-save-lang=1&cs-lang=vb#code-snippet-1. It should exist.
EDIT:
I tried it on vs2010 (different project, though), and it exists.
Enum.TryParse was added with .Net Framework 4.0.
You can easily tell this by looking at the Other Versions drop down menu in the documentation or the version Information:
.NET Framework
Supported in: 4.5, 4
.NET Framework Client Profile
Supported in: 4
Portable Class Library
Supported in: Portable Class Library
.NET for Windows Store apps
Supported in: Windows 8
So probably you're using an older .Net Framework version.
Do you have System Import?
Imports System
If you are in Visual Studio 2010, make sure you are targeting .NET Framework 4.0

Firebird ADO.NET Data Provider Version 3.0.2 does not support .Net Framework 4?

I downloaded Firebird ADO.NET Data Provider 3.0.2 from the Firdbird website.
http://www.firebirdsql.org/en/net-provider/
I start a new visual studio project, specifying .Net Framework 4 (not client profile)
At the top of one of my source files I put
using FirebirdSql.Data.FirebirdClient
Then I try to build the project, and it gives the following error -
The type or namespace name 'FirebirdSql' could not be found (are you missing a using directive or an assembly reference?)
However if I download version 2.6 of the Firebird ADO.NET Data Provider, it works just fine.
Am I understanding this correctly, version 3.0.2 does not support .NET Framework 4.0?
Unfortunately Windows Xp doesn't support .NET 4.5 so I hope that's not the case.
You have to download the "NET40" version and reference this.

Where did HashSet<T> go in VS2012?

I recently installed VS2012. A C++ project (with .Net 4.0) that compiles fine under VS2010 is not recognizing HashSet<T> on VS2012. I even tried being explicit with following declaration:
System::Collections::Generic::HashSet< String^ >^ _reasons;
But that only results in the error:
error C2039: 'HashSet' : is not a member of 'System::Collections::Generic
The documentation says it's in System.Collections.Generic. The C++ compiler doesn't think so.
Any ideas on where it went?
HashSet<> was a late addition to .NET, it became available in .NET 3.5. The namespace is older, mscorlib.dll contained classes in System::Collections::Generic since .NET 2.0, classes like Stack<> and Queue<>. HashSet<> got added in a new assembly for .NET 3.5, System.Core.dll, they didn't want to tinker with the 2.0 assemblies.
Accordingly, you must add a reference to System.Core to avoid the error message.
Always refer back to the MSDN documentation when you get an error like this, it shows you want assembly reference is required.

error connecting F# to SQL

I'm trying to connect F# to SQL but when i build I keep getting this error
Warning 3 The primary reference "FSharp.Data.TypeProviders" could not
be resolved because it has an indirect dependency on the .NET
Framework assembly "FSharp.Core, Version=4.3.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a" which has a higher version "4.3.0.0"
than the version "4.0.0.0" in the current target
framework. C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets 1360 9 ConsoleApplication33
Where can I find this version FSharp.Core 4.3.0.0? or is there any other solution?
Are you targeting .NET Framework 4.5? If you target .NET Framework 4.5 and create a new project, Visual Studio automatically makes a reference to FSharp.Core 4.3.0.0 which belongs to F# 3.0.
Somehow, you mistakenly added a reference to FSharp.Core version in F# 2.0 and .NET Framework 4.0. Therefore, first check Target Framework in Project Properties and then add FSharp.Core 4.3.0.0 using Reference dialog (notice there are various FSharp.Core versions).