BC30560:'default_aspx'不明确的命名空间“ASP” [英] BC30560: 'default_aspx' is ambiguous in the namespace 'ASP'

查看:242
本文介绍了BC30560:'default_aspx'不明确的命名空间“ASP”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我编译我最新的asp.net程序,并试图在测试服务器上运行,我收到此错误

When I compiled my latest asp.net program and trying to run on the test server, I am getting this error

Line 46:             Dim dependencies() As String
Line 47:             CType(Me,Global.System.Web.UI.Page).AppRelativeVirtualPath = "~/default.aspx"
Line 48:             If (Global.ASP.default_aspx.__initialized = false) Then
Line 49:                 dependencies = New String(0) {}
Line 50:                 dependencies(0) = "~/default.aspx"


Source File: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\ocbuild\c0c442ff\f0292c99\App_Web_default.aspx.cdcab7d2.4ubu1wgu.0.vb    Line: 48

详细错误,当我展开编译器输出...

Detailed errors when I expand the compiler output...

Microsoft (R) Visual Basic Compiler version 8.0.50727.3053
for Microsoft (R) .NET Framework version 2.0.50727.3053
Copyright (c) Microsoft Corporation.  All rights reserved.

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\ocbuild\c0c442ff\f0292c99\App_Web_default.aspx.cdcab7d2.4ubu1wgu.0.vb(48) : error BC30560: 'default_aspx' is ambiguous in the namespace 'ASP'.

            If (Global.ASP.default_aspx.__initialized = false) Then
                ~~~~~~~~~~~~~~~~~~~~~~~                            
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\ocbuild\c0c442ff\f0292c99\App_Web_default.aspx.cdcab7d2.4ubu1wgu.0.vb(51) : error BC30560: 'default_aspx' is ambiguous in the namespace 'ASP'.

                Global.ASP.default_aspx.__fileDependencies = Me.GetWrappedFileDependencies(dependencies)
                ~~~~~~~~~~~~~~~~~~~~~~~                                                                 
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\ocbuild\c0c442ff\f0292c99\App_Web_default.aspx.cdcab7d2.4ubu1wgu.0.vb(52) : error BC30560: 'default_aspx' is ambiguous in the namespace 'ASP'.

                Global.ASP.default_aspx.__initialized = true
                ~~~~~~~~~~~~~~~~~~~~~~~                     
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\ocbuild\c0c442ff\f0292c99\App_Web_default.aspx.cdcab7d2.4ubu1wgu.0.vb(76) : error BC30560: 'default_aspx' is ambiguous in the namespace 'ASP'.

        Private Sub __BuildControlTree(ByVal __ctrl As default_aspx)
                                                       ~~~~~~~~~~~~ 
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\ocbuild\c0c442ff\f0292c99\App_Web_default.aspx.cdcab7d2.4ubu1wgu.0.vb(100) : error BC30560: 'default_aspx' is ambiguous in the namespace 'ASP'.

            Me.AddWrappedFileDependencies(Global.ASP.default_aspx.__fileDependencies)
                                          ~~~~~~~~~~~~~~~~~~~~~~~                    
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\ocbuild\c0c442ff\f0292c99\App_Web_default.aspx.cdcab7d2.4ubu1wgu.1.vb(31) : error BC30560: 'default_aspx' is ambiguous in the namespace 'ASP'.

            Return New ASP.default_aspx
                       ~~~~~~~~~~~~~~~~

我查了一些东西,他们都被证明是好的:

I checked a few things and all of them turned out to be okay:

[*]默认是没有定义的两倍
    随时随地

[*] Default is not defined twice anywhere

[*]一切工作
    在最后发布1星期返回

[*] Everything was working on the last release 1 week back

[*]有没有旧的文件,这些文件
    仍然编译住
    文件。此外,我清除了临时
    文件多次。

[*] There are no old files that are still staying with the compiled files. Also I cleared the temporary files many times.

[*]我曾尝试
    与其他的aspx文件和所有的
    他们是给予明确的错误
    (错误在不同的源文件...)

[*] I have tried with other aspx files and all of them is giving ambiguous error (error in different source files...)

[*]原始的源工程只是
    精细!只有错误显示出来的
    编译code。

[*] The original source works just fine! only the error shows up on the compiled code.

如何解决这种模棱两可任何意见或任何线索。

Any ideas or any clues on how to resolve this ambiguity.

谢谢
SK

推荐答案

好这里是我在这个问题上花费三天找到。

Okay here is what I found after spending three days on this problem.

最后,我想如果我删除了所有来自除一个解决方案中的项目(这是造成问题)我可以分离出它default.skin。这个问题似乎是非常不稳定的,因为它开始消失,如果我删除此文件中的某些行。然而,这并不一致,问题就来了,并随机去了。

Finally I figured that if I removed all the projects from the solution except one (that was causing problem) I could isolated it to default.skin. The problem seemed to be very erratic because it started going away if I deleted certain lines from this file. However, this was not consistent and the problem came and went at random.

因此​​失去它在code固定的一切希望后,我决定尝试另一种方式。我改变aspnet_compiler命令的选项从 - preFIX交换机(每个文件夹中创建一个dll)到O(编译所有UI放在一个DLL),问题就走了!

So after losing all hopes of fixing it in the code, I decided to try it another way. I changed the option of aspnet_compiler command from -prefix switch (a dll is created for each folder) to -o (all compiled ui is put in one dll), the problem went away!!!

看来这个问题是由于在aspnet_compiler一些bug。它得到了在这个版本中引发不知何故,我无法弄清楚。

It seems that the problem is due to some bug in the aspnet_compiler. It got triggered in this version somehow that I could not figure out.

我想转向更稳定的asp.net 3.5SP1(或者等待asp.net 4.0)有什么建议吗?

I am thinking of moving to more stable asp.net 3.5SP1 (or maybe wait for asp.net 4.0) any suggestions?

这篇关于BC30560:'default_aspx'不明确的命名空间“ASP”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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