有人能帮我解决这个问题吗?我一直在使用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>发布于 2016-11-02 00:25:25
我为CodeSmith工作。我相信你使用的是5.x的旧版本,这个问题可能已经在5.3版本的Generator中修复了。我会免费升级到那个版本,并尝试一下。此外,我强烈建议升级到7.x,因为我们已经完全重写了大部分组件,修复了大量错误,并在向后兼容的同时添加了许多新功能。
https://stackoverflow.com/questions/35164776
复制相似问题