asp.net – 构建成功,但发布失败
发布时间:2020-12-15 18:32:22 所属栏目:asp.Net 来源:网络整理
导读:直到两天前,我可以通过右键单击我的项目并单击上下文菜单上的发布按钮来使用Visual Studio 2010的“发布Web”选项。现在,当我尝试做同样的事情时,我得到以下输出: ------ Build started: Project: ELMS,Configuration: Debug Any CPU ------Build starte
直到两天前,我可以通过右键单击我的项目并单击上下文菜单上的发布按钮来使用Visual Studio 2010的“发布Web”选项。现在,当我尝试做同样的事情时,我得到以下输出:
------ Build started: Project: ELMS,Configuration: Debug Any CPU ------ Build started 8/1/2011 3:08:03 PM. GenerateTargetFrameworkMonikerAttribute: Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files. _CopyOutOfDateSourceItemsToOutputDirectoryAlways: Copying file from "C:SVNTrakNettrunkMTSlibNewtonsoft.Json.Net35.dll" to "binlibNewtonsoft.Json.Net35.dll". CopyFilesToOutputDirectory: LMS -> C:SVNTrakNettrunkMTSbinLMS.dll Build succeeded. Time Elapsed 00:00:00.04 ------ Publish started: Project: LMS,Configuration: Debug Any CPU ------ Object reference not set to an instance of an object. ========== Build: 1 succeeded or up-to-date,0 failed,0 skipped ========== ========== Publish: 0 succeeded,1 failed,0 skipped ========== 这是在尝试发布到本地主机(为了调试目的) 以下是我使用的发布资料的设置: Publish Method: Web Deploy Service URL: localhost Site/application: default web site/ELMS [x] Mark as IIS application on destination [x] Leave extra files on destination (do not delete) 我已经尝试过: - Cleaning/rebuilding the project - Deleting the bin folder of the project - Running reg_iis.exe -i - Reinstalling VS2010 但我没有改变已经修复了错误。 任何关于可能导致该问题的洞察将非常感谢:) 编辑: 该问题实际上解决了自己,因为我上次重新启动。我必须重新启动6-7次,因为问题首先表现出来,但这次没有对象引用消息。这是现在的build / publish的日志: ------ Build started: Project: LMS,Configuration: Debug Any CPU ------ Build started 8/3/2011 9:10:12 AM. GenerateTargetFrameworkMonikerAttribute: Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files. _CopyOutOfDateSourceItemsToOutputDirectoryAlways: Copying file from "C:SVNTrakNettrunkMTSlibNewtonsoft.Json.Net35.dll" to "binlibNewtonsoft.Json.Net35.dll". CopyFilesToOutputDirectory: LMS -> C:SVNTrakNettrunkMTSbinLMS.dll Build succeeded. Time Elapsed 00:00:00.04 ------ Publish started: Project: LMS,Configuration: Debug Any CPU ------ Gather all files from Project items @(IntermediateAssembly). Adding: binLMS.dll to binLMS.dll binLMS.pdb to binLMS.pdb Gather all files from Project items @(Content). Adding: Global.asax;libNewtonsoft.Json.Net35.dll;MtsSchemasMtsSchema.xml;Web.config Gather all files from Project output (IntermediateSatelliteAssembliesWithTargetPath). Adding: Gather all files from Project items @(ReferenceCopyLocalPaths,ReferenceComWrappersToCopyLocal,ResolvedIsolatedComModules,_DeploymentLooseManifestFile,NativeReferenceFile). Gather all files from Project items @(AllExtraReferenceFiles). Adding: Gather all files from Project items @(_SourceItemsToCopyToOutputDirectoryAlways,_SourceItemsToCopyToOutputDirectory). Adding: binlibNewtonsoft.Json.Net35.dll Gather all files from Project items @(_binDeployableAssemblies). Adding: Publish Pipeline Collect Files Phase Found The following for Config tranformation: Web.config Creating directory "C:SVNTrakNettrunkMTSobjDebugTransformWebConfigtransformed". Publish Pipeline Transform Phase Creating directory "C:SVNTrakNettrunkMTSobjDebugCSAutoParameterizetransformed". Copying Web.config to objDebugCSAutoParameterizeoriginalWeb.config. Transforming Source File: C:SVNTrakNettrunkMTSWeb.config Applying Transform File: <?xml version="1.0"?> <configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> <connectionStrings> <add connectionString="{% token='$(ReplacableToken_#(parameter)_#(tokennumber))' xpathlocator='name' parameter='$(name)-Web.config Connection String' description='$(name) Connection String used in web.config by the application to access the database.' defaultValue='$(connectionString)' tags='SqlConnectionString' %}" xdt:Transform="SetTokenizedAttributes(connectionString)" xdt:SupressWarnings="True" /> </connectionStrings> </configuration> Output File: objDebugCSAutoParameterizetransformedWeb.config Transformation succeeded Auto ConnectionString Transformed Web.config into objDebugCSAutoParameterizetransformedWeb.config. Creating directory "objDebugPackagePackageTmp". Copying all files to temporary location below for package/publish: objDebugPackagePackageTmp. Copying binLMS.dll to objDebugPackagePackageTmpbinLMS.dll. Copying binLMS.pdb to objDebugPackagePackageTmpbinLMS.pdb. Copying Global.asax to objDebugPackagePackageTmpGlobal.asax. Copying libNewtonsoft.Json.Net35.dll to objDebugPackagePackageTmplibNewtonsoft.Json.Net35.dll. Copying MtsSchemasMtsSchema.xml to objDebugPackagePackageTmpMtsSchemasMtsSchema.xml. Copying C:SVNTrakNettrunkMTSlibNewtonsoft.Json.Net35.dll to objDebugPackagePackageTmpbinlibNewtonsoft.Json.Net35.dll. Copying objDebugCSAutoParameterizetransformedWeb.config to objDebugPackagePackageTmpWeb.config. Publish Pipeline Deploy phase Pre-Deploy CopyAllFilesToOneFolder Stage Generate source manifest file for Web Deploy package/publish ... Creating directory "objDebugDatabase". Starting Web deployment task from source:manifest(C:SVNTrakNettrunkMTSobjDebugPackageLMS.SourceManifest.xml) to Destination:auto(). Updating filePath (default web site/LMSbinELMS.dll). Updating filePath (default web site/LMSbinELMS.pdb). Updating filePath (default web site/LMSbinlibNewtonsoft.Json.Net35.dll). Updating filePath (default web site/LMSlibNewtonsoft.Json.Net35.dll). Updating filePath (default web site/LMSWeb.config). Updating setAcl (default web site/LMS). Updating setAcl (default web site/LMS). Successfully executed Web deployment task. Publish is successfully deployed. ========== Build: 1 succeeded or up-to-date,0 skipped ========== ========== Publish: 1 succeeded,0 skipped ========== 就像我说的:不知道有什么改变。我已经手动将DLL移动到网站的虚拟目录,然后只是为了踢我今天早上尝试发布,一切都很好。 解决方法
根据我的经验,当从源代码控制的不同分支中添加/删除文件时,可能会发生这种情况,并且不完美的合并会导致项目文件结构和实际的文件结构不一致。
这可能是几个选择之一: >文件被删除,但项目仍然引用它。将无法编译,将无法发布。 解决方案是查看源代码控制日志,并尝试识别上述问题的项目文件的不良合并,然后相应地修复项目文件。 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- 为不同的ASP.NET MVC 3区域提供不同的登录页面
- asp.net-mvc – ASP.NET MVC:HTTPContext和依赖注入
- 在.NET业务层中构造Vs类
- ASP.NET选项卡控件
- asp.net – 为什么设置为SqlServer时会话超时不起作用?
- asp.net-mvc – BeginRenderLink Sitecore Glass Mapper
- asp.net – 不包括’00000’的5位数字的正则表达式
- 如何在ASP.NET中获取服务器端的输入值(类型文本)?
- ASP.NET:代码落后或没有代码落后?
- asp.net – RadGrid在Visual Studio 2013中打开应用程序时,
推荐文章
站长推荐
- 设置ASP.NET页面不被缓存(客户端/服务器端取消缓
- asp.net – 在Visual Studio 2015社区中看不到“
- asp.net – AppHarbor上的MongoDB成员资格提供程
- 为什么OutputCache是??ASP.NET MVC中的结果过滤器
- asp.net-mvc-4 – 未找到入口点异常
- asp.net – MVC 4可以在.net 3.5上运行吗?
- asp.net-mvc – 使用LINQ从MVC调用存储过程而不指
- asp.net-mvc-3 – ASP.NET MVC 3/4是否有任何响应
- asp.net-mvc – 具有指定Controller和Action的Ht
- asp.net – .Net ADO连接类
热点阅读