Missing Microsoft.Windows.Design.dll - c#

I downloaded a project that has a reference to Microsoft.Windows.Design.dll, but it's not on my system. Where can I get this package?
using Microsoft.Windows.Design.PropertyEditing;

That namespace is typically found in the Microsoft.Windows.Design.Interaction.dll assembly, not Microsoft.Windows.Design.dll.
For example, the NewItemFactory class:
Namespace: Microsoft.Windows.Design.PropertyEditing
Assembly: Microsoft.Windows.Design.Interaction (in Microsoft.Windows.Design.Interaction.dll)

Related

'GZipStream' could not be found - reference issue

I can't get to use GZipStream class in my C# ASP.NET 4.5 application.
I get the error:
The type or namespace name 'GZipStream' could not be found (are you missing a using directive or an assembly reference?)
I tried using using System.IO; but the System.IO.Compression is not available in the "Reference Manager" in visual studio. I right click on the object name to see if Visual Studio finds the relevant reference but it does not.
Any suggestions?
Need to add reference to System.dll assembly and using System.IO.Compression namespace.
MSDN: GZipStream Class
The namespace is not the same as the dll name,You need to add a dll reference to the assembly, System.IO.Compression.FileSystem.dll

Error Attempting to Call a WPF Form From Console App

I have a console Application and I need to occasionally launch a WPF form depending on the parameters. I and trying the following:
if (arg == "/C")
{
System.Windows.Application application = new System.Windows.Application();
application.Run(new EJConfig.MainWindow());
}
The problem is that when I go to add a reference to System.Windows, it doesn't show up in the list of .NET components, and without it I get the following error:
The type or namespace name 'Windows' does not exist in the namespace 'System' (are you missing an assembly reference?)
Have you tried adding:
using System.Windows;
To the top of the c# file? You may also need these assemblies:
Assembly: PresentationFramework (in PresentationFramework.dll)
Assembly: PresentationCore (in PresentationCore.dll
Check it out here
you need to add the PresentationFramework and PresentationCore assemblies to your project.
The System.Windows.Application class is located in the PresentationFramework assembly, but you'll also need PresentationCore for it to work.
source:
http://msdn.microsoft.com/en-us/library/system.windows.application.aspx
You are probably missing additional references besides System.Windows. I don't know which are required. You could find out by creating a default application and check the references listed.

Tesseract - Add reference does not works

I'm following the steps:
Download binary here, add a reference of the assembly Tessnet2.dll to your .NET project.
Download language data definition file here and put it in tessdata directory. Tessdata directory and your exe must be in the same directory.
Look at the Program.cs sample
if I call the class from lib using:
tessnet2.Tesseract ocr = new tessnet2.Tesseract();
I'm getting the following error:
Name Namespace or type 'tessnet2' could not be found.
Need a using directive or a set of reference
Modules (assembly)?
How I solve this?
Thanks!
There are two DLL versions for tessnet2: 32- and 64-bit. Make sure you add the correct one to your project. Check VietOCR.NET 2.0x for a working example of using tessnet2.
The error says that it can't find the namespace - even though you've added a reference to it, do you either name it using the full namespace, or can you include it as a "using" at the top of the cs file?
For reference, the translated error (from Portuguese) is:
Namespace or type 'tessnet2' could not be found. Need a using
directive or an assembly reference (assembly)?

Why does intellisense work with Using directive but not when specifing types withing the namespace?

I can add the statement using System.Configuration; to my code using intellisense, but I can't get any intellisense when I access the type ConfigurationManager.
Why does intellisense work when entering the using directive, but doesn't work when specifying a type from that namespace?
using System.Configuration;
namespace TestDBMSConnection
{
class Program
{
static void Main(string[] args)
{
var dataProviderName = ConfigurationManager.AppSettings["provider"];
}
}
}
I can fix the issue by adding a reference to System.Configuration, but I don't understand why I don't need to do that for intellisense to work for the using directive.
Classes in a namespace are not required to be located in the same assembly.
Some classes in the System.Configuration namespace are located in System.dll (such as SettingsBase) while some other classes are located in System.Configuration.dll (such as ConfigurationManager).
IntelliSense can only suggest classes and namespaces in referenced assemblies. So if you have System.dll referenced but not System.Configuration.dll, IntelliSense can suggest the System.Configuration namespace and the System.Configuration classes located in System.dll, but not those located in System.Configuration.dll.
IntelliSense can also not know in which unreferenced assembly a certain class might be located. So you have to reference System.Configuration.dll manually before you can use it.
Because intellisense forusing shows you the list of known namespaces. And System.Configuration namespace is already referenced(Some of the classes in this namespace are in system.dll or mscorlib.dll), while the ConfigurationManager class is in System.Configuration.dll which is not referenced, and thus intellisense does not know about it.

How do I determine what assembly a namespace is in?

The MSDN documentation doesn't generally specify the assembly a namespace is in, so there's no easy way to add the necessary assembly reference.
NOTE: I am using MonoDevelop, so right-click, resolve is not an option.
Take a look at this example: http://msdn.microsoft.com/en-us/library/dd321424(VS.100).aspx
Task(Of TResult) Class
Represents an asynchronous operation
that can return a value.
Namespace: System.Threading.Tasks
Assembly: mscorlib (in mscorlib.dll)
Namespaces can cross multiple assemblies, so you need to look for the assembly a specific class is in.

Categories