Error MSB4057 in Microsoft.Common.targets - visual-studio-2010

I have Visual Studio 2010 SP1.
I wrongly edit and save the file
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets
and now I can't compile anymore.
The error I got is
1>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.Targets(767,39):
error MSB4057: The target "_Xsd" does not exist in the project.
I reinstalled Visual Studio 2010, I copied the file from another computer but nothing works and I still have the same error. What can I do?

I search the solution on Internet and i found:
Copy the right target file from another machine to replace the target file.
Uninstall and re-install .Net Framework 4.0 and check if it works.
I tried to restore or install new version of the .NET framework, but other problems occured during installation maybe dued also by hardware problems (i got blue screen sometimes).
I know it isn't a good solution, but at the moment I solved the issue by formatting and reinstalling everything.

Related

Could not load UI satellite dll 'FileTracker32UI.dll'

I've run in to an issue where I can't build a freshly created C++/CLI Class Library project in Visual Studio:
Even though I haven't made any changes I get an error when I try to compile:
Severity Code Description Project File Line Suppression State
Error Could not load UI satellite dll 'FileTracker32UI.dll'. Make
sure it exists in an LCID subdirectory of 'C:\Program Files
(x86)\MSBuild\14.0\bin\'. TestProject c:\Users\abcde\documents\visual
studio 2015\Projects\TestProject\TestProject\FileTracker 1
I've created C++/CLI Class Library projects in the past on the same computer using Visual Studio 2015 without encountering this problem. Any idea what has gone wrong?
I ran into this strange issue today without making any code change. I suspect it appeared due to overnight windows update.
In my case , I copied the two files FileTracker32UI.dll and FileTracker64UI.dll
From
C:\Program Files (x86)\MSBuild\15.0\FileTracker\3082\
To
C:\Program Files (x86)\MSBuild\14.0\Bin\3082\
and it worked. My visual studio version is
Microsoft Visual Studio Community 2015
Version 14.0.25123.00 Update 2
I am hoping the info helps someone.
I had the exactly same problem, after some windows update by my IT.
According to the information (https://forum.dlang.org/post/ezuohezwuzyitjdzpfdw#forum.dlang.org), I renamed the file "FileTrackerUI.dll" to "FileTracker32UI.dll" in the latest LCID folder (latest numbered folder in same location)
Then, it worked at my PC.
Good luck
In my case it was a path issue. Using another directory (shorter path without special characters) solved the problem

Visual Studio 2015 - Error 1123:

I have encountered a bizarre situation in which.....
a Win32 project (originally compiled/run using Visual Studio 2010) has been successfully carried over/updated and successfully compiled under Visual Studio 2015 on the same computer (mentioned just in case that is somehow relevant).
I now need to continue development of the project on a different computer. So I copy the ENTIRE contents of the project folder to an identically named folder on the new computer, with VS 2015 installed. The only difference being that the project folder is now on the D: drive rather than C: as in the original computer.
When I try to compile the program I get:-
fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
I experienced this error in the past with Visual Studio 2010 and fixed the problem as advised in previous articles such as:
Failure during conversion to COFF: file invalid or corrupt
In this case however the puzzle is that, as mentioned above, the project has already successfully compiled on the computer it was copied from AND the new computer appears to have a correct and up to date VS2015 installation (e.g. the issue cannot be due to incorrect version of the CVTRES.EXE file - as was case when the same error was encountered in the past with Visual Studio 2010)
As far as I can tell the configuration settings for both VS2015 installations, on both computers are the same. The only difference as far as I can tell being that on the new computer the project now resides in a different drive/path - although the project folder is indentically named.
Can this really be the source of the problem?
The problem has now been, apparently, solved. I tried the /verbose option but that did not reveal any information or insight of any use.
The computer on which the project had been transferred to had Visual Studio 2010 WITHOUT service pack 1 installed. As an entirely separate exercise I proceeded to install service pack 1 (from a previously saved/archived ISO file). It failed to install. I then uninstalled VS 2010 from the computer.
I then tried again to compile my project using VS2015 - and again it failed, giving the error 1123.
I then performed a FULL re-installation of VS2010. I followed this with an another attempt to install the service pack 1 - which then succeeded.
After all this I then attempted to compile my project in VS2015 - and it succeeded! The connection with the VS2010 may be completely coincidental? But I mention this here for the record in case anyone else encounters a similar circumstance.
The puzzle is how, if at all, can the state of the VS2010 installation influence the ability to compile the project in VS2015. The concern, more importantly, is that my continued ability to work on/compile the project using VS2015 will be dependent on the computer keeping VS2010 w/SP1 installed?!

Could not create project in Visual Studio 2010

Can any one tell me why this type of error message is prompting when i am creating new project.
The error message is as below.
" Could not load file or assembly .
'Microsoft.VisualStudio.ManagedInterfaces, Version=8.0.0.0, Culture=neutral,PublicKey Token=b03f5f7f11d50a3a' or one of its dependencies.
The system cannot find the file specified."
What should I do to overcome this?
Maybe the "Repair" option on then VS2010 Setup will help. If not you might have to do a complete uninstall/reboot/install cycle.
A quick google search gave me something pointing at the VS SDK - maybe a reinstall of this might help too.
I had same issue after installation SP1. I tried re-install of SP1 with no success.
Get the Microsoft.VisualStudio.ManagedInterfaces.dll(if it is not present in your environment you can download it from here ) and install to global cache. Restart VS2010 and load you project again.

"Exception has been thrown by the target of an invocation." when building a Visual Studio 2010 VSPackage

I recently create a couple of VSPackages for some Visual Studio extensions (menu bar/command). I compiled them correctly yesterday, checked into TFS (i'm the only one touching this project, FYI). I had already installed these extensions and were working fine. Today it doesn't compile! I get the following error:
Exception has been thrown by the target of an invocation.
This doesn't tell me anything, so i fired up Visual Studio with the following command:
devenv.exe /Rebuild > out.log
In my out.log, I see the following:
C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.0\VSSDK\Microsoft.VsSDK.targets(420,5): error : Exception has been thrown by the target of an invocation.
I have been stuck on this for hours and can no longer build these VSPackages. Anyone? This is really frustrating. I have already tried cleaning project/rebuilding/build using Visual Studio itself (not command line)
I've experienced this issue several times in both vs2010 and vs2012, and manually deleting the "bin" and "obj" folders from the project then doing a "rebuild" normally does the trick.
Further to the answer provided by the OP, I will provide it here for completeness instead of relying on the external link remaining live:
Quoted directly from the MSDN forum answer:
Do you happen to have these extensions installed to the AllUsers
location (i.e. %VSInstallDir%\Common7\IDE\Extensions)?
You mentioned in your initial post that "I had already installed these
extensions and were working fine."
The task that's failing (based on the line number in the targets file)
is the UninstallExtension task. The only reason I'm thinking this task
would execute and fail in your situation is if you're building an
extension that's already installed to the Common7\IDE\Extensions
directory.
Regards, Aaron
I find myself on this question because of exactly the same build issue of a VSIX Installer Project for our project templates. This solved my issue.
Indeed, I uninstalled the prior version of our templates and the build occurs without issue.
Have you double checked that all of your projects are using compatible framework versions?
As in you can't use a .Net 4.0 assembly in a .Net 3.5 project.
Is the project linked with source control like TFS? If so then take latest from TFS and try again.
Are you running Visual Studio as Administrator?
Maybe you have insufficient rights for some file (copy/move/delete) especially in bin or obj folders.

How to fix build error in Visual Studio: '"LC.exe" exited with code -1'

I get the following error when building my Windows Forms solution:
"LC.exe" exited with code -1
I use two commercial Windows Forms Libraries: Infragistics and the Gantt-Control from plexityhide.com, that's why I have licenses.licx files in my WinForms Projects. We also use Visual Sourcesafe as our Source Control.
When the licenses.licx files are in the Projects I cannot build without the above error. However, when I exclude them from my projects the build works fine. But I need the licenses.licx files when I want to work with the commercial controls in the designer.
This is a brand new developer machine with Windows XP SP3 (German) and Visual Studio 2005 Team Edition for Software Developers (German) with SP1.
It's Windows XP 32-Bit by the way.
Any suggestions?
Problem mainly arises due to license file. Exclude the file licenses.licx from your project
We frequently encounter this error from our last project. The solution is to reinstall the libraries since we're using the trial version. This occurs when the libraries expire.
I reinstalled Infragistics and that seems to have fixed it.
Is there any more information in the error message?
When I had problems with LC.exe in the past, most times it was because the licensed component was upgraded (the version number increased), but the licx file still contained the old version.
In this case, you can try to update the version in the licx file manually, or change it to x.y.z.* to just work for further updates. You can also try to re-generate the licx file by deleting it and re-inserting the licensed windows forms controls into your form.
seems the problem is due to updating the controls.
licenses.licx includes version 2 of .net controls. it works deleting lines with version 2 (after versioning).
Other times worked in this way:
add an empty form, then insert the control that caused the problem.
There should be a license.licx file in the properties folder when you use commercial components. It is often corrupted. If you clean its contents, the "LC.EXE" exited with code -1 disappears.
Had the same problem. Could not build with licenses.licx (even if blank) and had 3rd party licensing problems without licenses.licx. This problem appeared after I upgraded Visual Studio from 2015 to 2019 and changed my .NET Target Framework Version from v4.5.2 to v4.7.2. To do further testing I ran the command (from the error message) in cmd at the location of lc.exe. I got no useful errors but noticed a version mismatch. I didn't have lc.exe for 4.7.2 installed. ("C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.7.2 Tools\lc.exe"). With some guidance from this answer, I installed the .NET 4.7.2 Developer Pack and could build with licenses.licx again.

Resources