Newbie, Visual Studio Express 2010. I tried to follow the tutorial. I get the following error:

Aug 3, 2011 at 8:09 PM

Newbie.

Visual Studio Express 2010.

I tried to follow the tutorial.

http://nbehave.codeplex.com/wikipage?title=Getting%20started&referringTitle=0.5.0

I get the following error:

Error 1 The type or namespace name 'Framework' does not exist in the namespace 'NBehave.Spec' (are you missing an assembly reference?) E:\CSharp001\NBehaveTest\Project1\ClassLibrary1\user_logs_in_successfully.feature.cs 6 20 ClassLibrary1

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NBehave.Narrator.Framework;
using NBehave.Spec.Framework;
using NBehave.Spec.NUnit;

namespace ClassLibrary1
{
    public class Class1
    {
    }
}

Coordinator
Aug 3, 2011 at 9:34 PM

I see that the getting started guide is missing one reference.

You should reference nbehave.narrator.framework.dll, nbehave.spec.framework.dll, nbehave.spec.nunit and nunit.framework.dll".

Aug 4, 2011 at 9:47 AM
Edited Aug 4, 2011 at 9:52 AM

I got errors.

 

https://picasaweb.google.com/lh/photo/DdGzZ9EXuIG3sVHoRim9pw?feat=directlink

 

Error 1 The type or namespace name 'Spec' does not exist in the namespace 'NBehave' (are you missing an assembly reference?) E:\CSharp001\NBehaveTest\Project1\Project1\user_logs_in_successfully.feature.cs 6 15 Project1Error 2 The type or namespace name 'Spec' does not exist in the namespace 'NBehave' (are you missing an assembly reference?) E:\CSharp001\NBehaveTest\Project1\Project1\user_logs_in_successfully.feature.cs 7 15 Project1Error 3 The type or namespace name 'nunit' could not be found (are you missing a using directive or an assembly reference?) E:\CSharp001\NBehaveTest\Project1\Project1\user_logs_in_successfully.feature.cs 8 7 Project1Warning 4 The referenced assembly "NBehave.Spec.Framework, Version=0.5.1.263, Culture=neutral, PublicKeyToken=d421feca0f4a05f6, processorArchitecture=MSIL" could not be resolved because it has a dependency on "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project. Project1Warning 5 The referenced assembly "NBehave.Spec.NUnit, Version=0.5.1.263, Culture=neutral, PublicKeyToken=d421feca0f4a05f6, processorArchitecture=MSIL" could not be resolved because it has a dependency on "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project. Project1

Coordinator
Aug 4, 2011 at 9:51 AM
Pierre8r, can you please try targeting the .Net 4.0 full framework instead of the .Net 4.0 Client Profile?

On Thu, Aug 4, 2011 at 10:47 AM, Pierre8r <notifications@codeplex.com> wrote:

From: Pierre8r

I got errors.

https://picasaweb.google.com/lh/photo/DdGzZ9EXuIG3sVHoRim9pw?feat=directlink

Error 1 The type or namespace name 'Spec' does not exist in the namespace 'NBehave' (are you missing an assembly reference?) E:\CSharp001\NBehaveTest\Project1\Project1\user_logs_in_successfully.feature.cs 6 15 Project1Error 2 The type or namespace name 'Spec' does not exist in the namespace 'NBehave' (are you missing an assembly reference?) E:\CSharp001\NBehaveTest\Project1\Project1\user_logs_in_successfully.feature.cs 7 15 Project1Error 3 The type or namespace name 'nunit' could not be found (are you missing a using directive or an assembly reference?) E:\CSharp001\NBehaveTest\Project1\Project1\user_logs_in_successfully.feature.cs 8 7 Project1Warning 4 The referenced assembly "NBehave.Spec.Framework, Version=0.5.1.263, Culture=neutral, PublicKeyToken=d421feca0f4a05f6, processorArchitecture=MSIL" could not be resolved because it has a dependency on "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project. Project1Warning 5 The referenced assembly "NBehave.Spec.NUnit, Version=0.5.1.263, Culture=neutral, PublicKeyToken=d421feca0f4a05f6, processorArchitecture=MSIL" could not be resolved because it has a dependency on "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project. Project1

Read the full discussion online.

To add a post to this discussion, reply to this email (NBehave@discussions.codeplex.com)

To start a new discussion for this project, email NBehave@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Coordinator
Aug 4, 2011 at 10:47 AM

There are 2 errors
1) remove the line "using NBehave.Spec.Framework"
2) casing matters in C# (as I'm sure you know), so you should have

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NBehave.Narrator.Framework;
 using NBehave.Spec.NUnit;
using NUnit.Framework;

namespace ClassLibrary1
{
    public class Class1
    {
    }
}
Aug 4, 2011 at 12:13 PM

 

Pierre8r, can you please try targeting the .Net 4.0 full framework instead of the .Net 4.0 Client Profile?

Yes.

Here the result :

https://picasaweb.google.com/lh/photo/E_0tkoydaZxpfVNh_Kl_lQ?feat=directlink

 

https://picasaweb.google.com/lh/photo/fhom4gswwD0Y6CgEk3swyg?feat=directlink

 

Error 1 The type or namespace name 'Framework' does not exist in the namespace 'NBehave.Spec' (are you missing an assembly reference?) E:\CSharp001\NBehaveTest\Project1\Project1\user_logs_in_successfully.feature.cs 6 20 Project1Error 2 The type or namespace name 'nunit' does not exist in the namespace 'NBehave.Spec' (are you missing an assembly reference?) E:\CSharp001\NBehaveTest\Project1\Project1\user_logs_in_successfully.feature.cs 7 20 Project1Error 3 The type or namespace name 'nunit' could not be found (are you missing a using directive or an assembly reference?) E:\CSharp001\NBehaveTest\Project1\Project1\user_logs_in_successfully.feature.cs 8 7 Project1

Aug 4, 2011 at 12:15 PM
Lazydev wrote:

There are 2 errors
1) remove the line "using NBehave.Spec.Framework"
2) casing matters in C# (as I'm sure you know), so you should have

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NBehave.Narrator.Framework;
 using NBehave.Spec.NUnit;
using NUnit.Framework;

namespace ClassLibrary1
{
    public class Class1
    {
    }
}

Thanks,

This one work.

No more errors