尝试在构建服务器上构建我的项目给出了以下错误:
Microsoft (R) Build Engine Version 4.0.30319.1
error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\TeamData\Microsoft.Data.Schema.SqlTasks.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the …Run Code Online (Sandbox Code Playgroud) 我已经使用了rake(一个Ruby make程序),它有一个选项来获取所有可用目标的列表,例如
> rake --tasks
rake db:charset # retrieve the charset for your data...
rake db:collation # retrieve the collation for your da...
rake db:create # Creates the databases defined in y...
rake db:drop # Drops the database for your curren...
...
Run Code Online (Sandbox Code Playgroud)
但似乎没有选择在GNU make中执行此操作.
显然,代码几乎就在那里,截至2007年 - http://www.mail-archive.com/help-make@gnu.org/msg06434.html.
无论如何,我几乎没有从makefile中提取目标,你可以将其包含在makefile中.
list:
@grep '^[^#[:space:]].*:' Makefile
Run Code Online (Sandbox Code Playgroud)
它将为您提供已定义目标的列表.这只是一个开始 - 例如,它不会过滤掉依赖项.
> make list
list:
copy:
run:
plot:
turnin:
Run Code Online (Sandbox Code Playgroud) 自升级到xcode 4以来,我无法找到指定资源所属目标的位置.以前,我选择了文件并点击命令+ i,但现在这似乎运行程序,而不是打开该文件的信息框.

我想删除这个红色标记的目标,但我无法删除.
对话框中的"减号"按钮仍然是灰色的,它不响应退格键或删除键,右键单击只会显示帮助选项.我可以将缺少红色标记的目标拖到工作黑色目标的上方或下方,但它不允许我删除它.
这个缺少的红色目标似乎只出现在这个编辑方案对话中.
在我的主项目/目标窗口中,我只有一个好的目标.
任何想法如何清理并删除这个缺少的目标?
我创建了一个项目,我完全开发了它.
我需要更改项目和目标的名称.有没有一种简单的方法可以做到这一点,还是我应该创建一个新项目并复制那里的所有项目?
谢谢
我为我的应用程序设置了两个目标(精简版和专业版),我想在每个代码中集成一些细微差别(例如专业版不会显示任何iAd横幅).
我一直在四处寻找,我发现最简单的方法是使用预处理器宏.我面临的问题是如何在Xcode 4中设置它们.我想在一个目标中设置一个名为"PRO_VERSION"的宏,在另一个目标中设置一个"LITE_VERSION".
以下是我打算如何使用它们的示例:
#ifdef PRO_VERSION
// Hide ad banners
#else
// Show ad banners
#endif
Run Code Online (Sandbox Code Playgroud) 我有一个包含多个应用目标的项目(大约25个).
我将为这些应用程序制作今日扩展,但我不想使用相同的代码和配置创建大约25个扩展.
是否可以只创建一个我分配给25个应用程序的今日扩展?
有没有机会使用iOS 6 SDK开发针对iOS 3.1.3的应用程序?如果我使用旧的部署目标打开我的项目,编译器会警告我:
iOS deployment targets lower than 4.3 are not supported
Run Code Online (Sandbox Code Playgroud)
这可能是由于仅明显的事实armv7和armv7s二进制文件可以建成.如果我armv6手动添加(直到iPhone 3G的设备),还有几个警告:
warning: no rule to process file '$(PROJECT_DIR)/main.m' of type sourcecode.c.objc for architecture armv6
...
...
warning: architecture armv6 is not supported (current ARCHS = "armv6 armv7 armv7s").
Run Code Online (Sandbox Code Playgroud)
那么我该如何处理呢?在使用iOS 6 SDK进行开发时,有没有办法支持iOS 3.1.3?如果没有,我最终将不得不转移到iOS 4.3的最低目标.甚至可以提交仅支持版本> = 4.3的新版本吗?我的用户在早期版本上会发生什么?他们是否根本没有被告知不兼容的更新,因此将继续使用我的应用程序的旧版本?如果没有,这可以实现吗?
我必须在这里遗漏一些明显的东西,但......
UIControl有一个方法
- (void)addTarget:(id)target action:(SEL)action forControlEvents: (UIControlEvents)controlEvents
Run Code Online (Sandbox Code Playgroud)
它允许您添加要在任何给定的controlEvent发生时调用的操作.ControlEvents是一个事件的位掩码,它告诉你触摸是否下降,内部,或被拖动等等,其中大约有16个,你或他们在一起,当它们中的任何一个发生时被调用.
选择器可以具有以下签名之一
- (void)action
- (void)action:(id)sender
- (void)action:(id)sender forEvent:(UIEvent *)
Run Code Online (Sandbox Code Playgroud)
这些都没有告诉你控制事件位掩码是什么.UIEvent略有不同,它与实际的触摸事件有关,而且(我认为)不包含UIControlEvent.发送方(UIControl)也无法找到控制事件.
我想有一个处理大量控制事件的方法,因为我有一些共同的代码,无论发生了哪些事件或事件,但我仍然需要知道UIControlEvents用于某些特定处理.
我错过了一种方法来找出在调用操作时使用了什么UIControlEvents,或者我是否真的必须将我的代码分成
-(void)actionWithUIControlEventX;
-(void)actionWithUIControlEventY;
Run Code Online (Sandbox Code Playgroud) 我有以下msbuild脚本:
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
DefaultTargets="All">
<PropertyGroup>
...
</PropertyGroup>
<UsingTask AssemblyFile="$(GallioTaskPath)" TaskName="Gallio.MSBuildTasks.Gallio" />
<Import Project="$(MSBuildCommunityTasksPath)\MSBuild.Community.Tasks.Targets" />
<ItemGroup>
...
</ItemGroup>
<Target Name="CheckServerHostsItemGroup"
Condition="'$(NoServerHosts)' != True">
...
</Target>
<Target Name="RunServerHosts" DependsOnTargets="CheckServerHostsItemGroup"
Condition="'$(NoServerHosts)' != True">
...
</Target>
<Target Name="KillServerHosts" DependsOnTargets="CheckServerHostsItemGroup"
Condition="'$(NoServerHosts)' != True">
...
</Target>
<Target Name="KillServerHosts2"
Condition="'$(NoServerHosts)' != True">
<MSBuild Projects="$(MSBuildProjectFile)" Targets="KillServerHosts" Properties="Configuration=$(Configuration)" />
</Target>
<Target Name="All" DependsOnTargets="Build;RunServerHosts;Test;KillServerHosts2">
<OnError ExecuteTargets="KillServerHosts2" />
</Target>
<Target Name="Test">
...
<Error Text="Tests execution failed with exit code $(ExitCode)" Condition="'$(ExitCode)' != 0" />
</Target>
<Target Name="CheckSolutionsItemGroup">
... …Run Code Online (Sandbox Code Playgroud)