I'm starting out with Xamarin Studio after working with Visual Studio (2012 last) for a good few years. However someone through importing projects, and starting new Android projects I've managed to break Xamarin Studio. Now when starting a new project I get the following error;
The target "Build" does not exist in the project. (MSB4057)
The steps;
I've tried to repair my installation, but this made no difference. I've tried doing a reinstall but this made no difference. Other than a complete uninstall and reinstall what options do I have?
I'm using Xamarin Studio 4.2.2, and can confirm I now have the same problem in Visual Studio 2012. Although I can manually build projects using MSBuild.exe, but other than that both IDEs are broken.
I've actually managed to track down the problem to a problem with .Net framework setup, somehow by playing around with the build settings within the Xamarin IDE I've corrupted it. To diagnose this problem in Visual Studio 2012 I turned on MSBuild build settings to Diagnostic;
Then identified a problem with C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets, and using a DIFF tool isolating the settings against a machine which had a working build process - copying the missing entry.
This seems to be a bug within Xamarin Studio, when time allows, I'll have to reproduce this for a bug report.
Xamarin Studio doesn't open any MSBuild target files (even in readonly mode) as part of normal usage. The only thing which opens these files is the build engine provided by Microsoft which both XS and VS use.
What may have happened is that VS/XS opened the targets file when a build error was double clicked in the Error Pad and then you accidentally modified and saved the file inside the IDE. That does seem very unlikely though, but it's the only thing I can think of.
The other alternative is a deliberate edit of those files, which is probably even less likely ;)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With