简体   繁体   English

Xamarin Studio / Visual Studio Broken - 项目中不存在目标“Build”。 (MSB4057)

[英]Xamarin Studio/Visual Studio Broken - The target “Build” does not exist in the project. (MSB4057)

I'm starting out with Xamarin Studio after working with Visual Studio (2012 last) for a good few years. 在与Visual Studio(2012年最后一次)合作几年之后,我开始使用Xamarin Studio。 However someone through importing projects, and starting new Android projects I've managed to break Xamarin Studio. 然而,有人通过导入项目,并启动新的Android项目,我已成功打破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. 我正在使用Xamarin Studio 4.2.2,并且可以确认我现在在Visual Studio 2012中遇到了同样的问题。虽然我可以使用MSBuild.exe手动构建项目,但除此之外两个IDE都已损坏。

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. 我实际上已经设法找到问题与.Net框架设置,不知何故通过玩Xamarin IDE中的构建设置我已经损坏它。 To diagnose this problem in Visual Studio 2012 I turned on MSBuild build settings to Diagnostic; 要在Visual Studio 2012中诊断此问题,我将MSBuild构建设置设置为Diagnostic;

Visual Studio选项

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. 然后确定了C:\\ Windows \\ Microsoft.NET \\ Framework \\ v4.0.30319 \\ Microsoft.Common.targets的问题 ,并使用DIFF工具将设置与具有工作构建过程的计算机隔离 - 复制缺少的条目。

缺少构建设置

This seems to be a bug within Xamarin Studio, when time allows, I'll have to reproduce this for a bug report. 这似乎是Xamarin Studio中的一个错误,当时间允许时,我将不得不重现这个错误报告。

Xamarin Studio doesn't open any MSBuild target files (even in readonly mode) as part of normal usage. 作为正常使用的一部分,Xamarin Studio不会打开任何MSBuild目标文件(即使在只读模式下)。 The only thing which opens these files is the build engine provided by Microsoft which both XS and VS use. 打开这些文件的唯一方法是Microsoft提供的构建引擎,XS和VS都使用它。

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. 可能发生的是VS / XS在Error Pad中双击构建错误时打开了目标文件,然后您不小心修改并将文件保存在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 ;) 另一种选择是故意编辑这些文件,这可能性更小;)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Visual Studio MacOS错误MSB4057:项目中不存在目标“Build” - Visual Studio MacOS error MSB4057: The target “Build” does not exist in the project MSB4057:项目中不存在目标“pipelinePreDeployCopyAllFilesToOneFolder” - MSB4057: The target "pipelinePreDeployCopyAllFilesToOneFolder" does not exist in the project MSBuild还原目标 - MSB4057:项目中不存在目标“还原” - MSBuild restore target - MSB4057: The target “restore” does not exist in the project 错误MSB4057:名为MVCWebUIComponent.csproj的项目文件中不存在目标“Package” - error MSB4057: The target “Package” does not exist in the project file named MVCWebUIComponent.csproj Visual Studio 2015中的Azure Web作业 - 部署不使用错误“target”MSDeployPublish“项目中不存在”。 - Azure Web Job in Visual Studio 2015 - deploy not working with error “target ”MSDeployPublish“ does not exist in the project.” Visual Studio生成错误:项目中不存在目标“ MainResourceGeneration” - Visual Studio Build Error: The target “MainResourceGeneration” does not exist in the project 项目中不存在目标“GetCopyToPublishDirectoryItems”。 - The target “GetCopyToPublishDirectoryItems” does not exist in the project. SwipeRefreshLayout在Visual Studio + Xamarin上不存在 - SwipeRefreshLayout does not exist on Visual Studio + Xamarin 使用 Visual Studio 构建时出现错误“MSB4006:在涉及目标“Build”的目标依赖关系图中存在循环依赖关系。” - Using Visual Studio build getting error “MSB4006: There is a circular dependency in the target dependency graph involving target ”Build“.” Xamarin传统Android项目在Visual Studio 2017上构建但出现错误 - Xamarin Traditional Android Project Build On Visual Studio 2017 But Have Error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM