开发者

ASP.NET WebDeploy and Code Behind Files

I'm using MS WebDeploy out of Visual Studio 2010 to deploy a ASP.NET 2.0 web forms site. In my source project I have a master page (admin.master) with a code-behind (admin.master.cs).

Following a successful build and deploy on the target site I have:

\bin\myapp.dll
\admin\admin.master

But no admin.master.cs

However I'm not expecting this as I thought the code-behind would now be in the myapp.dll?

When I fire up the site I get t开发者_运维技巧he following error:

The file '/admin/admin.master.cs' does not exist.
Line 1:  <%@ Master Language="C#" AutoEventWireup="true" CodeFile="admin.master.cs" Inherits="admin" %>

Any ideas what is wrong here?

Many thanks, Sam


Is this a website or web application?

CodeFile="admin.master.cs" would indicate that it's a website, and in that case you would need to include the code behind files.

Seems odd that when you deploy it builds the dll's and removes the code behind files though.

To deploy a website, you can simply use "Copy Web Site".

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜