2017-01-09 2 views
0

Привет, я пытаюсь открыть файлы решений Visual Studio с помощью MSBuild. Я могу публиковать с помощью visual studio 2015, тогда как при попытке создать и опубликовать сайт с помощью MSBuild. Я вижу, что сборка выполнена успешно, и путь к выходному каталогу создается с использованием некоторых DLL, а не всего проекта. Решение имело несколько проектов, я разбил решение на отдельные проекты и начал строить индивидуально. С подобным подходом я смогла построить и опубликовать другой проект индивидуально, но когда я пытаюсь опубликовать это, все, что я вижу, - это 4 предупреждения и построить для успеха. любая помощь была бы высоко оценена.Невозможно PUBLISH Файлы решений Visual Studio с использованием MSBuild

После CMD была запущена для создания и публикации:

C:\Program Files (x86)\MSBuild\14.0\Bin>MSBuild E:\CI\CorpAppSource_Timesheet\Co 
nsilio.IMS.sln /t:build /p:VisualStudioVersion=14.0 /p:Configuration=Release /p: 
DeployOnBuild=false /p:OutputPath=E:\Naresh 

Building the projects in this solution one at a time. To enable parallel build, 
please add the "/m" switch. 
Build started 1/9/2017 7:51:26 AM. 
Project "E:\CI\CorpAppSource_Timesheet\Consilio.IMS.sln" on node 1 (build targe 
t(s)). 
ValidateSolutionConfiguration: 
    Building solution configuration "Release|Any CPU". 
Project "E:\CI\CorpAppSource_Timesheet\Consilio.IMS.sln" (1) is building "E:\CI 
\CorpAppSource_Timesheet\IMS.Library\Library.csproj" (2) on node 1 (default tar 
gets). 
PrepareForBuild: 
    Creating directory "E:\Naresh\". 
ResolveAssemblyReferences: 
    Could not read state file "obj\Release\Library.csprojResolveAssemblyReference 
    .cache". The format of this state file is not valid. 
GenerateTargetFrameworkMonikerAttribute: 
Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output fi 
les are up-to-date with respect to the input files. 
CoreCompile: 
Skipping target "CoreCompile" because all output files are up-to-date with resp 
ect to the input files. 
_CopyFilesMarkedCopyLocal: 
    Copying file from "E:\CI\CorpAppSource_Timesheet\IMS.Library\3rd Party Librar 
    ies\log4net.dll" to "E:\Naresh\log4net.dll". 
_CopyAppConfigFile: 
    Copying file from "app.config" to "E:\Naresh\IMS.Library.dll.config". 
CopyFilesToOutputDirectory: 
    Copying file from "obj\Release\IMS.Library.dll" to "E:\Naresh\IMS.Library.dll 
    ". 
    Library -> E:\Naresh\IMS.Library.dll 
    Copying file from "obj\Release\IMS.Library.pdb" to "E:\Naresh\IMS.Library.pdb 
    ". 
Done Building Project "E:\CI\CorpAppSource_Timesheet\IMS.Library\Library.csproj 
" (default targets). 

Project "E:\CI\CorpAppSource_Timesheet\Consilio.IMS.sln" (1) is building "E:\CI 
\CorpAppSource_Timesheet\FADV.IMS\IMS.Core\FADV.IMS.Core.csproj" (3) on node 1 
(default targets). 
Project "E:\CI\CorpAppSource_Timesheet\FADV.IMS\IMS.Core\FADV.IMS.Core.csproj" 
(3) is building "E:\CI\CorpAppSource_Timesheet\FADV.Util\FADV.Util.csproj" (4) 
on node 1 (default targets). 
ResolveAssemblyReferences: 
    Could not read state file "obj\Release\FADV.Util.csprojResolveAssemblyReferen 
    ce.cache". The format of this state file is not valid. 
CoreCompile: 
Skipping target "CoreCompile" because all output files are up-to-date with resp 
ect to the input files. 
CopyFilesToOutputDirectory: 
    Copying file from "obj\Release\FADV.Util.dll" to "E:\Naresh\FADV.Util.dll". 
    FADV.Util -> E:\Naresh\FADV.Util.dll 
    Copying file from "obj\Release\FADV.Util.pdb" to "E:\Naresh\FADV.Util.pdb". 
Done Building Project "E:\CI\CorpAppSource_Timesheet\FADV.Util\FADV.Util.csproj 
" (default targets). 

Project "E:\CI\CorpAppSource_Timesheet\FADV.IMS\IMS.Core\FADV.IMS.Core.csproj" 
(3) is building "E:\CI\CorpAppSource_Timesheet\FADV.IMS\IMS.Core.Base\FADV.IMS. 
Core.Base.csproj" (5) on node 1 (default targets). 
Project "E:\CI\CorpAppSource_Timesheet\FADV.IMS\IMS.Core.Base\FADV.IMS.Core.Bas 
e.csproj" (5) is building "E:\CI\CorpAppSource_Timesheet\FADV.IMS\IMS.Data\FADV 
.IMS.Data.csproj" (6) on node 1 (default targets). 
ResolveAssemblyReferences: 
    Could not read state file "obj\Release\FADV.IMS.Data.csprojResolveAssemblyRef 
    erence.cache". The format of this state file is not valid. 
CoreCompile: 
Skipping target "CoreCompile" because all output files are up-to-date with resp 
ect to the input files. 
CopyFilesToOutputDirectory: 
    Copying file from "obj\Release\FADV.IMS.Data.dll" to "E:\Naresh\FADV.IMS.Data 
    .dll". 
    FADV.IMS.Data -> E:\Naresh\FADV.IMS.Data.dll 
    Copying file from "obj\Release\FADV.IMS.Data.pdb" to "E:\Naresh\FADV.IMS.Data 
    .pdb". 
Done Building Project "E:\CI\CorpAppSource_Timesheet\FADV.IMS\IMS.Data\FADV.IMS 
.Data.csproj" (default targets). 

ResolveAssemblyReferences: 
    Could not read state file "obj\Release\FADV.IMS.Core.Base.csprojResolveAssemb 
    lyReference.cache". The format of this state file is not valid. 
CoreCompile: 
Skipping target "CoreCompile" because all output files are up-to-date with resp 
ect to the input files. 
CopyFilesToOutputDirectory: 
    Copying file from "obj\Release\FADV.IMS.Core.Base.dll" to "E:\Naresh\FADV.IMS 
    .Core.Base.dll". 
    FADV.IMS.Core.Base -> E:\Naresh\FADV.IMS.Core.Base.dll 
    Copying file from "obj\Release\FADV.IMS.Core.Base.pdb" to "E:\Naresh\FADV.IMS 
    .Core.Base.pdb". 
Done Building Project "E:\CI\CorpAppSource_Timesheet\FADV.IMS\IMS.Core.Base\FAD 
V.IMS.Core.Base.csproj" (default targets). 

Project "E:\CI\CorpAppSource_Timesheet\FADV.IMS\IMS.Core\FADV.IMS.Core.csproj" 
(3) is building "E:\CI\CorpAppSource_Timesheet\FADV.IMS\IMS.Security\FADV.IMS.S 
ecurity.csproj" (7) on node 1 (default targets). 
ResolveAssemblyReferences: 
    Could not read state file "obj\Release\FADV.IMS.Security.csprojResolveAssembl 
    yReference.cache". The format of this state file is not valid. 
CoreResGen: 
    No resources are out of date with respect to their source files. Skipping res 
    ource generation. 
CoreCompile: 
Skipping target "CoreCompile" because all output files are up-to-date with resp 
ect to the input files. 
CopyFilesToOutputDirectory: 
    Copying file from "obj\Release\FADV.IMS.Security.dll" to "E:\Naresh\FADV.IMS. 
    Security.dll". 
    FADV.IMS.Security -> E:\Naresh\FADV.IMS.Security.dll 
    Copying file from "obj\Release\FADV.IMS.Security.pdb" to "E:\Naresh\FADV.IMS. 
    Security.pdb". 
Done Building Project "E:\CI\CorpAppSource_Timesheet\FADV.IMS\IMS.Security\FADV 
.IMS.Security.csproj" (default targets). 

ResolveAssemblyReferences: 
    Could not read state file "obj\Release\FADV.IMS.Core.csprojResolveAssemblyRef 
    erence.cache". The format of this state file is not valid. 
CoreCompile: 
Skipping target "CoreCompile" because all output files are up-to-date with resp 
ect to the input files. 
GenerateSerializationAssemblies: 
Skipping target "GenerateSerializationAssemblies" because all output files are 
up-to-date with respect to the input files. 
_CopyAppConfigFile: 
    Copying file from "app.config" to "E:\Naresh\FADV.IMS.Core.dll.config". 
CopyFilesToOutputDirectory: 
    Copying file from "obj\Release\FADV.IMS.Core.dll" to "E:\Naresh\FADV.IMS.Core 
    .dll". 
    FADV.IMS.Core -> E:\Naresh\FADV.IMS.Core.dll 
    Copying file from "obj\Release\FADV.IMS.Core.XmlSerializers.dll" to "E:\Nares 
    h\FADV.IMS.Core.XmlSerializers.dll". 
    Copying file from "obj\Release\FADV.IMS.Core.pdb" to "E:\Naresh\FADV.IMS.Core 
    .pdb". 
Done Building Project "E:\CI\CorpAppSource_Timesheet\FADV.IMS\IMS.Core\FADV.IMS 
.Core.csproj" (default targets). 

Project "E:\CI\CorpAppSource_Timesheet\Consilio.IMS.sln" (1) is building "E:\CI 
\CorpAppSource_Timesheet\Timesheet.metaproj" (8) on node 1 (default targets). 
E:\CI\CorpAppSource_Timesheet\Timesheet.metaproj : warning MSB3274: The primary 
reference "E:\Naresh\IMS.Library.dll" could not be resolved because it was bui 
lt against the ".NETFramework,Version=v4.5" framework. This is a higher version 
than the currently targeted framework ".NETFramework,Version=v4.0". 
    Copying file from "E:\Naresh\FADV.IMS.Security.dll" to "..\CorpAppSource_Time 
    sheet\FADV.IMS\Timesheet\\Bin\FADV.IMS.Security.dll". 
    Copying file from "E:\Naresh\FADV.IMS.Data.dll" to "..\CorpAppSource_Timeshee 
    t\FADV.IMS\Timesheet\\Bin\FADV.IMS.Data.dll". 
    Copying file from "E:\Naresh\FADV.Util.dll" to "..\CorpAppSource_Timesheet\FA 
    DV.IMS\Timesheet\\Bin\FADV.Util.dll". 
    Copying file from "E:\Naresh\FADV.IMS.Core.Base.dll" to "..\CorpAppSource_Tim 
    esheet\FADV.IMS\Timesheet\\Bin\FADV.IMS.Core.Base.dll". 
    Copying file from "E:\Naresh\FADV.IMS.Security.pdb" to "..\CorpAppSource_Time 
    sheet\FADV.IMS\Timesheet\\Bin\FADV.IMS.Security.pdb". 
    Copying file from "E:\Naresh\FADV.IMS.Data.pdb" to "..\CorpAppSource_Timeshee 
    t\FADV.IMS\Timesheet\\Bin\FADV.IMS.Data.pdb". 
    Copying file from "E:\Naresh\FADV.Util.pdb" to "..\CorpAppSource_Timesheet\FA 
    DV.IMS\Timesheet\\Bin\FADV.Util.pdb". 
    Copying file from "E:\Naresh\FADV.IMS.Core.Base.pdb" to "..\CorpAppSource_Tim 
    esheet\FADV.IMS\Timesheet\\Bin\FADV.IMS.Core.Base.pdb". 
    Copying file from "E:\Naresh\FADV.IMS.Core.dll" to "..\CorpAppSource_Timeshee 
    t\FADV.IMS\Timesheet\\Bin\FADV.IMS.Core.dll". 
    Copying file from "E:\Naresh\FADV.IMS.Core.pdb" to "..\CorpAppSource_Timeshee 
    t\FADV.IMS\Timesheet\\Bin\FADV.IMS.Core.pdb". 
    Copying file from "E:\Naresh\FADV.IMS.Core.XmlSerializers.dll" to "..\CorpApp 
    Source_Timesheet\FADV.IMS\Timesheet\\Bin\FADV.IMS.Core.XmlSerializers.dll". 
    C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe -v /Timeshe 
    et -p ..\CorpAppSource_Timesheet\FADV.IMS\Timesheet\ -u -f PrecompiledWeb\Tim 
    esheet\ 
e:\CI\CorpAppSource_Timesheet\FADV.IMS\Timesheet\App_Code\TimeSheetService.cs(3 
72): warning CS0108: 'TimeSheetService.oSecurityRoot' hides inherited member 'I 
MSUserPermission.oSecurityRoot'. Use the new keyword if hiding was intended. [E 
:\CI\CorpAppSource_Timesheet\Timesheet.metaproj] 
e:\CI\CorpAppSource_Timesheet\FADV.IMS\Timesheet\App_Code\TimeSheetService.cs(3 
83): warning CS0108: 'TimeSheetService.oSystemRoot' hides inherited member 'IMS 
UserPermission.oSystemRoot'. Use the new keyword if hiding was intended. [E:\CI 
\CorpAppSource_Timesheet\Timesheet.metaproj] 
e:\CI\CorpAppSource_Timesheet\FADV.IMS\Timesheet\UserControls\ParentObjectMenuU 
C.ascx.cs(744): warning CS0618: 'System.Xml.XmlDataDocument' is obsolete: 'XmlD 
ataDocument class will be removed in a future release.' [E:\CI\CorpAppSource_Ti 
mesheet\Timesheet.metaproj] 
Done Building Project "E:\CI\CorpAppSource_Timesheet\Timesheet.metaproj" (defau 
lt targets). 

Done Building Project "E:\CI\CorpAppSource_Timesheet\Consilio.IMS.sln" (build t 
arget(s)). 


Build succeeded. 

"E:\CI\CorpAppSource_Timesheet\Consilio.IMS.sln" (build target) (1) -> 
"E:\CI\CorpAppSource_Timesheet\Timesheet.metaproj" (default target) (8) -> 
(Build target) -> 
    E:\CI\CorpAppSource_Timesheet\Timesheet.metaproj : warning MSB3274: The prima 
ry reference "E:\Naresh\IMS.Library.dll" could not be resolved because it was b 
uilt against the ".NETFramework,Version=v4.5" framework. This is a higher versi 
on than the currently targeted framework ".NETFramework,Version=v4.0". 
    e:\CI\CorpAppSource_Timesheet\FADV.IMS\Timesheet\App_Code\TimeSheetService.cs 
(372): warning CS0108: 'TimeSheetService.oSecurityRoot' hides inherited member 
'IMSUserPermission.oSecurityRoot'. Use the new keyword if hiding was intended. 
[E:\CI\CorpAppSource_Timesheet\Timesheet.metaproj] 
    e:\CI\CorpAppSource_Timesheet\FADV.IMS\Timesheet\App_Code\TimeSheetService.cs 
(383): warning CS0108: 'TimeSheetService.oSystemRoot' hides inherited member 'I 
MSUserPermission.oSystemRoot'. Use the new keyword if hiding was intended. [E:\ 
CI\CorpAppSource_Timesheet\Timesheet.metaproj] 
    e:\CI\CorpAppSource_Timesheet\FADV.IMS\Timesheet\UserControls\ParentObjectMen 
uUC.ascx.cs(744): warning CS0618: 'System.Xml.XmlDataDocument' is obsolete: 'Xm 
lDataDocument class will be removed in a future release.' [E:\CI\CorpAppSource_ 
Timesheet\Timesheet.metaproj] 

    4 Warning(s) 
    0 Error(s) 

Time Elapsed 00:00:12.83 
+0

Каково ваше ожидаемое поведение, которого не происходит? Не копируются ли все DLL-файлы? работает ли сайт после его публикации или вы видите ошибки/предупреждения при навигации там? – Bassie

+0

Я ожидаю, что все двоичные файлы будут опубликованы под E: \ Naresh, но я вижу, что только несколько DLL копируются, а остальные не отображаются в каталоге. –

+0

@NareshG Что такое подробный журнал после указания аргумента/v: d? –

ответ

0

Вам нужно установить DeployOnBuild = истину, а не ложь, после того, что проекты веб-приложения будут опубликованы в E: \ папка Naresh \ _PublishedWebsites.

С другой стороны, вам необходимо указать web.publishproj (корневую папку веб-сайта) для msbuild.exe, чтобы публиковать проект веб-сайта индивидуально, если в проект включен проект веб-сайта. Более подробную информацию, вы можете обратиться к этой теме:

How to use command line msbuild to deploy VS2012 Web Site project without precompiling it

+0

Да, я попытался установить DeployOnBuild = true, а также тренировку dint. Когда я упомянул, что я строю каждый проект индивидуально, то, что я сделал, это удалить остальные проекты с помощью решения explorer из Visual studio и сохранить его. Таким образом, я смог строить проекты индивидуально .... –

+0

@NareshG Каков результат, если вы попробуете его с помощью нового решения с некоторыми проектами? Каковы типы ваших проектов (веб-сайт или веб-приложение)? Что такое журнал подробностей (предоставленный вами журнал не включает информацию о публикации)? Можете ли вы поделиться образцовым решением на OneDrive, который может воспроизвести эту проблему? –

+0

Когда я пытаюсь с другим проектом, я вижу, как создаются все созданные DLL и _PublishedWebsites, в соответствии с которыми создаются создаваемые двоичные файлы, которые могут быть развернуты. –

0

Вы можете создать действие пользовательские сборки под

Properties ->Build Events ->Post-build event command line.

Здесь просто напишите простую командную команду, чтобы скопировать отсутствующие DLL из папки проекта yuor в целевой выходной каталог.

Возможно, вам будет полезно выбрать Edit Post-Build... и посмотреть, какие макросы доступны, чтобы помочь вам написать общую команду. Вы также можете добавить свой собственный, если потребуется.

Надеюсь, это поможет

Смежные вопросы