Illegal characters in path when attempting to deploy an Azure webjob via Visual Studio Online build process - azure-webjobs

I am trying to setup a CI build process with Azure WebJobs. I have a ASP.NET MVC5 and a WebJob project in the solution and several class library projects. I have a working Visual Studio Online (VSO) build definition already setup to deploy the MVC project. However, when I add the WebJob project to the solution the build process fails with:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets (2586, 5) Copying file C:\a\1\a**\*.* to obj\Release\Package\PackageTmp\app_data\jobs\triggered\LoyaltyClub\*.* failed. Illegal characters in path.
Any ideas how I can fix this? Both the MVC and WebJob projects are using version 1.0.7 of the Microsoft.Web.WebJobs.Publish Nuget package.

Related

MSBuild doesn't create a package for a Web Service project?

We're running the following command for building and packaging Visual Studio Solutions:
MSBuild.exe *slnfile* /p:DeployOnBuild=true /p:CreatePackageOnPublish=true
It appears this creates packages for Web Applications but not Web Services. I don't even see a "Publish" option in Visual Studio for Web Service projects. How do I package these for deployment?
It turns out the developer didn't create a Web Application project, they created a simple empty C# project. I converted the project to Web Application and it works.

TFS 2017 - Build and Release

I am very new in TFS, need to implement CICD using TFS 2017 and its build and release feature,
when I tried to run build after creating build definition, I got error like no agent found, I googled and found how to configure agent, but I have logical confusion in my mind as below:
How Agent works with TFS 2017?
Where process of CI will be run on Agent or on TFS server?
Where I need to have msbuild ? where my built code will be placed?
What other dependencies would be there on Agent machine?
all question might be silly but as I have worked with Jenkins and Git, i dont have knowledge of Microsoft technologies, and I can't find well documents for the same.
How Agent works with TFS 2017?
In short to build with TFS, you need to Deploy an agent, in the agent machine you need to install the proper build components/SDKs accordingly based on your project.
Create a build definition. Once a build is triggered , the sources will be downloaded from the TFS repository to the agent machine and then build in the agent machine.
Related documents : Agent pools and queues; Build and Release Agents; Build definition options
Where process of CI will be run on Agent or on TFS server?
You can eanble the CI (turn on the Continuous integration trigger) in build definition. See Configure continuous integration for details. Thus the build will automatically be triggered once changes are checked in.
Related documents: A quick introduction to CI/CD ; Build and release
Where I need to have msbuild ? where my built code will be placed?
For vNext build, it's task based build system. You can define your build definition based on the tasks. See Build and release tasks .
e.g.: You can use MSBuild or Visual Studio Build task, you can specify the MSBuild Arguments as needed.
You can use the utility task: Copy and Publish Build Artifacts and Publish Build Artifacts to specify where the built code will be placed. (Artifact Type : Server/File share path)
What other dependencies would be there on Agent machine?
Refer to the answer for the first question.

NuGet Package Manager not working in Visual Studio 2017 - for a.NET Core 1.1 web application

I just created a .NET Core Web Application in VS2017 and I wanted to be able to serve a single page application. In order to be able to do that I tried to install the nuget package Microsoft.AspNetCore.StaticFiles. But my NuGet installer failed and threw the following error
Severity Code Description Project File Line Suppression State
Package restore failed. Rolling back package changes for 'MyApp'.
Right click on the project=>Properties and set TargetFramework to .net core 2.0(less than or equal to the packages version you are using)
build the project and then install whatever you want from nuget.

How to create web deploy package in VSTS/VSO Build vNext?

I have an automated build in Visual Studio Team Services (formerly Visual Studio Online. The solution is building correctly. How do I configure it so it will also create a web deploy package?
We use the following MSBuild Arguments: /p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactstagingdirectory)\\"
With these you do not need to create a new publishing profile.
We enable web deploy package creation within the "Visual Studio Build" task. Simply pass the following MS Build arguments:
MSBuild Arguments: /p:DeployOnBuild=true;PublishProfile=<name of your profile>

Team Foundation Server Deployment error

I have setup my own Team Foundation Build server and I am using Visual Studio Online to host my project online. I have a django project which I am trying to deploy on windows azure cloud service. The project can be published from my dev machine without any errors however when the build server tries to build it, it gives the following error during uploading the package:
Exception Message: Could not load file or assembly 'Microsoft.WindowsAzure.Storage, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. (type FileNotFoundException)
I checked in .pyproj and found a reference to Microsoft.WindowsAzure.Storage but there the version is 2.1.0.0 and that is the version that is installed on the server as well.
Also there are no errors during the build process but only during the deployment stage. How do I make Msbuild use Storage version 2.1.0.0 instead of 2.0.0.0 . Also, which SDK version contains Storage version 2.0.0.0
I just had this problem. This is the same problem as TFS Build Controller : "Could not load file or assembly 'Microsoft.WindowsAzure.StorageClient, Version=1.7.0.0".
You'll need to copy Microsoft.WindowsAzure.Storage.dll version 2.0.0.0 to "C:\Program Files\Microsoft Team Foundation Server 12.0\Tools", and then restart the Visual Studio Team Foundation Build Service Host 2013 service.