试图为ASP.NET网站创建适当的目录结构 [英] trying to create a proper directory structure for an ASP.NET website

查看:124
本文介绍了试图为ASP.NET网站创建适当的目录结构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您能为我指向要为新网站创建的适当目录结构的网址吗?

我可以创建一个网站项目,并将类库项目添加到该解决方案中,以创建功能齐全的网站.

我的灰色区域是我需要压缩网站解决方案并将其移交给客户端.

我想确保我提交的目录结构正确的解决方案.

我将为您介绍一个场景:

1.选择文件>新>网站>主菜单中的ASP.NET网站
2.保存路径为C:\ Projects \ TestWebSite \
3.在VS中右键单击解决方案,然后选择添加>新项目>类库
4.添加新类库,其自动路径为C:\ Projects \ TestWebSite(2)\ MyClassLib1 \

似乎应该有一种方法可以为此创建更好的结构,但是我只是没有遵循正确的过程.您能否指向我一个包含管理此操作的适当结构的说明的URL?

Can you point me to a url for the proper directory structure to create for a new website?

I can create a website project and add class library projects to the solution to create a fully functional website.

My grey area is that I need to zip up the web site solution and hand it over to the client.

I''d like to make sure that I hand over a solution with a proper directory structure.

I''ll run you through a scenario:

1. Select File > New > Web Site > ASP.NET Web Site from the main menu
2. Save with a path of C:\Projects\TestWebSite\
3. Right-click the solution in VS and select Add > New Project > Class Library
4. The new class library is added with an automatic path of C:\Projects\TestWebSite (2)\MyClassLib1\

It seems like there should be a way to create a better structure for this but I''m just not following the correct process. Can you point me to a url with instructions for managing a proper structure for this?

推荐答案

如果您将一个新的类库项目添加到网站项目中只是接受它的去向.

下一步将是:
5.右键单击您网站上的引用文件夹,单击添加引用".
6.添加项目引用,指定您刚刚创建的库
7.构建应用程序时,类库的DLL将被复制到您网站上的Bin目录.
您不会传送要部署的项目文件,应该创建应用程序的发布版本,然后将其发布(例如,发布到c:\ Code \ Publish \ Clientsite \),然后将结果压缩.有很多有关在interweb上创建发行版的信息.

如果他们需要代码,请分别将其压缩并发送为其他ZIP.

干杯.
If you''re added a new Class Library project to a web site project just accept where it''s going.

The next steps would be:
5. Right-click on the references folder in your web site, click "Add reference".
6. Add a project reference, specifying the library you just created
7. When you build the application, the DLL for the class library will be copied to the Bin directory on your web site.

You won''t be shipping the project files for deployment, you should be creating a release build of your app, publishing that (say, to c:\Code\Publish\Clientsite\) and then zipping up the result. There are lots of infos on creating release builds on the interweb.

If they need the code, zip it up separately and send it as a different ZIP.

Cheers.


这篇关于试图为ASP.NET网站创建适当的目录结构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆