Error occurs while installing the NUGET package in Visual Studio - visual-studio-2013

I'm trying to install Nokia Imaging SDK via NUGET under Visual Studio 2013 at my Windows Phone 8 project but every time I'm getting the following error:
A numeric comparison was attempted on "$(TargetPlatformVersion)" that
evaluates to "" instead of a number, in condition
"'$(TargetPlatformVersion)' > '8.0'". C:\Program Files
(x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets

When I got this error I just restarted Visual Studio and the error went away.
Please note, when I did restart the project did initially load, but I just right clicked and hit reload target and it did.

If you have ReSharper installed it sounds like it could be this bug. This effected version 8.2 and has been fixed in build version 8.2.0.3169 and onwards.

Related

Target Framework not installed when opening a Unity project with Visual Studio 2022

I am trying to open a C# solution that has been generated from a Unity v2020.3.19f project with Visual Studio 2022. Opening it with Visual Studio 2019 works just fine, but there are reasons I'd like to be able to open it with v2022 (such as GitHub Copilot). I did not have issues with this on my previous install of Windows 10.
Upon opening the solution in VS2022, I get the following pop-up prompt for every project in the solution:
Choosing the first option updates the target project to .NET Framework 4.8 and loads the project, but the whole file appears with red lines. When hovering over an underlined bool Property, the error shows as: `CS0518: Predefined type 'System.Boolean' is not defined or imported.
Choosing the second option opens this URL in my browser, prompting me to install .NET Framework 4.7.1 targeting pack (which was already installed via the Visual Studio Installer). When I try to install the .NET Framework 4.7.1 runtime, the installer responds with .NET Framework 4.7.1 or a later update is already installed on this computer. When I try to install the .NET Framework 4.7.1 Developer Pack, the installer allows me to choose from "Repair", "Uninstall", or "Cancel". Repairing has no effect.
I installed both versions of Visual Studio (2019 & 2022) the usual way through the Visual Studio Installer, along with the "Game Development with Unity" workload, which tells me it's installed all dependencies just fine:
Here's what I've tried so far:
Uninstall & reinstall all versions of Visual Studio through the Visual Studio Installer
Uninstall & reinstall Unity, with the Visual Studio module installed through Unity Hub (which just opens the Visual Studio Installer for me to choose which version I want to install)
Regenerate project files through the Unity Editor
Uninstall any references to .NET Framework through the Control Panel
Try reinstalling .NET Framework targeting pack 4.7.1 either from the Visual Studio Installer or manually through the Microsoft SDK website from the prompt
Nothing works for me. Any help on how to make VS2022 stop complaining is greatly appreciated.
Update 1: I found a couple of threads where people suggested simply pressing the Regenerate project files button in "Edit -> Preferences -> External Tools`. This has not helped me.
Update 2: I've tried everything I can possibly imagine, in different orders and different combinations. I even reinstalled Windows 10 to no avail. It's like Visual Studio just doesn't want to accept that the .NET Framework 4.7.1 targeting pack is installed. Please help :(
check this
https://learn.microsoft.com/en-us/answers/questions/733018/visual-studio-2022-cannot-locate-installed-net-fra.html
If you modified the value of ProgramFilesDir(x86), just to modify it back to C:\ProgramFiles(x86) can solve the problem
That is a very interesting problem, my main solution for you to first try is to make sure you are even targeting the correct .net framework in UNITY before you even build the solution. You are using the .NET 4.x, you need to go into your configuration settings and player settings in unity and ensure its not on a different version, for me, unity still defaults to .net standard 2.0. Follow the steps located here. To do so.
Another solution is to see if that first option actually gives you errors that prevent you from using unity, because I know that Visual Studio Code has problems occasionally where it tells me im wrong, my program is wrong, every life choice I have made was poor and I am poor, yet in unity, there are no errors showing in the console and I can hit play no problem. In that case I just had to rebuild a few times and fiddle with vs code until omnisharp stopped yelling at me.
Apperently I have been in a similar situation as when you were getting the error "Predefined type 'System.Object' is not defined or imported" because looking into it, I already have clicked on some of the links, try this one if that error persists. If you cannot prevent the errors to begin with, I would recommend you trying to fix the upgraded version from option one as that is more than likely going to get you the closest to a solution.

Visual Studio syntax highlighting / autocomplete not working correctly

My Visual Studio does not highlight or autocomplete any Unity3D commands any more. I created a new script when noticing that. I restarted VS, reinstalled VS, also reverted all script changes I made today in my project but the result is still the same. Also I now get errors when trying to open my project file. It says it needs a migration and isn't compatible with the current Visual Studio version installed.
The actual error reads "The application that is based on this project type was not found." [translated from German].
I found similar posts on the web where reinstalling VS resolved the issue. Unfortunately, it did not for me. This is how it looks:
Anybody knows how I can fix this?
Ok, I was able to resolve this issue using this trick:
"Do me a favor... if this is Visual Studio 2017... hit your start menu and find Visual Studio Installer... Run it... select "Modify" and select individual components... find Visual Studio Tools for Unity... if it's installed, untick it and uninstall it, then run the installer again and reinstall it. Otherwise, just tick it and install it."

VS 2017 RC cannot find cordova tools

after several unistalls and reinstalls processes of VS 2017 I'm still getting the following error (translated from spanish) when I try to compile for chrome emulator a new and empty project in vs 2017 RC:
MSBUILD : cordova-build error BLDErr_Build_ToolsetInstallation: Could not find the target tool set on the disk.
I've tried also to perform repair processes but the error still persists. Of course I've checked that android SDK, node, etc. are installed and the environment variables have the correct name and path.
Does anyone know how can force to find cordova tools or whatever it is looking for?
Big thanks in advance.
In my case this worked:
Go to visual studio installer(type it in windows start menu).
Choose to modify your installation of Visual Studio.
Go to indivudual components.
Choose to add cordova 6.3.1(at this moment) toolset.
Install and try to build your project.

visual studio 2012 incompatiblity and editor package not loading correctly?

I used to use vs 2012 for some month without any problem, today when I want to open my c# project , I got this error message:
This program has known compatibility issues
Visual Studio 2012 Express for Windows Desktop is incompatible with this version of Windows.
when I click Run program I got this error:
'Microsoft.VisualStudio.Editor.Implementation.EditorPackage' package did not load correctly
When I continue with this error message, another error message shows: Visual Studio has stopped working. I need to get it work as soon as posible, any idea?
I had a similar problem, installing this patch solved it: KB2781514
I just got this error in VS2013 after installing a VS extension. I fixed it by closing all instances of Visual Studio, then removing %LOCALAPPDATA%\Microsoft\VisualStudio\12.0\ComponentModelCache
Happened to me today on VS 2012. The Update mentioned by Jarek didn't install (it complained I already have more stuff installed). Deleting the folder mentioned by squeaky didn't work.
Finally fixed after I installed VS 2012 Update 4 : http://www.microsoft.com/en-us/download/details.aspx?id=39305

Visual Studio 2012 Side by side configuration is incorrect

When I run Visual Studio 2012 Professional I get a side by side configuration error message.
Message:
"C:\Program Files\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe
The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the commande-line sxstrace.exe tool for more detail."
Event log:
"Activation context generation failed for "C:\Program Files\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe". Dependent Assembly coloader80.dll,processorArchitecture="X86",type="win32",version="1.0.0.0" could not be found. Please use sxstrace.exe for detailed diagnosis."
sxstrace.exe: http://pastebin.com/qgS3Sx8c
I've already installed vcredist_x86
I'm running Windows 7 Professional
I had the same issue in that several files were not copied over to the VS2012 directories and it caused the 'side by side' issues. In my case I was installing from a drive that was on the network. After installing / uninstalling / reinstalling over and over without success I finally moved the install media to my local hard drive. Then, I was able to uninstall and then reinstall successfully. I believe the problem is that when the install has to reboot and continue installing it can't find the install media 'in time' so then it fails. If you are installing from a 'remote drive' I would suggest moving the install media to a local drive and then trying again.
I encountered this problem today and found a crude way to solve it for me, without analyzing logs and looking for missing .dlls.
I opened up the system configuration and was about to de-intall VS2013 RC, when I realized there was an repair option. Trying this brought no effect, but I also saw that VS2012 for windows desktop and vs2012 for web were still installed.
So after a reboot this finally fixed my side-by-side error:
Cleanse the machine of any previously installed Visual Studio versions.
Reboot.
Repair the installed (and only left) version of Visual Studio
Reboot.
Maybe this is of use for everyone else who is encountering this problem in the future.
Kind regards

Resources