如何在 Visual Studio 中打开解决方案
我有一个由某人创建的网站;现在我正在尝试打开它。
我的疑问是该项目是否包含解决方案?在 Visual Studio 中,我尝试通过打开网站选项打开,但没有找到解决方案。
这是正确的方法吗?如何最好地使用 Visual Studio 打开网站?
I have a website which was created by someone; now I am trying to open it.
My doubt is will that project contain a solution? Within Visual Studio, I am trying to open through the open website option, but I didn't find a solution.
Is that right way? How best can I open a website with Visual Studio?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
存在两种不同类型的项目:Web 应用程序和网站。如果项目目录不包含项目文件(*.csproj 或 *.vbproj),则它可能是一个网站。您可以在打开 .aspx 文件时进行检查。在 @Page 标签中,您将看到属性代码文件,而 Web 应用程序使用属性代码隐藏。
您通过开放网站打开的网站。目录中的任何文件都属于该项目,除非其文件扩展名为 *.excluded。
希望这有帮助。
There exist two different types of projects: web application and web sites. If the directory with the project does not contain a project file (*.csproj or *.vbproj) it is probably a web site. You can check this when you open an .aspx file. In the @Page tag you will see the attribute codefile whereas web application use the attribute codebehind.
Web Sites you open with open web site. Any file in the directory belongs to the project unless it has the file extension *.excluded.
Hope this helps.
如果您只想直接编辑网站的文件,那么这将起作用。如果您正在寻找用于创建网站的 ASP.Net 或 MVC 解决方案,那么这将不起作用。
That will work if all you want to do edit the site's files directly. If you're looking for the ASP.Net or MVC solution that was used to create the site though, then this won't work.
除非您可以明确访问源代码,否则无法将网站作为解决方案打开。当 ASP.NET 站点发布时,实际的解决方案不再向公众提供,您获得的只是 HTML 表示形式(客户端)而不是源代码(服务器端)。
You cannot open a website as a solution unless you have explicit access to the source code. When a ASP.NET site is published, the actual solution is no longer available to the public and all you get is the HTML representation (client-side) rather than the source (server-side).
如果您正在制作 Web/Windows 项目,您将不会获得解决方案文件。它将仅在网站中提供。而且,如果您发布该网站,您将不会获得解决方案文件。因此,请确保它是一个网站并且未发布。
If you are making a web/windows project you will not get solution file. It will be available only in websites. And also if you publish that website you will not get solution file. So be sure that Its a website and not published.