有人可以帮我解决这个问题吗?我一直在使用 CodeSmith 5.2。不确定我是否用 Visual Studio 搞砸了一些东西。我只需右键单击并管理或生成输出,就会发生此错误
如果我尝试通过 CodeSmith Studio 分别打开 CodeSmithapplication 和调试,那么它会正确生成 .cs 和 generated.cs 文件。只有当它在应用程序中并且我右键单击生成输出时,才会发生此错误。为什么抱怨 Env_DTE?
这是我得到的错误
<?xml version="1.0" encoding="utf-16"?>
<CaseReport xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.codesmithtools.com/insight/v2">
<MessageSignature i:nil="true" />
<ProjectId>24</ProjectId>
<Description i:nil="true" />
<IsDescriptionHtml>false</IsDescriptionHtml>
<MessageDate>2016-02-02T16:47:53.7606242-06:00</MessageDate>
<MessageIdentifier>95e884f0-eb58-42e2-8bcc-e52d23909897</MessageIdentifier>
<Attachments />
<CaseType>CrashReport</CaseType>
<ClientVersion>1.0.0.10642</ClientVersion>
<CustomFields>
<CustomField>
<Key>Platform</Key>
<Value>Microsoft Windows NT 6.2.9200.0, (x64)</Value>
</CustomField>
<CustomField>
<Key>Version</Key>
<Value>1.0.0.10642</Value>
</CustomField>
<CustomField>
<Key>AssemblyFileVersion</Key>
<Value>5.2.1.10970</Value>
</CustomField>
</CustomFields>
<ExceptionDetail>
<Description>System.NotImplementedException: Not implemented (Exception from HRESULT: 0x80004001 (E_NOTIMPL))
at EnvDTE.Document.get_Kind()
at CodeSmith.VisualStudio.Package.Services.ProjectService.SaveAll()
at CodeSmith.VisualStudio.Package.Commands.GenerateOutputsCommand.Invoke(Object inArg, IntPtr outArg)</Description>
<ErrorCode i:nil="true" />
<ExceptionTypeName>System.NotImplementedException</ExceptionTypeName>
<ExceptionXml><?xml version="1.0" encoding="utf-16"?><object name="NotImplementedException" namespace="System" xmlns="http://schemas.codesmithtools.com/insight/objectdata" /></ExceptionXml>
<InnerException i:nil="true" />
<Message>Not implemented (Exception from HRESULT: 0x80004001 (E_NOTIMPL))</Message>
<MethodName>get_Kind</MethodName>
<ModuleName>EnvDTE</ModuleName>
<ModuleVersion>8.0.0.0</ModuleVersion>
<Source></Source>
<StackTrace> at EnvDTE.Document.get_Kind()
at CodeSmith.VisualStudio.Package.Services.ProjectService.SaveAll()
at CodeSmith.VisualStudio.Package.Commands.GenerateOutputsCommand.Invoke(Object inArg, IntPtr outArg)</StackTrace>
</ExceptionDetail>
<ReportHash>68c99a55f4cd2227874d69af3245f8d575cb31c1</ReportHash>
<Tags>
<string>Package</string>
<string>Package</string>
</Tags>
<Title>Not implemented (Exception from HRESULT: 0x80004001 (E_NOTIMPL))</Title>
</CaseReport>