The type or name of the ServiceBus namespace does not exist in the Microsoft namespace,

I am trying to create a console application in C # that adds messages to the queue. I follow the Azure Service Bus examples given here: http://www.windowsazure.com/en-us/develop/net/how-to-guides/service-bus-queues/

My program is not doing anything at the moment:

using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.ServiceBus; using Microsoft.ServiceBus.Messaging; namespace testConsole { class Program { static void Main(string[] args) { } } } 

The problem I am facing is that when I add the Microsoft.ServiceBus.dll link (as described in the link above, 1-add dll reference and 2-add using statements), I get an error when compiling: "The type or name of the namespace" ServiceBus "does not exist in the namespace" Microsoft "(do you miss the assembly reference?)"

I even looked into Microsoft.ServiceBus.dll with a reflex tool, and it contains the Microsoft.ServiceBus namespace. The dll version number is 1.6.0.0 and the execution version is version 4.0.30319.

Any help was appreciated.

-pom -

+6
source share
1 answer

A common problem when using storage services and AppFabric with non-web applications is that the target Target Framework for Windows Forms and the default console application are the .NET Framework 4.0 client profile. Change the Target Framework project to ".NET Framework 4.0" (full) and it will work.

+13
source

Source: https://habr.com/ru/post/904076/


All Articles