我在OSX Mountain Lion 10.8.3上使用Xcode 4.6.1
今天早上我已将源代码从我的macbook air转移到我的iMac.
而现在,每次我尝试修改我的源代码时,XCode都会崩溃!
例如,如果我开始写这样的东西:[[anyclass
XCode将因此消息而崩溃:无法添加具有相同标识符的其他用户代码段,您只能覆盖系统代码段.
但是,如果我之前在文本编辑器中编写代码,然后如果我将其粘贴到XCode,它就可以工作!
我不明白......我已经清空了我的派生数据,清理了我的项目,清空了/ var/folders目录,重新启动了我的iMac ...
非常感谢您的帮助!
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Application Specific Information:
ProductBuildVersion: 4H512
ASSERTION FAILURE in /SourceCache/IDECodeSnippetLibrary/IDECodeSnippetLibrary-2055/Source/IDECodeSnippetRepository.m:320
Details: Cannot add another user snippet with the same identifier, you can only override system snippets.
Object: <IDECodeSnippetRepository: 0x4050a98c0>
Method: -addCodeSnippet:
Thread: <NSThread: 0x40030a220>{name = (null), num = 1}
Hints: None
Backtrace:
0 0x000000010b681a2a -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:messageFormat:arguments:] (in IDEKit)
1 0x000000010a9255f4 _DVTAssertionFailureHandler …Run Code Online (Sandbox Code Playgroud) 假设我有一个名为"car"的实体.
我使用复杂类型来定义"引擎"部分.
[TableName("T_CAR")]
public sealed class Car:IEngine
{
...
public EngineType EngineType{get;set;}
}
[ComplexType]
public sealed class Engine:IEngine
{
public Engin( )
{
this.EnginType = new EngineType( );
}
public EngineType EngineType{get;set;}
// other properties ...
}
[ComplexType]
public sealed class EngineType:IEngineType
{
...
}
Run Code Online (Sandbox Code Playgroud)
当我运行此代码时,我收到来自EF 6的错误消息:
System.InvalidOperationException:类型"Engine"已经配置为实体类型.它不能重新配置为复杂类型.
如果我删除EngineType的定义,它的工作原理......
有没有办法在另一个复杂类型中添加嵌套复杂类型?