Quiksoft.EasyMail.SMTP reference not found in visual studio 2015 - c#

We recently started using Visual Studio 2015 at work instead of 2013, and now we have found an issue that some of our projects are not building due to some references not being found, nothing has changed at all, just using vs2015 instead of vs2013.
One of the references is Quiksoft.EasyMail.SMTP, the error is the classic "The type or namespace name 'Quiksoft' could not be found (are you missing a using directive or an assembly reference?)"
Me and a couple of coworkers have been trying to solve this, searching in the internet and we have not found why this is happening. We have the dlls (for example SMTP.Net.dll) and it is included in the References of the project.
We are out of ideas at this moment.
Have any of you had this issue in vs2015. I'm using this library as example but I wonder if there are more issues with vs2015 loading/finding references.
I hope is something silly and just need to turn on/off an option in vs2015.
Thank you in advance for the help.

Because your older project had a reference to the dll. Look in the bin folder of your old project or the lib folder if you have one, there will be a dll for it. Right click on references, "Add Reference" and navigate to the dll. Quicksoft is not a native assembly. You will most likely have to update the license on it as well.

Related

Microsoft.Build.Utilities.Core assembly not found

Basically, I'm trying to create an MSBuild Task by inheriting from Microsoft.Build.Utilities.Task. See here for Microsoft's documentation on the class. The error shown is that the Utilities name doesn't exist in the Microsoft.Build namespace.
I know in the image I'm trying to reference Microsoft.Build.Utilties.Core but this was just due to troubleshooting. Utilities is not found. You can see on the right in the image that I've got a reference to Microsoft.Build.Utilities.Core, which I recently installed from Nuget. I've also tried the Visual Studio Installer, checking the box for developing Visual Studio Extensions. Not sure what I'm missing here.
And as it turns out, I had managed to confuse my project names. The project I had added the reference to is not the same as the project this file is in. Oops.

The type or namespace name '"Namespace"' could not be found in the global namespace (are you missing an assembly reference?)

I am trying to build my project by referencing private project using VS2012, it builds successfully on local machine, but I am trying to use Visual Studio Team Services (previously Visual Studio Online, Team Foundation Service) and the build agent set up by Microsoft does not find the namespace.
Tried to re-reference by reading other posts as well checking that target framework is set on all projects to .Net Framework 4, but nothing seems to work, am I missing something ?
Ok, So I solved the issue, the Visual Studio Team Services error log said that the project was not building because the build configuration was wrong and not assigned to building process, it was set to x86 I change it to Any CPU and now it was build successfully, hope this helps to someone.
if your solution have .cs files i.e. class libraries then build that library separately by right click on it and choose option build, then add reference to the website then it will be cleared.

Added JWT with nuget, but why does error list still says jwt does not exist in the current context? [duplicate]

I am using the MagicLibrary for a few components. I knew it was written in Visual Studio 2003 and recompiled it in Visual C# Express 2010. It compiled just fine and I could see the library in the folder.
I then created a new project in Visual C# Express 2010 and added the components MagicalLocalLibrary.dll to the Toolbox. They appeared fine with no errors. I put in a control from the Toolbox to my form, and it seemed fine. I then debugged (to see if any errors would occur) and I saw that the reference MagicalLibrary disappeared and I got the error:
The type or namespace name 'Crownwood' could not be found (are you missing a using directive or an assembly reference?)
The thing is that, the reference shows fine under References in Solution Explorer but I can't import it with using or use it in the code (simply is not listed in InstelliSense either) but if i go into the Object Browser and choose "My Solution" it is not listed. I can click on the Reference in Solution Explorer and just change the Copy Local property to True or False, then it will appear in the Object Browser but whenever I debug my project again it disappear.
Any idea why it does this? Thanks in advance.
Check that you are using the .Net 4 framework and not the client profile version
You find that setting when you right-click on your project, choose properties. And under application there is a setting for target framework. If you have chosen the .Net 4 framework Client Profile, then this behavior that you described can happen
I ran into a very similar issue once. In my case the problem turned out to be a missing dependency for the "vanishing" namespace's assembly. What finally gave me the information I needed was the suggestion in this StackOverflow answer to raise the MSBuild output verbosity level. After raising the verbosity setting the IDE should give you a more specific reason why the compilation fails.

Can't get Microsoft.Office.Interop reference to work

I have a C# winforms app and I am simply trying to open an Excel sheet. When I try to add a reference to Microsoft.Office.Interop, the "Office" part is red and says "Can't resolve symbol 'Office'".
When I attempt to build, the error is:
The type or namespace name 'Office' does not exist in the namespace 'Microsoft'
(are you missing an assembly reference?)
I have Office 2012 installed, and I think I have the Primary Interop Assemblies installed... but I'm not positive.
I know that this should be so easy, but I've been looking around for an answer to this for almost an hour and just can't figure it out. Thanks in advance!
Use NuGet Package Manager in VS2015
Right click references in your visual studio project
Select Manage NuGet Packages
Type microsoft.office in the search box
Select Microsoft.Office.Interop.Excel
Click Install
Rebuild your solution
You need to add the library assembly reference to your project.
They are referred to as "Primary Interop Assemblies".
(Assuming Visual Studio 2010)
Procedure
open the solution explorer window
expand your project folder accordion.
right click on the references element
select "add reference" from the dropdown
select the .NET tab and look for the object library called Microsoft.Office.Interop.Excel.
click ok
The object library should now appear in your references.
I had the same error this morning, with a Winforms app which had always built perfectly in the past. All that had changed was that our company had upgraded our laptops from Excel 2007 to Excel 2013.
After some investigating, I realised that the app was a .Net 3.5 app, and although the Solution Explorer suggested that all the refererences were fine..
...actually, they weren't. The tell-tail sign was that, when I tried to re-add the References in the app, they couldn't be found...
What I needed to do was:
update the app from .Net 3.5 to .Net 4.5
remove the Office-related References (the first 5 shown in my first
screenshot above)
re-add the References (now shown as version 14 or 15)
I also had to change one line of code from:
excel = new Excel.ApplicationClass();
to
excel = new Excel.Application();
Once I'd done this, the app built without errors, and ran successfully again.
Easier way to add this package in VS 2015:
on the line code using the package press "Alt+Enter" then select "Find this namespace on nuget.org"
Install it and enjoy :)
I think you are missing the dll reference. Add Microsoft.Office.Interop.Excel.dll to project reference and then try.
You need to install Office 2013 to clean this build error.

Visual studio cannot find my referenced DLL's namespace

This is a very frustrating problem. All of a sudden I cannot use referenced DLLs. I added an assembly reference to a project in the same solution and the namespace is unrecognised. I can even see the reference in the object viewer. I've also changed the projects to .NET 4 and 3.5 without the client profile to no avail.
Based on your screenshot, you have references to the same "ServerLibrary" DLL in multiple projects, however, it looks like one referenced version is compiled in .NET 3.5 and the other referenced version (the project reference it appears), is compiled in .NET 4. Make sure all projects point to the same version of the DLL and recompile all. That should fix your problem.
I faced this problem, and I solved it by closing visual studio, reopening visual studio, cleaning and rebuilding the solution. This worked for me. On some other posts, I have read the replies and most of users solved the problem by following this way.
I removed DLL name and namespace from the path where I was using it. And for some wierd reason it worked.
Make sure that the classes are public classes too. I had this issue when I couldn't find my model classes. Silly mistake but frustrating when unnoticed.
This is mostly cause becauese of using diffrent version of same packages at diffrent projects at same solution. I recommend to update all packages to lastest version at all projects.
Right click to project that has downgrade packages --> manage nuget
packages --> click the updates tab --> check the 'select all packages' checkbox -->
click the update
Do this for all prjects at solution.
I had this problem using Visual Studio 2019 with Resharper. I resolved it by clearing the Resharper cache.
Extensions\Resharper\Options
General Page
"Clear caches" button.
After clicking "Clear caches", I restarted Visual Studio and did a Clean/Rebuild.
VS2019 July 2022: I had to deal with same issue for more than a day.
The comment by JaredPar helped to resolve it :"most likely cause of
this problem is the referenced DLL is itself invalid. Have you tried
loading it in reflector to see if it contains members? –
So If you reference an assembly and IT DOES NOT CONTAIN at least ONE public type(Class, Property ,Enum, .. etc) still it does not show after the using keyword. This behavior makes 100% sense, because what is the point of referencing something which is useless?
However Microsoft could easily have added a Message/Warning in VS to make the life of the developer less Miserable.
Something like "Warning: Reference ABC does not contain any public members"`

Categories

Resources