My goal was to update a reference from my old DLL to a newer version that was updated to VS2012.
D:\DEV\<old_path>\TEST\bin\Company.dll
D:\DEV\<new_path_2012>\TEST\bin\Company.dll
In the .vbproj file...
<Reference Include="Company, Version=0.0.0.0, Culture=neutral">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\<new_path_2012>\TEST\bin\Company.dll</HintPath>
</Reference>
In the Solution Explorer, Under References, I right-click on the Company reference and click Properties. The Path is listed as...
D:\DEV\<old_path>\TEST\bin\Company.dll
There are no errors or warnings. Everything is appearing to build properly however I lack confidence because of this discrepancy. How can I fix this?
I have tried restarting VS2012 and have tried deleting the TFS Cache. Downloading a fresh copy of this project from TFS on another PC seems to resolve the problem however I would like to better understand how to resolve this without such drastic measures.
I just had this issue crop up, and while this is an old thread it was the first Google result when I did my search, so I thought to offer what had happen for me.
TL;DR: Triple check the hint path - it could be wrong, and VS is using the DLL in the GAC.
My issue came up because I was using a little script to help me update over 250 projects worth of references, and had a small handful that didn't follow normal folder layout. So my hint path was 'correct' at first glance, but because it really wasn't, VS 2013 went to the version of the DLL in the GAC.
Once I clued into what was wrong and fixed the relative path for that project file, hint path and what was displayed in References matched up as it was supposed to.
Related
During installation I get "The feature you are trying to use is on a network resource that is unavailable" and prompt to specify some path to vc_runtimeMinimum_x64.msi. After providing some path to required file I get error states that this file doesn't match required version Minimum Runtime 14.14.26405.
I finally found the solution reading this question: Install vcredist_x64 with VS2017 installer project
I realized that specific VC_Redist.x64.exe files could be downloaded by links like https://aka.ms/vs/15/release/26405.00/VC_Redist.x64.exe, where 26405.00 is exactly the version I was required to fix. Note, that you need version from error text after clicking OK, not from window title.
And the last point is that this exe must be executed from cmd with argument /repair to help me with this issue. Regular execution by double click made no effect.
I found the solution elsewhere. It said to
Fix problems that block programs from being installed or removed
https://support.microsoft.com/en-us/help/17588/windows-fix-problems-that-block-programs-being-installed-or-removed
download troubleshooter button on the link.
Run it - choose option - have problem with installing - it lists programs - choose the missing / problematic visual c++ runtimes in the list
it will run and get fixed.
Repeat for each visual c++ you having problems with. I ran the program multiple times.
I have to thank this comment section for helping me with this problem, since I have not been able to work more efficently with my school, since I din't know what and if a single file somewhere deep down in the computer had to be deleted for this program to work.
My version of VBA seems to be missing quite a few Tool References. Therefore I tried adding a library I know exists (scrrun.dll) through the "Browse" tab although it only results in the following error:
I would appreciate any kind of help regarding how to get access to more tool references.
A reinstall may help, but these references may be pointing to a folder from a different version of windows (*\System32 vs *\SysWow64 may be the issue)
What changed from the system it originally ran on? Search the C: drive for SCRRUN.DLL and if the path has changed, switch that via browsing for the real path. I've never seen that file missing before, but I think it's part of Windows.
On a rare occasion, you may have to re-register the components (again some of these are included Windows components). Check out this reference
Actually quite a simple issue. I have been using a slow laptop to develop on VS2012, and I setup a screamer to develop on now. No change in versions, etc., just doing it all on a different machine.
To be honest, I haven't even copied the Projects folder yet, as I'm not sure if there wold be project-specific options that would be reset/broken.
To be clear, the new 2012 is Ultimate, and I haven't even tried to migrate. There have been a LOT of options/features added to my existing projects & solutions, so it may not be as simple as copy/paste the Projects folder.
What are your thoughts?
#Peter and #JohnnyHK,
You both were right. I was putting this off on a new machine for fear that I'd need to remember a ton of things I hadn't documented in the Solution (and projects under it-about 20).
So I was already using subversion on the old machine, so I added VisualSVN/Tortoise and checked out a copy of the solution to the new Projects folder. There were like 350 errors & more warnings! Yikes!
But I went through them very quickly and it is clean now. One thing that I noticed in the process was that VS2012 is a little 'broken' when it comes to project (on-web) references. NuGet was actually amazing in that as soon as I fired up the Package Console, it went along, finding & installing all the packages & dependencies! :)
I enabled Show All Files, then opened the References tree node, and noted the ones with little yellow "X"s next to them. In the good side, ones that were not needed (I added them, but created just clutter) were good to see & delete. BUT, there were mostly errors from references that had references to DLLs that were actually in the right place, and when I left clicked on the reference with the error icon, the error would simply go away. Weird, but preferable...
The strangest ones were reference to DLLs that were where they were supposed to be (I'd make a .\lib directory in the project, a la *NIX style, and throw all DLLs for that project in there), BUT I had to delete the reference in error (even though the project was pointing to the right file/location) and then re-browse for it, adding it again, and all errors went away.
All in all, I was pretty impressed with the ease-even with the weirdness-it went. Once I saw how the references were broken, I just went into each project & treated each one. Let me be clear for anyone doing a mass WPF migration: If I had started with the first project and worked to the end one, and ONLY fixed the References issues, I would have been done in 5 minutes-includes time for NuGet to auto-load.
I will not lie; This was the first big migration of a solution to a new machine, and when I saw like 700 warnings/errors, I thought "There goes another weekend!", but I will warn those in this situation to NOT go into source code and try to fix each red underline. You will break things!
I am getting this warning on assembly references in a VS2012 Winforms application project. In this case the references are for Infragistics controls used by the app, which are located in the bin folder.
This issue has been addressed in the following link, but the answer ("set the Build Action" property) doesn't work because there is no Build Action property in VS2012 for referenced assemblies.
VS2005: Assembly '<assembly>' is incorrectly specified as a file.
What's the fix?
You probably refer to the wrong Assembly.
You need to "set the Build Action" for the Assembly which located in Bin folder, NOT from references.
Go to Solution Explorer > Expand the Bin folder, right click on the
Assembly that give warning, and you should be able to set the Build
Action
Again, it is not the assembly that located in the References panel but it is from Bin Folder
Have you tried removing the references, saving the solution and exiting Visual Studio - then re-opening the solution and re-adding the references?
The problem is almost certainly lurking in the project file (.csproj if this is a C# app) if you fancy opening it up in a text editor and having a look - might also help if you were to paste it here.
Alternatively, have you tried recreate the project from scratch? May be a quicker solution than trying to work out what's happened.
I have a solution with many projects. This is actually a solution that contains a mix of class libraries and various web applications. It seems that if my colleague makes a change to one of the web projects (or if I do) and then check it in. And then when either one of us gets the latest version project references become broken. They still appear in the references section with no indication of an error, but when you try to compile it cannot see the libraries.
To solve this I have to remove the references and add them back in. Any ideas on what may cause this problem?
Make sure that the paths are relocatable, that you both have the same paths on your PCs (i.e. that you have not used TFS workspace mappings to put different folders in different places), and that you don't move projects around or rename folders etc.
Even when everything is clean and tidy, Visual Studio will occasionally decide it can't find a file that's right under its nose, or that a file somewhere else on your system looks prettier, and it will break the reference. You just have to delete and recreate it in this case. But this usually happens once a month in a team of 10-20 people, and should not occur every time you check in.