我有一个构建和压缩Web应用程序项目的Web部署项目。我在构建WDP时遇到很多错误,如下所示:构建Web部署项目时未找到文件
错误73文件'/Foo.csproj/Properties/Administration/Modules/ACL.ascx'不存在。 /Foo.csproj/Properties/Administration/ACL.aspx
错误74未知的服务器标记'foo:ACL'。 /Foo.csproj/Properties/Administration/ACL.aspx
这些错误来自Web部署项目,而不是WAP。 错误总是遵循相同的模式,首先有一个错误发现.ascx,然后一个关联的错误,说与前一个ascx相关的服务器标签是未知的(这显然是有道理的)。
ascx或aspx中没有错误或警告。
的控件使用<%@ Register %>
标签(而不是在web.config被注册)
什么引起这样的症状注册?
UPDATE
的错误是从与下面的命令来运行aspnet_compiler.exe
未来:
个C:\ WINDOWS \ Microsoft.NET \框架\ V2.0.50727 \ aspnet_compiler.exe -v“/Foo.csproj”-p“C:\ Projects \ Foo \ Foo”-u -f -d obj \ Staging \ TempBuildDir
,并产生下列错误
实用预编译ASP.NET应用程序
版权所有(C)微软公司。版权所有。 /Foo.csproj/Properties/Administration/ACL.aspx(5):error ASPPARSE:文件'/Foo.csproj/Properties/Administration/Modules/ACL.ascx'不存在。
/Foo.csproj/Properties/Administration/ACL.aspx(7):error ASPPARSE:未知服务器标记'foo:ACL'。
在Foo.csproj ACL.aspx被声明为
<Content Include="Administration\ACL.aspx" />
<!-- Snip -->
<Compile Include="Administration\ACL.aspx.cs">
<DependentUpon>ACL.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Administration\ACL.aspx.designer.cs">
<DependentUpon>ACL.aspx</DependentUpon>
</Compile>
和ACL.ascx作为
<Content Include="Administration\Modules\ACL.ascx" />
<!-- Snip -->
<Compile Include="Administration\Modules\ACL.ascx.cs">
<DependentUpon>ACL.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Administration\Modules\ACL.ascx.designer.cs">
<DependentUpon>ACL.ascx</DependentUpon>
</Compile>
我无法理解其中的路径的/Properties/
元件是来自在错误中的路径!它不在项目文件中,它不会被输入aspnet_compiler.exe
。
解决方案文件和项目文件与工作解决方案相同(除项目名称外)。
是的,在.. ./Properties/...确实看起来很奇怪,但我在任何项目文件中都看不到这样的路径。我会继续挖掘。欢呼的思想 – 2011-05-16 13:41:17