Upgrading to VS 2022 some DLL references show yellow exclamation mark - dll

My .NET solution is building perfectly in VS2017 (x86) running on Windows 10 targeting .NET framework 4.6.1
I'm trying to install VS2022 (x64) on a Windows 11 machine and build the solution but it fails because it can't resolve references to some DLL's. The DLL's are a mix of windows DLL's and some third party programs which are all installed on the new Window 11 machine (e.g. iTunes and UPNP). I've tried removing the reference to those DLL's and readding them (VS2022 can see them and add the to the project) but it still shows a yellow exclamation mark after adding them.
The only differences I've noted between the 2 machines are:
Original Machine
Windows 10
VS 2017 (x86)
Target .NET Framework 4.6.1
New Machine
Windows 11
VS 2022 (x64)
Target .NET Framework 4.8
Here's one such windows UPNPLib DLL (upnp.dll) that shows up as a yellow exclamation mark on the new build machine.
<ItemGroup>
<COMReference Include="UPNPLib">
<Guid>{DB3442A7-A2E9-4A59-9CB5-F5C1A5D901E5}</Guid>
<VersionMajor>1</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>tlbimp</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
</ItemGroup>
Anyone have any ideas why VS 2022 is having trouble with these DLL's?

For future reference, I was able to resolve this issue by starting Visual Studio with Administrative rights. Now it was able to "access" those DLL's in the references without any issues. I didn't make any other changes.
I don't know why it needs Administrative rights to access some DLL references. This isn't listed as one of the reason why VS needs to have administrative right on this page:
https://learn.microsoft.com/en-us/visualstudio/ide/user-permissions-and-visual-studio?view=vs-2022
or here
https://learn.microsoft.com/en-us/visualstudio/ide/troubleshooting-broken-references?view=vs-2022
Maybe someone who know the reason can update this answer to include that information.

Related

Unwanted dll's after publish in Visual Studio 2017 RC

When I publish .net core application in Visual Studio 2017 RC, it creates 2 unwanted dll's, which are as follows:
Microsoft.DiaSymReader.Native.amd64.dll
Microsoft.DiaSymReader.Native.x86.dll
It happens only in Visual Studio 2017 RC and not in Visual Studio Express 2015.
I have found following link on github, but fix mentioned over there only removes ref folder from publish output.
https://github.com/aspnet/websdk/issues/123
Is there any way, by which I can get rid of these 2 heavy dll's as they size around 2MB in total?
This was caused by a bug in Microsoft.NETCore.App version=1.1.0. When you reference that version, implicitly (the default), or explicitly, you will get those two assemblies in your publish directory.
The fix is to either upgrade to Visual Studio 2017 RTM, which implicitly references the version with the fix (1.1.1), or to explicitly reference 1.1.1 by adding <RuntimeFrameworkVersion>1.1.1</RuntimeFrameworkVersion> to your .csproj.

Adding ColinsALMCorner.CustomBuildTasks.dll to Toolbox causes 'could not load file or assembly' error

I am adding this custom build task to my TFS 2010 build workflow, however when attempting to add it (ColinsALMCorner.CustomBuildTasks.dll) to the toolbox, I get error:
'Could not load file or assembly file 'ColinsALMCorner.CustomBuildTasks.dll' or one of its dependencies. Operation is not supported'.
I have added all of its dependencies to (I admit, this is probably redundant):
1) the same location where the ColinsALMCorner.CustomBuildTasks.dll resides, which is ..\BuildProcessTemplates\CustomActivities
2) in the Public Assemblies folder: Microsoft Visual Studio 10.0\Common7\IDE\PublicAssemblies
And I have the build definition xaml file correctly importing the ColinsALMCorner.CustomBuildTasks namespace
Although the activity is set to target .Net 4.5, the documentation says that TFS 2010 / .Net 4.0 is supported, so I assume this should all be possible.
My Questions:
Is this possible with TFS 2010 / .Net 4.0 development environment? My concern is that the error message isn't telling the real story, for example maybe it is able to find it, however just not the right version of the assembly.
Is it likely that since the DLL targets .Net 4.5 I need to have all of its referenced dll's also be the 4.5 version? For example, it references Microsoft.TeamFoundation.VersionControl.Client however I only have the version 10.0.0.0 (which I assume the .Net 4.5 version of this might be 11.0.0.0)
Here was the solution, in short story format: I installed Visual Studio 2012. Result: I was able to add ColinsALMCorner.CustomBuildTasks to my workflow in Visual Studio 2010 without error. I assume this means there was a 2012 (v11.0.0.0) DLL or two required to use the activity in 2010, despite the fact that the requirements state:
Team Foundation Build 2010, 2012 or 2013

Testacular install fails, no vcbuild.exe

I'm trying to install Testacular (using nmp) on a Windows 8 Professional (64 bit) laptop, but it fails when it tries to install socket.io as part of this process. The error I get is
Could not load the Visual C++ component "VCBuild.exe".
To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual
Studio 2005 or 3) add the location of the component to the system path if it
is installed elsewhere.
I apparently have .NET framework 3.5 installed (it's checked under the add/remove Windows components bit in Control Panel), although I've not managed to find a vcbuild.exe. I tried installing an old copy of VS2005 but this resulted in a different error about an invalid project (.vcproj) file.
Can anyone suggest how I might get this working? Weirdly it installed fine on my work computer, which is very similar to the one on which it won't install (they're both 64 bit Win 8 Pro).
I ran into the same issue. I fixed this by adding this to environmental variable PATH: C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcpackages so that it can find vc build.
In Visual Studio 2010, the command line tool vcbuild.exe is replaced by msbuild.exe. So, please make sure you have right Visual studio.

VS2012 Error on setup on Windows 8 - Visual C++ 2012 x86 Minimum Runtime cannot be found

I am getting a few errors trying to download the new VS2012. Its a fresh install of windows 8 (did the windows update). I have tried not selecting all (no C++, lightswitch, blend, office tools)
I tried different mounting tools for the .ISO but no luck. VS2010 is still working. Running x86. Log file
Errors:
Critical: Microsoft Visual C++ 2012 x86 Minimum Runtime - 11.0.507 Cannot find the requested object.
Microsoft Visual Studio 2012 Pre-Clean Tool Cannot find the requested object
Microsoft Visual C++ 2012 x86 Additional Runtime - 11.0.507 Cannot find the requested object.
Microsoft Visual C++ 2012 Core Libraries, Team Foundation Server 2012, Microsoft Framework 4.5 Multi-Targeting pack.... and a few other ones cannot be found. Thanks!
Downloaded the web installer, and that seemed to work. It seems that the iso was corrupted as the MD5 did not match.

Targeting .NET 4.0 in VS 2012 on Windows 8

I just installed VS 2012 Ultimate RTM on Windows 8 Pro RTM and tried to open a solution containing several projects (class libraries and WinForms) targeting .NET 4.0.
When the solution is loaded, VS prompts that .NET 4.0 isn't supported. It gives me the chance to update my projects to 4.5 (and promises that I could change the target later) or install a "Multi targeting pack" for 4.0 from this page.
I decided to update my projects to 4.5 because I had no luck installing the offered Multi targeting pack (errors see below).
Unfortunately, VS does not show 4.0 as a target by default (when changing the target for an updated project), but redirects me to the page where I can download the Multi targeting pack.
So far so good, but I wasn't able to install any of the offered downloads (neither runtime nor targeting pack) again.
The error message says in case of .NET Framework 4.0.3 Targeting Pack:
Setup has detected that this computer does not meet the requirements to install this software. The following blocking issues must be resolved before you can install KB2600213 software package.
Installation Requirements:
Microsoft .NET Framework 4 Multi-Targeting Pack was not found. Please repair your installation for Microsoft Visual Studio 2010 in order to get this update.
Strange enough since I have no VS2010 installed.
.NET Framework 4.0.3 Runtime Installation stops with the following error:
KB2600211 does not apply, or is blocked by another condition on your computer.
I've checked that .NET 4.0 is installed (using the .NET Installation verification tool), I've tried to repair VS2012 but nothing let me target .NET 4 and the Event log does not contain any related reports. Any suggestions or hints (besides going back to Win7/VS2010)?
I'm honestly not sure what's going on. I have VS 2012 Ultimate RTM and all versions of .NET are supported.
I'm almost positive I never installed any .NET frameworks manually, though I did install Visual Studio 2010 Express for Windows Phone from http://create.msdn.com.