gpt4 book ai didi

asp.net-mvc-3 - 模板错误asp

转载 作者:行者123 更新时间:2023-12-04 03:47:43 25 4
gpt4 key购买 nike

我终于让我的 monodevelop 来创建一个 mvc3 razor 项目,但并非一切正常。当我尝试创建 View 时,它说找不到模板。另外,当我尝试创建项目时,它说:

System.IO.FileNotFoundException: Could not find file "/usr/lib/monodevelop/AddIns/MonoDevelop.AspNet.Mvc/Templates/Common/Index.cshtml".
File name: '/usr/lib/monodevelop/AddIns/MonoDevelop.AspNet.Mvc/Templates/Common/Index.cshtml'
at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x0032f] in /build/mono/src/mono-3.2.3/mcs/class/corlib/System.IO/FileStream.cs:320
at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in /build/mono/src/mono-3.2.3/mcs/class/corlib/System.IO/FileStream.cs:132
at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
at System.IO.File.OpenRead (System.String path) [0x00000] in /build/mono/src/mono-3.2.3/mcs/class/corlib/System.IO/File.cs:341
at System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize) [0x00077] in /build/mono/src/mono-3.2.3/mcs/class/corlib/System.IO/StreamReader.cs:189
at System.IO.StreamReader..ctor (System.String path) [0x00000] in /build/mono/src/mono-3.2.3/mcs/class/corlib/System.IO/StreamReader.cs:165
at (wrapper remoting-invoke-with-check) System.IO.StreamReader:.ctor (string)
at System.IO.File.ReadAllText (System.String path) [0x00000] in /build/mono/src/mono-3.2.3/mcs/class/corlib/System.IO/File.cs:537
at MonoDevelop.Ide.Templates.TextFileDescriptionTemplate.CreateContent (System.String language) [0x00027] in /build/monodevelop/src/monodevelop-4.0.13/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/TextFileDescriptionTemplate.cs:77
at MonoDevelop.Ide.Templates.SingleFileDescriptionTemplate.CreateContent (MonoDevelop.Projects.Project project, System.Collections.Generic.Dictionary`2 tags, System.String language) [0x00003] in /build/monodevelop/src/monodevelop-4.0.13/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/SingleFileDescriptionTemplate.cs:311
at MonoDevelop.Ide.Templates.SingleFileDescriptionTemplate.CreateFileContent (MonoDevelop.Projects.SolutionItem policyParent, MonoDevelop.Projects.Project project, System.String language, System.String fileName, System.String identifier) [0x0001a] in /build/monodevelop/src/monodevelop-4.0.13/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/SingleFileDescriptionTemplate.cs:264
at MonoDevelop.Ide.Templates.SingleFileDescriptionTemplate.SaveFile (MonoDevelop.Projects.SolutionItem policyParent, MonoDevelop.Projects.Project project, System.String language, System.String baseDirectory, System.String entryName) [0x0006b] in /build/monodevelop/src/monodevelop-4.0.13/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/SingleFileDescriptionTemplate.cs:204
at MonoDevelop.Ide.Templates.SingleFileDescriptionTemplate.AddFileToProject (MonoDevelop.Projects.SolutionItem policyParent, MonoDevelop.Projects.Project project, System.String language, System.String directory, System.String name) [0x0000a] in /build/monodevelop/src/monodevelop-4.0.13/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/SingleFileDescriptionTemplate.cs:113
at MonoDevelop.Ide.Templates.SingleFileDescriptionTemplate.AddToProject (MonoDevelop.Projects.SolutionItem policyParent, MonoDevelop.Projects.Project project, System.String language, System.String directory, System.String name) [0x00009] in /build/monodevelop/src/monodevelop-4.0.13/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/SingleFileDescriptionTemplate.cs:108
at MonoDevelop.Ide.Templates.DirectoryTemplate.AddToProject (MonoDevelop.Projects.SolutionItem policyParent, MonoDevelop.Projects.Project project, System.String language, System.String directory, System.String name) [0x00068] in /build/monodevelop/src/monodevelop-4.0.13/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/DirectoryTemplate.cs:102
at MonoDevelop.Ide.Templates.DirectoryTemplate.AddToProject (MonoDevelop.Projects.SolutionItem policyParent, MonoDevelop.Projects.Project project, System.String language, System.String directory, System.String name) [0x00068] in /build/monodevelop/src/monodevelop-4.0.13/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/DirectoryTemplate.cs:102
at MonoDevelop.Ide.Templates.ProjectDescriptor.InitializeItem (MonoDevelop.Projects.SolutionItem policyParent, MonoDevelop.Projects.ProjectCreateInformation projectCreateInformation, System.String defaultLanguage, MonoDevelop.Projects.SolutionEntityItem item) [0x00224] in /build/monodevelop/src/monodevelop-4.0.13/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ProjectDescriptor.cs:162

我必须创建 View ,因为它在开始时没有创建。

我试图为 razorview 引擎找到模板,但我找不到它们。

最佳答案

我自己就遇到了这个问题。我正在使用arch linux。

收到错误后,我卸载了 monodevelop,但没有卸载依赖项。然后我去了:

    https://github.com/mono/monodevelop

并按照那里的说明进行操作。我用了
    git clone https://github.com/mono/monodevelop.git
cd monodevelop
git submodule update --init --recursive
./configure --profile=stable ; make ; sudo make install

然后我进入 monodevelop 并使用 razor 创建了一个 MVC 3 项目,它立即打开。完全没有问题。

关于asp.net-mvc-3 - 模板错误asp,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21698881/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com