编译使用 SubSonic 库的 WinForms 项目时出错
代码生成正在工作,但当我尝试构建项目时出现以下错误:
错误 4 源文件“...项目路径...\Structs.cs”无法打开(“未指定错误”)PPSGenerator 错误 5 源文件“...项目路径...\Context.cs”无法打开(“未指定错误”)PPSGenerator 错误 6 无法打开源文件“...项目路径...\ActiveRecord.cs”(“未指定错误”)PPSGenerator 错误 7 源文件“...项目路径...\StoredProcedures.cs”无法打开(“未指定错误”) PPSGenerator
我在 Windows 7 64 位计算机上使用 VS2010。项目的目标是 Framework 3.5...有什么想法吗?
还注意到以下警告,但不确定这些警告是否同样重要:
警告 1 不再支持 C# 2.0 和 C# 3.5 编译器。模板将始终使用版本 4 编译器而不是指定的“v3.5”进行编译。 ...ProjectPath...\Structs.tt 1 4
警告 2 在模板中发现多个模板指令。除第一个之外的所有内容都将被忽略。应在一个模板指令中指定模板指令的多个参数。 ...ProjectPath...\Settings.ttinclude 1 4
警告 3 编译转换:已分配变量“parameters”,但从未使用其值 ...ProjectPath...\SQLServer.ttinclude 92 15
谢谢! 迈克·D
The code generation is working but I get the following errors when I try to build the project:
Error 4 Source file '...Project Path...\Structs.cs' could not be opened ('Unspecified error ') PPSGenerator
Error 5 Source file '...Project Path...\Context.cs' could not be opened ('Unspecified error ') PPSGenerator
Error 6 Source file '...Project Path...\ActiveRecord.cs' could not be opened ('Unspecified error ') PPSGenerator
Error 7 Source file '...Project Path...\StoredProcedures.cs' could not be opened ('Unspecified error ') PPSGenerator
I'm using VS2010 on a Windows 7 64 bit machine. Project is targeting Framework 3.5... any ideas?
Also noticed the following warnings, but not sure that these are as important:
Warning 1 The C# 2.0 and C# 3.5 compilers are no longer supported. Templates will always be compiled with the version 4 compiler instead of 'v3.5' as specified. ...ProjectPath...\Structs.tt 1 4
Warning 2 Multiple template directives were found in the template. All but the first one will be ignored. Multiple parameters to the template directive should be specified within one template directive. ...ProjectPath...\Settings.ttinclude 1 4
Warning 3 Compiling transformation: The variable 'parameters' is assigned but its value is never used ...ProjectPath...\SQLServer.ttinclude 92 15
Thanks!
Mike D
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
开始红脸回答我自己的问题
好吧,我最初将文件拖到我的项目根目录中,然后转到文件系统并删除这些文件,然后将文件拖到我的项目中的模型文件夹中。由于某种原因,该项目仍在寻找我的项目根目录中的文件。因为我在文件系统上删除了它们,所以我认为 Studio 没有收到备忘录并且仍在尝试编译它们。
很高兴我在 StackOverflow 上的第一篇文章彻底失败了。
END 红脸回答我自己的问题
BEGIN red faced answer to my own question
Ok, I originally dragged the files into my project root, then went out to the file system and deleted those files and dragged the files into my project in the Model folder. for some reason the project was still looking for the files that were in my project root. Because I deleted them on the file system I assume that Studio didn't get the memo and was still trying to compile them.
So happy that my first post on StackOverflow was a complete fustercluck.
END red faced answer to my own question