"Librarian" rather than "Linker" shown in VS2015 DLL project - dll

I have a DLL project in Visual Studio 2015 with properties:
However on the left hand side, I see "Librarian" rather than "Linker" options. Also on build I get undefined symbols for all referenced libraries (the project references a few projects in the solutions which build as static lib).
To note:
I converted the project from a static lib to a DLL by changing the "Configuration Type" option.
I have applied, saved, closed, reopened
Linked projects are of same type (e.g. Debug/x64) for this solution configuration.
This could be a VS2015 bug?
Note perhaps similar question for previous version of Visual Studio
In Visual Studio 2012 what is the difference between Librarian and Linker?
(however the question doesn't specify that it's a DLL project)

The problem is that the DLL project had a property sheet which sets the project as a static library, and had a libraries section.
It seems setting your project settings to DLL cannot override this kind of property sheet.

Related

Required DLL marked as unused by Visual Studio

I have a project which builds a DLL (I'll call it mylibrary.dll). DocumentFormat.OpenXml is used by several classes in mylibrary and therefore is a dependency. My project builds successfully and outputs both my mylibrary.dll and a local copy of DocumentFormat.OpenXml.dll. All good so far.
Now I have a new project in a new solution (call it mywebapi). I include references to both mylibrary.dll and DocumentFormat.OpenXml.dll. The project builds successfully and everything is fine.
Here's the trouble, in my project settings, if I have Visual Studio check for "Unused References..." it is telling me that DocumentFormat.OpenXml.dll is not used and should therefore be removed. But if I do not include it in my release, the classes referencing it fail cause the dll is missing.
Is it possible to mark it as a chained reference? Or somehow otherwise tell Visual Studio that it is a dependency?
This is an old question. Never found a solution. But this is probably irrelevant now with newer versions of VS.

Visual Studio won't find references

I'm working with some application handed over by another person in which I must document the requirements, build and deploy processes.
The problem here is that Visual Studio (2005) is throwing a lot of errors since it can't find the references for the dlls.
This obviously won't let VS build the project.
Everything works fine on the persons computer but not on mine, even though the project references the same folder where the dlls are, the bin folder.
How can I circumvent these problems and get VS to properly reference the dlls?
The following printscreen shows the references screen for the project.
My guess is that your DLL uses a more recent .NET framework than your application does.
Check the properties for your DLL source (right-click on the DLL code in the solution explorer and choose Properties). Go to Application - Target .NET framework and compare the version to the one the application itself uses (right-click on the project code). Note: under your application properties check both the settings under Application - Target .NET framework AND under Publish - Prerequisites.
For what it's worth, even after changing the .vbproj file and removing many lines about hard coded values,
I eventually checked out the project again removed all references to the given DLL and then added it using the GUI.
Lesson learned, don't try to change out one DLL for a newer version without using VB2005 GUI.
The easiest solution will probably be to transfer everything to another project. It will be incredibly time consuming to find where visual studio has left the hard coded path at.
WOOT!!!! Compile the DLL file to a lower version of the .NET framework, and it will fix the problem!!!!
The paths in the project file cannot be the same or the assemblies referenced have a different version.
It might be worth unloading your project and the editing it to inspect where it's looking and for what version.
I had the same problem with an older Visual Studio Project that I opened in Visual Studio 2008. I tried to add new references to the project and got permanent errors that the dll's cannot be found. After the migration of the Project to Visual Studio 2010 I got the following error message when I tried to add a new reference:
'mySample.dll' or one of its dependencies, requires a later version of the .NET Framework than the one specified in the project. You can change ...
After changing the projects .NET Framework to a newer version everything works fine.
Good suggestions in other answers. In my case, it was because the libraries weren't copied (downloaded) successfully: the files existed, but were 0 kB.
Did a clean, which removed all the DLL's and then VS2008 complained it couldn't find the references (Duh!!!) and wouldn't rebuild....luckily I had and old version of the dll's and replaced them in the directory AND THEN did a rebuild to replace them...all references are now OK and we're back to normal....good old VS 2008

Custom modules: Namspace-troubles after converting to Visual Studio 2012

I have several custom modules in separated projects (class libraries), not directly in the website-project itself. My predecessor used to work with Visual Studio 2008 in order to edit the modules.
Now, after migrating the project to Visual Studio 2012, I've got strange errors telling me about required references to the DotNetNuke - Assembly. This assemblies reside in the bin-folder of the correspondenting project, nothing has changed there since the migration:
The references seem to be okay:
I can hit F12 on e.g. TabController (which resides in DotNetNuke.Entities.Tabs), this would open the object browser as expected. I can't see what's wrong here. When I compile, the error-list is full of Reference required to assembly 'DotNetNuke, Version=5.0.0.799, Culture=neutral, PublicKeyToken=null' containing the type 'DotNetNuke.Entities.Tabs.TabInfo'. or similar.
I remember vaguely that there was "DotNetNuke Project Templates" installed in the old Visual Studio 2008. Could that be an issue, too?

VB 2008 <The system cannot find the reference specified>

I've created a class library in Visual Studio 2008, and when I try to add the dll as a reference, I get the message in the title for the Path field in my project references. I've been going for a week trying to figure out this issue, and I haven't been able to come up with anything. The strange thing is I can add the same reference to a Visual Studio 2010 project, and it works perfectly fine.
I used VS 2008 to build it because the dll isn't used in house and needs to be compatible with .Net 3.5. Any ideas?
EDIT: I also found out that referencing the dll in a c# project works fine as well. It's only Visual Basic that's causing me problems.
Resolution
Using DependencyWalker, I was able to find out that some obscure dll was indirectly being
referenced (IEShims.dll) but couldn't be found. After a little more trial and error, I found my project had a specified reference path (Project Properties -> References -> Reference Paths) that pointed to the project's DEBUG directory. I had to remove that reference path, which then resolved the above issue.

Where's _WIN64 defined in C++/CLI project compiled as x64?

It seems to be added automagically in every project I create and I compile for x64 but it doesn't even appear in the project's Configuration Properties/(C/C++)/Preprocessor when selecting the x64 configuration.
_WIN64 is automatically defined by Visual Studio. See the list of Predefined Macros.