web deployment package (.zip file) not created in Visual Studio 2013 - visual-studio-2013

I am trying to create a deployment package in Visual Studio 2013. I have specified that the package should be placed at C:\Deployment\bin\WebSite.zip - the absolutely simplest location. All the project files build but the publish fails with this error:
Transformed Web.config using C:\Services\IdentityServer\Thinktecture.IdentityServer.v2\src\OnPremise\WebSite\Web.Siloed.config into obj\Siloed\TransformWebConfig\transformed\Web.config.
Auto ConnectionString Transformed Areas\Admin\Views\Web.config into obj\Siloed\CSAutoParameterize\transformed\Areas\Admin\Views\Web.config.
Auto ConnectionString Transformed Views\Web.config into obj\Siloed\CSAutoParameterize\transformed\Views\Web.config.
Auto ConnectionString Transformed obj\Siloed\TransformWebConfig\transformed\Web.config into obj\Siloed\CSAutoParameterize\transformed\Web.config.
Copying all files to temporary location below for package/publish:
obj\Siloed\Package\PackageTmp.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets(2584,5): Error : Copying file ..\..\..\Deployment\bin\um.zip to obj\Siloed\Package\PackageTmp\.ebextensions\um.zip failed. Could not find a part of the path '..\..\..\Deployment\bin\um.zip'.
I have no idea where this path '......\Deployment\bin\um.zip' is coming from. I specified that the deployment package should be created at C:\Deployment\bin\WebSite.zip, not um.zip.
So, I checked out C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets(2584,5) and the code looks like this:
<!--Force Copy Of all file to the $(WPPAllFilesInSingleFolder) if needed-->
<CopyPipelineFiles PipelineItems="#(FilesForPackagingFromProject)"
SourceDirectory="$(WebPublishPipelineProjectDirectory)"
TargetDirectory="$(WPPAllFilesInSingleFolder)"
SkipMetadataExcludeTrueItems="True"
UpdateItemSpec="True"
DeleteItemsMarkAsExcludeTrue ="True"
Condition="'#(FilesForPackagingFromProject)' != ''">
<Output TaskParameter="ResultPipelineItems" ItemName="_FilesForPackagingFromProjectTempory"/>
</CopyPipelineFile>
I have tried editing the "PipelineItems" and "SourceDirectory" and have even hardcoded them. But the same message, "Could not find part of the path....", is being displayed every time I run the Publishing. The "Could not find part of the path...." points to the new paths I specified in "PipelineItems" and "SourceDirectory. The .zip file never seems to get created anywhere. I have seached my entire computer for um.zip and WebSite.zip with not luck.
Any help would be greatly appreciated as I am completely out of ideas.

Turns out this um.zip is somehow part of build but it is not getting created. Anyway, I was lucky enough to find a previous deployment package that was generated and I just manually built the new deployment package based off the old one. Deployed fine so I guess that is how I will proceed.

Related

Why does Visual Studio publish packages.config too?

When I use the option Publish... selecting as target the file system in Visual Studio 2015 it compiles the code, do the XML transformation in the Web.config files and copy the files to the folder I specified.
It does not copy any *.cs file as expected since it is compiled.
Something that I don't understand is why it publishes the Nuget Config file (packages.config), after all, the files needed are already in the bin folder.
I found this question that says how to avoid but not the reason they decided this file would be usable on the server.
Can I stop VS from publishing packages.config?
Anyone know why packages.config end up in the publish folder?

Renamed visual studio project, error when publishing (ResolveAssemblyReference.cache)

My solution contains two projects. Both have been renamed from 'LearnUmbraco.*' to 'OnceUpon.'
The solution builds fine, however when trying to publish via FTP, the error occurs:
Error Copying file obj\Debug\LearnUmbraco.csprojResolveAssemblyReference.cache to obj\Release\Package\PackageTmp\obj\Debug\LearnUmbraco.csprojResolveAssemblyReference.cache failed. Could not find file 'obj\Debug\LearnUmbraco.csprojResolveAssemblyReference.cache'. 0 0 OnceUpon.WebUI
If I look in my obj/Debug folder i do indeed have a ResolveAssemblyReference.cache however it is obviously prefixed with ;OnceUpon.**.'.
Where/how is this file generated. I'd like to change the configuration so it looks for the renamed version.
Many thanks
Found the issue. Close the solution and open the csproj file. The old references were still in there.

Cannot load WiX projects after installing the VS2010 Web Publishing Updates

I installed the VS2010 web publishing updates yesterday, and now whenever I try to load a WiX setup project (all showing as unloaded in solution explorer) I'm getting the error:
The imported project "PROJECTNAME.wpp.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk. C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.5\Web\Microsoft.Web.Publishing.targets
Where PROJECTNAME is the path to my setup wixproj file, without the .wixproj extension. I've checked through the project file and there is no reference to a wpp.targets file anywhere. I decided to try and create a blank targets file in that location and so added one with just this in it:
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>
But got exactly the same error - a not found exception despite the file being there!
I then dug into the Microsoft.Web.Publishing.targets file and had a look for any ".wpp.targets" text, which gave me this:
<PropertyGroup Condition="'$(EnableWebPublishProfileFile)'=='true' And
'$(WebPublishProfileFile)' != '' And Exists($(WebPublishProfileFile)) ">
<WebPublishProfileCustomizeTargetFile Condition="'$(WebPublishProfileCustomizeTargetFile)'==''">
$([System.IO.Path]::ChangeExtension($(WebPublishProfileFile), '.wpp.targets'))
</WebPublishProfileCustomizeTargetFile>
...
So that looks to be setting up a filename of PROJECTNAME.wpp.targets, but only when the EnableWebPublishProfileFile property is set to true. I added this to my wixproj file's main propertygroup:
<EnableWebPublishProfileFile>False</EnableWebPublishProfileFile>
Again though, it made no difference at all to the error. I'm running out of ideas here now!
Further update
I've been trying to repo this on a blank project (so far without success), and the messing about has narrowed the error down to this line (186) in the Microsoft.Web.Publishing.targets file:
<Import Project="$(WebPublishPipelineCustomizeTargetFile)"
Condition="'$(WebPublishPipelineCustomizeTargetFile)' != ''"/>
This is set at the top of the file:
<WebPublishPipelineCustomizeTargetFile
Condition="'$(WebPublishPipelineCustomizeTargetFile)'==''">
$(WebPublishPipelineProjectDirectory)\*.wpp.targets
</WebPublishPipelineCustomizeTargetFile>
I'm not sure how this is getting changed to PROJECTNAME.wpp.targets though?
I tried overriding this in my project file, but once again, it makes no difference at all.
Next I added an Exists() condition to the line in the targets file, now some projects are working and others are not, instead failing (on build) with the error:
The "DisableEscapeMSBuildVariable" parameter is not supported by the "ImportParametersFile" task. Verify the parameter exists on the task, and it is a settable public instance property.
My journey continues...
I experienced the same issue when trying to open a standard web project.
The proj file was referencing the following import for v10.0 targets but throwing the import error in the question which referred to v10.5 targets.
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets" />
The same was true when I referenced a hard coded path - I still got v10.5 error
My solution was to simply back up and remove that version located at:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\10.5
I'm really not sure what other programs and projects need this version or why import paths were not followed but it go this project open for me seeming falling back to the correct version.

Unable to copy file exception in TFS build

I am getting following error
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets (178): Unable to copy file "bin\AjaxControlToolkit.pdb" to "C:\Builds\2\testbox\test\Binaries\_PublishedWebsites\test\bin\AjaxControlToolkit.pdb". Could not find a part of the path 'bin\AjaxControlToolkit.pdb'.
Just checked file is available on path.
same working fine on local as well as while building from team city. Don't know whats going wrong.
Edited
Just cant understand why it is trying to copy from obj directory..Please see the following log
Copying file from "obj\Debug\Manager.dll" to "C:\Builds\2\box\Two\Binaries\Manager.dll".
Manager -> C:\Builds\2\box\Two\Binaries\Manager.dll
Copying file from "obj\Debug\Manager.pdb" to "C:\Builds\2\box\Two\Binaries\Manager.pdb".
Copying file from "obj\Debug\Manager.xml" to "C:\Builds\2\box\Two\Binaries\Manager.xml".
Done Building Project "C:\Builds\2\box\Two\Sources\Manager\Manager.vbproj" (default targets)
Where as I have set the output to bin.
Possible reasons:
This reference is dynamic, meaning its path gets cleared and created on each build. Third party reference files should be checked in the source control to a common shared folder (e.g. \lib).
Your project have a file reference to AjaxControlToolkit to a path
which does not exist on build the server. Open the project's .csproj
file,and check the HintPath of AjaxControlToolkit.
Avoid referencing third party assemblies from the GAC (where the first bullet is applicable).

VS 2010 Beta2 Integration Project Exp hive output?

I am in the process of upgrading an existing VS Integration Project to 2010 Beta2. The project uses Spring. The Initialize() code in the VSPkg.cs includes a call that tries to access an XML file that contains some context settings. The xml file properties are set to the Build Action = Content and Copy to Output Directory = Copy always. The file indeed appears in the output directory (bin\Debug). BUT, by some default the build output also ends up in the Documents and Settings\\Local Settings\Application Data\Microsoft\VisualStudio\10.0Exp\Extensions\\\. The contents of this directory is apparently used to initialize the Experimental Hive when I try to debug. The problem is that only the dll files, pkgdef file and vsixmanifest get copied there. How can I make my XML file to be copied there as well? Since it is not there I get an IO exception "Can't find file..." during the Initialize().
Have you tried a post-build action?

Resources