TFS 2013中不允许使用循环文件引用Dnn 7+

时间:2015-06-04 17:47:54

标签: asp.net visual-studio-2013 dotnetnuke tfs2013

我正在使用DNN 7.3作为VB和C#代码组合的网站项目。我使用visual studio 2013来构建项目。 如果属性页中的MSBuid选项配置为允许此预编译站点可更新并且项目已发布。 enter image description here将成功建成。但是当它签入TFS时,将抛出以下异常:

 /compiled/DesktopModules/Admin/Security/manageusers.ascx (8): Circular file references are not allowed.
 /compiled/DesktopModules/Admin/Security/manageusers.ascx (67): Unknown server tag 'dnn:profile'.
 /compiled/DesktopModules/Admin/Security/EditUser.ascx (5): Circular file references are not allowed.
 /compiled/DesktopModules/Admin/Security/EditUser.ascx (163): Unknown server tag 'dnn:Profile'.
 /compiled/admin/Users/ViewProfile.ascx (4): Unknown server tag 'dnn:Profile'.

此外,当我选中“使用固定命名和单页程序集”以及“允许此预编译站点”可更新时。它会抛出:

ASPNETCOMPILER: Object reference not set to an instance of an object.

当我在网上搜索时,我从this blog获得了两个选项。

我试过这两个但仍然有同样的错误。 我不知道我做错了什么。

2 个答案:

答案 0 :(得分:0)

请查看[此处](http://ellisweb.net/2009/12/fixing-the-circular-file-references-are-not-allowed-error-in-asp-net/),了解您为什么会看到此错误的解释,简单来说,如果您有以下设置:

/folder1/Control1.ascx > References Control2
/folder2/Control2.ascx > References Control3
/folder1/Control3.ascx

这意味着folder1 dll将引用folder2 dll,它将再次引用folder1 dll,从而导致“循环文件引用”。

解决方案是尝试重新排列每个文件夹下的所有控件,有时,您必须将用户控件的问题复制到多个文件夹以防止此类循环调用。

答案 1 :(得分:0)

我将TFS Build Process Parameters的Clean Clean WorkSpace属性更改为false。 错误消失了,我能够成功构建到TFS Drop文件夹中。我不知道为什么这可以解决问题,但问题已经解决了。