我在本地设置了一个dnn 7网站,通过dnndev.me进行开发。但是我没有在标准根文件夹c:\ websites \ dnndev.me \中安装dnndev.me,它位于我的用户文档中的另一个位置。但是dnn安装工作正常。所以我添加了 dotnetnuke项目模板并按照此页面上的说明创建了一个新项目: http://www.chrishammond.com/blog/itemid/2616/using-the-new-module-development-templates-for-dot.aspx
当我在调试中构建模块然后发布它说构建成功并且没有错误,但是没有安装文件夹和安装文件。
有人知道如何解决这个问题?
提前致谢。
我既有C#又有VB tempates以及Da2l和非Dal2模板。每个模板都有同样的问题。
此外,
我尝试将MsBuildCommunity更新为当前版本,但也没有解决问题。
我尝试从项目管理器命令行重新安装ghte msbuild - 我收到错误并没有解决问题。
所以我使用的是2.5版的模板。看来部分构建工作正常,因为在 dnndev.me \ bin 文件夹中生成并复制/创建了文件, desktopmodlue \ MODULENAME \ obj \ debug 文件夹中。
我尝试从visual studio命令提示符运行构建,这是从新创建的和未更改的vb模板输出的命令提示符,其中包含Dal2:
C:\websites\dnndev.me\DesktopModules\DNNModule1>msbuild DNNModule1.vbproj
Microsoft (R) Build Engine version 4.0.30319.33440
[Microsoft .NET Framework, version 4.0.30319.34003]
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 11/29/2013 11:34:58 PM.
Project "C:\websites\dnndev.me\DesktopModules\DNNModule1\DNNModule1.vbproj" on
node 1 (default targets).
GenerateTargetFrameworkMonikerAttribute:
Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output fi
les are up-to-date with respect to the input files.
CoreCompile:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Vbc.exe /noconfig /imports:Micr
osoft.VisualBasic,System,System.Collections,System.Collections.Generic,System
.Data,System.Linq,System.Diagnostics,System.Collections.Specialized,System.Co
nfiguration,System.Text,System.Text.RegularExpressions,System.Web,System.Web.
Caching,System.Web.SessionState,System.Web.Security,System.Web.Profile,System
.Web.UI,System.Web.UI.WebControls,System.Web.UI.WebControls.WebParts,System.W
eb.UI.HtmlControls /optioncompare:Binary /optionexplicit+ /optionstrict:custo
m /nowarn:42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 /option
infer+ /nostdlib /rootnamespace:Christoc.Modules.DNNModule1 /sdkpath:"C:\Prog
ram Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0"
/highentropyva- /doc:obj\Debug\DNNModule1.xml /define:"CONFIG=\"Debug\",DEBUG
=-1,TRACE=-1,_MyType=\"Custom\",PLATFORM=\"AnyCPU\"" /reference:C:\websites\d
nndev.me\bin\DotNetNuke.dll,C:\websites\dnndev.me\bin\DotNetNuke.WebUtility.d
ll,"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFrame
work\v4.0\System.Configuration.dll","C:\Program Files (x86)\Reference Assembl
ies\Microsoft\Framework\.NETFramework\v4.0\System.Core.dll","C:\Program Files
(x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Dat
a.DataSetExtensions.dll","C:\Program Files (x86)\Reference Assemblies\Microso
ft\Framework\.NETFramework\v4.0\System.Data.dll","C:\Program Files (x86)\Refe
rence Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.dll","C:\Progr
am Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Sy
stem.Drawing.dll","C:\Program Files (x86)\Reference Assemblies\Microsoft\Fram
ework\.NETFramework\v4.0\System.EnterpriseServices.dll","C:\Program Files (x8
6)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Web.dll
","C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramew
ork\v4.0\System.Web.Extensions.dll","C:\Program Files (x86)\Reference Assembl
ies\Microsoft\Framework\.NETFramework\v4.0\System.Web.Mobile.dll","C:\Program
Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Syst
em.Web.Services.dll","C:\Program Files (x86)\Reference Assemblies\Microsoft\F
ramework\.NETFramework\v4.0\System.Xml.dll" /debug+ /debug:full /out:obj\Debu
g\DNNModule1.dll /target:library Components\FeatureController.vb Components\I
temController.vb Components\Item.vb Settings.ascx.designer.vb Settings.ascx.v
b DNNModule1SettingsBase.vb Edit.ascx.designer.vb Edit.ascx.vb "My Project\As
semblyInfo.vb" DNNModule1ModuleBase.vb View.ascx.designer.vb View.ascx.vb "C:
\Users\Jordan\AppData\Local\Temp\.NETFramework,Version=v4.0.AssemblyAttribute
s.vb"
vbc : warning BC40010: Possible problem detected while building assembly 'DNNMo
dule1': The version '00.00.01.*' specified for the 'file version' is not in the
normal 'major.minor.build.revision' format [C:\websites\dnndev.me\DesktopModul
es\DNNModule1\DNNModule1.vbproj]
CopyFilesToOutputDirectory:
Copying file from "obj\Debug\DNNModule1.dll" to "..\..\bin\DNNModule1.dll".
DNNModule1 -> C:\websites\dnndev.me\bin\DNNModule1.dll
Copying file from "obj\Debug\DNNModule1.pdb" to "..\..\bin\DNNModule1.pdb".
Copying file from "obj\Debug\DNNModule1.xml" to "..\..\bin\DNNModule1.xml".
Done Building Project "C:\websites\dnndev.me\DesktopModules\DNNModule1\DNNModul
e1.vbproj" (default targets).
Build succeeded.
"C:\websites\dnndev.me\DesktopModules\DNNModule1\DNNModule1.vbproj" (default ta
rget) (1) ->
(CoreCompile target) ->
vbc : warning BC40010: Possible problem detected while building assembly 'DNN
Module1': The version '00.00.01.*' specified for the 'file version' is not in t
he normal 'major.minor.build.revision' format [C:\websites\dnndev.me\DesktopMod
ules\DNNModule1\DNNModule1.vbproj]
1 Warning(s)
0 Error(s)
Time Elapsed 00:00:02.65
C:\websites\dnndev.me\DesktopModules\DNNModule1>
关于MSBuild社区任务。我在packages目录中有以下文件夹: MSBuildTasks.1.4.0.61。如果我去菜单工具 - >库包管理器 - >管理NuGet Packages for Solution,MsBuildTasks列在已安装的软件包中(v 1.4.0.61)。
好的,所以我在思考与发布与调试设置方面相同的事情。所以我使用命令promt / p:configuration = release手动触发了一个realease构建。这会导致出现新错误:
C:\websites\dnndev.me\DesktopModules\DNNModule1>msbuild dnnmodule1.vbproj /p:Configuration=Release
Microsoft (R) Build Engine version 4.0.30319.33440
[Microsoft .NET Framework, version 4.0.30319.34003]
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 11/30/2013 12:06:27 AM.
Project "C:\websites\dnndev.me\DesktopModules\DNNModule1\dnnmodule1.vbproj" on node 1 (default targets).
GenerateTargetFrameworkMonikerAttribute:
Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
CoreCompile:
Skipping target "CoreCompile" because all output files are up-to-date with respect to the input files.
CopyFilesToOutputDirectory:
dnnmodule1 -> C:\websites\dnndev.me\bin\DNNModule1.dll
C:\websites\dnndev.me\DesktopModules\DNNModule1\BuildScripts\ModulePackage.targets(10,4): error MSB4062: The "MSBuild.Community.Tasks.XmlRead" task could not be loaded f
rom the assembly C:\websites\dnndev.me\DesktopModules\DNNModule1\BuildScripts\*Undefined*\packages\MSBuildTasks.1.4.0.61\tools\MSBuild.Community.Tasks.dll. Could not loa
d file or assembly 'file:///C:\websites\dnndev.me\DesktopModules\DNNModule1\BuildScripts\*Undefined*\packages\MSBuildTasks.1.4.0.61\tools\MSBuild.Community.Tasks.dll' or
one of its dependencies. The filename, directory name, or volume label syntax is incorrect. Confirm that the <UsingTask> declaration is correct, that the assembly and a
ll its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [C:\websites\dnndev.me\DesktopModules\DNNMo
dule1\dnnmodule1.vbproj]
Done Building Project "C:\websites\dnndev.me\DesktopModules\DNNModule1\dnnmodule1.vbproj" (default targets) -- FAILED.
Build FAILED.
以下是我切换到调试版本的屏幕截图。我一定错过了一些明显的东西。
答案 0 :(得分:1)
确保在VS中的工具栏中切换到RELEASE模式,而不仅仅是项目属性。如果您没有看到构建工具栏,我建议您为C#模式而不是VB配置VS,然后下拉列表变得易于访问。