简体   繁体   English

如何确定VB.NET ASP项目的项目类型?

[英]How can I determine the project type of a VB.NET ASP project?

I am having a heck of a time getting a legacy web site to build . 我很想建立一个旧的网站。

I get a "Object reference not set to an instance of an object." 我得到“对象引用未设置为对象的实例”。 but with no indication of where that is (not) being done. 但没有表明在何处进行(未完成)。

I could work through the literally thousands of issues found by Resharper: 我可以解决Resharper发现的数千个问题:

在此处输入图片说明

...in the hopes that fixing one or some combination of them would finally clear that error, but I figure a more sensible approach is to create a new project, and gradually add in the custom folders and classes, etc. The question is, though, which type of project to create: ASP.NET Empty Web Site, ASP.NET Web Forms Site, or what? ...希望修复它们中的一个或几个最终可以清除该错误,但是我认为更明智的方法是创建一个新项目,并逐步添加自定义文件夹和类等。问题是,但是,要创建哪种类型的项目:ASP.NET空网站,ASP.NET Web窗体网站,还是什么?

How can I tell which type of project the non-working legacy one is, so that I can emulate that? 我该如何判断不可用的旧项目是哪种类型的项目,以便我可以模拟呢? Is the information hidden in some configuration file? 信息是否隐藏在某些配置文件中? Can I tell based on which type of files are contained in the legacy project? 我可以根据遗留项目中包含的文件类型进行区分吗?

It has the following folders: 它具有以下文件夹:

App_Browsers 
App_Code
App_Data
A ton of custom folders (one for each customer), each of which has "Default.aspx" and "Default.aspx.vb" files within it.

Then there are gobs of *.aspx files, vwd.webinfo, web.config, and website.publishproj 然后是* .aspx文件,vwd.webinfo,web.config和website.publishproj的文件

EDIT 编辑

This is not a duplicate of that question, or at least the accepted answer doesn't seem to apply, because there don't seem to be any .xml files in this project. 这不是该问题的重复项,或者至少似乎不适用已接受的答案,因为此项目中似乎没有任何.xml文件。

UPDATE 更新

I am gradually adding in folders and files from the legacy project into a new project, and seeing at each step if anything has broken. 我逐渐将旧项目中的文件夹和文件添加到新项目中,并在每个步骤中查看是否有任何损坏。 Here is the odd thing: It Rebuilds fine (1 succeeded, 0 failed, 0 skipped); 这很奇怪:它可以正常重建(1个成功,0个失败,0个被跳过); but a Build results in 0 succeeded, 0 failed, 1 updated, 0 skipped... Why does a Rebuild succeed, whereas a Build neither succeeds or fails - just updates? 但是构建导致0成功,0失败,1更新,0跳过...为什么重建成功,而Build既不成功也不失败-只是更新?

There isn't a rock solid, guaranteed way but I've used this list in the past to help. 没有坚如磐石的保证方法,但是我过去曾使用此列表来提供帮助。 In your project file (not the solution file) you look at the <ProjectTypeGuids> node. 在项目文件(而非解决方案文件)中,查看<ProjectTypeGuids>节点。 The guids listed in the value of that node are what the project is using. 该节点的值中列出的引导是项目正在使用的引导。 I've been able to bring legacy projects (more) up to speed by trimming some things out of that. 通过减少一些遗留问题,我能够加快遗留项目的速度。

https://www.codeproject.com/reference/720512/list-of-visual-studio-project-type-guids https://www.codeproject.com/reference/720512/list-of-visual-studio-project-type-guids

Note that this doesn't necessarily mean that your code will compile or run if you port it directly to a new project created with different project types. 请注意,这并不意味着您将代码直接移植到使用不同项目类型创建的新项目中即可编译或运行。 Frameworks and API's change, obviously. 框架和API的变化很明显。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在ASP.NET网站项目中使用最新的VB.NET语言级别? - How can I use the latest VB.NET language level in an ASP.NET web site project? 如何在 Visual Studio 2019 中添加 Adobe Pdf 查看器(Asp.net Vb.net 项目)? - How can I add Adobe Pdf viewer in Visual Studio 2019( Asp.net Vb.net Project)? VB.NET Web App项目如何编译VB.NET Windows App项目中的.vb文件? - how can VB.NET Web App project compile .vb files that are in a VB.NET Windows App project? 如何将vb.net项目与vb.net网站结合 - how to combine vb.net project with vb.net website .NET编程-我可以从我的VB.NET项目访问C-Sharp项目的成员吗? - .NET Programming - Can I access members of a C-Sharp project from my VB.NET Project? 如何将项目从具有VB .NET的ASP .NET WebForms缓慢迁移到MVC C#? - How can I slowly migrate a project from ASP .NET WebForms with VB .NET to MVC C#? 如何在ASP.NET VB项目中获取控件的Handle? - How can I obtain a control's Handle in a ASP.NET VB project? 如何在vb.net/asp项目的“解决方案项”下的类中调用函数 - How to call a function in a class under “Solution items” in vb.net / asp project 确定文件vb.net的真实类型 - Determine the real type of file vb.net 如何使用VB.net在ASP.NET(.NET 2.0)中创建分层数据网格 - How can I create a hierarchical datagrid in asp.net (.net 2.0) using VB.net
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM