开发者

Compiler problems with global.asax and web deployment project

开发者_JAVA百科

I'm having a nightmare with a Web Application project which I'm using a Web Deployment project to deploy.

For whatever reason, if I allow the Global.asax (and Global.asax.cs) file to be pre-compiled the events never fire.

So, I set the Build Action of the global files to Content - Copy always. The problem is when I try to build the deployment project I get an error message:

Could load type ".Global".

Can anyone give me any pointers, this problem has been killing us for weeks now - it seems so ridiculous!

Thanks Al


Is this a webforms app or an mvc app?

Have you tried to use the aspnet_compiler tool to see the detailed output? Maybe you can see something there, that is not presented on the output. Here is a link that might help you: http://www.asp.net/web-forms/tutorials/deployment/deploying-web-site-projects/precompiling-your-website-cs

Can you try to create a new separate project, and add the global.asax and global.asax.cs files to that new project, and try to publish it? If that works, maybe there is a problem with your project?

Last but not least, can you check if there are more than one class called Global, maybe the website is not validating that.

Please let us know if it works.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜