i used visual studio 2010 and i need to add System.Windows.Forms in my project but when i am trying to add this then it shows error i.e.
please give me solution for this
i used visual studio 2010 and i need to add System.Windows.Forms in my project but when i am trying to add this then it shows error i.e.
please give me solution for this
Problem: You are trying to add the System_Windows_Forms
from COM
tab of Reference Manager
window.
Problem here:
Solution : You need to Add
System.Windows.Forms
from Assemblies -> Framework
Tab of Reference Manager
window.
Select as below:
A console application does not automatically add a reference to System.Windows.Forms.dll.
Right-click your project in Solution Explorer and select Add reference... and then find System.Windows.Forms and add it.
and
Did you try to add it from the COM-tab? Find the System.Windows.Forms.dll in the .NET-tab instead!
In VS 2010. Add Reference -> ".NET" tab -> System.Windows.Forms
If you cant see it there, then check to what .NET framework version your project is set (Add reference should show you to what version it filters libraries or check project properties.) and make sure you have that version installed.
How to find installed versions: http://msdn.microsoft.com/en-us/library/hh925568(v=vs.110).aspx
Edit: Also, if you are using Vista or later, you should migrate your project to .NET 4 if it already isn't.
.NET 4 installer: http://www.microsoft.com/en-us/download/details.aspx?id=17851
.NET 3.5 installer: http://www.microsoft.com/en-us/download/details.aspx?id=21
If you are using Windows 8 or 8.1 here is how you can enable older framework versions: http://msdn.microsoft.com/en-us/library/hh506443(v=vs.110).aspx
Please don't do this. You mention you have a web application and you are adding windows form DLL to it. This is not correct way of doing whatever it is that you are doing. What exactly are you trying to accomplish?