发布ASP的配置。网的网站

时间:2021-03-09 04:02:34

Forgive my ignorance, though I am new to this. I've search a lot but can't seem to come to a definite conclusion, so any information is appreciated.

请原谅我的无知,尽管我是新手。我已经搜索了很多,但是似乎没有一个明确的结论,所以任何信息都是值得感激的。

So to the question: Is there a built-in configuration for web site publishing in MS Visual Studio called "Release"? The reason I'm asking is that some have told me it is, but I can only find the "Debug" configuration in Visual Studio.

那么问题来了:在MS Visual Studio中有一个内置的web站点发布配置叫做“Release”吗?我问这个问题的原因是有些人告诉我是这样的,但是我只能在Visual Studio中找到“Debug”配置。

So, if there's supposed to be a "Release" as well, how can I get it or can I manually add a new equivalent?

所以,如果有一个“发布”,我如何获得它,或者我可以手动添加一个新的对等物?

2 个解决方案

#1


1  

Go to the Solution Explorer (CTRL+W+S), then find your project. Right click on it and go to its properties. Find the Build tab. The top of the window will contain the active build configuration for your project. You can then change from debug (the default) to release.

到解决方案资源管理器(CTRL+W+S),然后找到您的项目。右键点击它,进入它的属性。找到构建选项卡。窗口的顶部将包含项目的活动构建配置。然后,您可以从debug(默认)更改为release。

By default, projects have two configurations: release and debug. You can make more, but first learn more about those two. The most important differences are explained in the question linked by Nacho in the comments. Good luck and happy codding.

默认情况下,项目有两种配置:释放和调试。你可以做得更多,但首先要了解更多。Nacho在评论中提出的问题解释了最重要的差异。祝你好运,好运。

edit: Web Site projects don't have the Release configuration available, but it makes no difference since they are not compiled. Web Application projects, on the other hand, do get compiled and have both configurations available.

编辑:Web站点项目没有可用的发布配置,但这没有区别,因为它们没有编译。另一方面,Web应用程序项目确实会被编译,并且两种配置都是可用的。

#2


1  

It's been a long time (~4,5 years), but I think I might have used a Web Deployment Project for a Web Site Project once, for changing config files (replacing by copying from another directory) (xml node: WebConfigReplacementFiles)

这已经有很长一段时间了(大约4年,5年),但是我想我可能曾经在Web站点项目中使用过一次Web部署项目,用于更改配置文件(从另一个目录中复制来替换)(xml节点:webconfigreementfiles)

I used Web Deployment Projects before web.config transforms where invented. (If you are interested in web.config transforms, check out my tutorial for VS 2010: http://www.tomot.de/en-us/article/5/asp.net/how-to-use-web.config-transforms-to-replace-appsettings-and-connectionstrings)

在使用Web部署项目之前,我使用Web部署项目。配置转换发明。如果你对网络感兴趣的话。配置转换,查看我的VS 2010教程:http://www.tomot.de/en-us/article/5/asp.net/how-to-use-web.config-transform -to-replace- appsettingandconnectionstrings)

Another useful link might be: http://msdn.microsoft.com/en-us/library/377y0s6t(v=vs.100).aspx

另一个有用的链接可能是:http://msdn.microsoft.com/en-us/library/377y0s6t(v=vs.100).aspx。

#1


1  

Go to the Solution Explorer (CTRL+W+S), then find your project. Right click on it and go to its properties. Find the Build tab. The top of the window will contain the active build configuration for your project. You can then change from debug (the default) to release.

到解决方案资源管理器(CTRL+W+S),然后找到您的项目。右键点击它,进入它的属性。找到构建选项卡。窗口的顶部将包含项目的活动构建配置。然后,您可以从debug(默认)更改为release。

By default, projects have two configurations: release and debug. You can make more, but first learn more about those two. The most important differences are explained in the question linked by Nacho in the comments. Good luck and happy codding.

默认情况下,项目有两种配置:释放和调试。你可以做得更多,但首先要了解更多。Nacho在评论中提出的问题解释了最重要的差异。祝你好运,好运。

edit: Web Site projects don't have the Release configuration available, but it makes no difference since they are not compiled. Web Application projects, on the other hand, do get compiled and have both configurations available.

编辑:Web站点项目没有可用的发布配置,但这没有区别,因为它们没有编译。另一方面,Web应用程序项目确实会被编译,并且两种配置都是可用的。

#2


1  

It's been a long time (~4,5 years), but I think I might have used a Web Deployment Project for a Web Site Project once, for changing config files (replacing by copying from another directory) (xml node: WebConfigReplacementFiles)

这已经有很长一段时间了(大约4年,5年),但是我想我可能曾经在Web站点项目中使用过一次Web部署项目,用于更改配置文件(从另一个目录中复制来替换)(xml节点:webconfigreementfiles)

I used Web Deployment Projects before web.config transforms where invented. (If you are interested in web.config transforms, check out my tutorial for VS 2010: http://www.tomot.de/en-us/article/5/asp.net/how-to-use-web.config-transforms-to-replace-appsettings-and-connectionstrings)

在使用Web部署项目之前,我使用Web部署项目。配置转换发明。如果你对网络感兴趣的话。配置转换,查看我的VS 2010教程:http://www.tomot.de/en-us/article/5/asp.net/how-to-use-web.config-transform -to-replace- appsettingandconnectionstrings)

Another useful link might be: http://msdn.microsoft.com/en-us/library/377y0s6t(v=vs.100).aspx

另一个有用的链接可能是:http://msdn.microsoft.com/en-us/library/377y0s6t(v=vs.100).aspx。