The Slack integration for CCNet is neat https://github.com/jrjackso/CCNetSlackPublisher but I get this error when adding the to the ccnet.exe.config file:
"Unrecognized configuration section publishers. (C:\Program Files (x86)\CruiseControl.NET\server\ccnet.exe.Config line 167)"
I'm running CCnet version 1.8.5.0 (that's the File Version on ccnet.exe at least). I tried copying the dlls from that version into the CCNetSlackPublisher solution before I built it but that didn't change anything.
Does the <publishers> section need to be inside anything besides just the tag? I just put it at the bottom of the file, between </runtime> and </configuration>.
Related
I am on .Net Core 2.0.
I create a new solution containing a webapp and a website. The website project contains an index.html and web.config file.
I have no issue publishing the web application, but the website causes me some trouble.
I added a publish profile configured for FileSystem publish method.
When I run dotnet publish on the default .publishproj generated, I get the following error message
error MSB4019: The imported project
"C:\ProgramFiles\dotnet\sdk\2.0.0\Microsoft\
VisualStudio\v10.5\Web\Microsoft.Web
Site.Publishing.targets" was not found. Confirm that the path in the
<Import> declaration is correct, and that the file exists on disk.
Ok, so I change the website.publishproj value to where the targets file is located.
<!--<Import
Project="$(_WebPublishTargetsPath)\Web\Microsoft.WebSite.Publishing.targets"
/>-->
<Import Project="C:\Program Files
(x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\
Microsoft.WebSite.Publishing.targets" />
Then I get
error MSB3030: Could not copy the file
"C:\Users\Administrator\AppData\Local\Temp\WebSitePublish\WebSite2-
1026028577\obj\Debug\website.exe" because it was not found.
[C:\Users\Administrator\Documents\visual studio
2017\WebSites\WebSite2\website.publishproj]
I can publish the website using visual studio without any issue. What am I missing?
It looks like you are trying to use the dotnet CLI tooling to publish "classic" website projects which is not supported. Use msbuild from the developer command prompt instead.
I'm trying to create an azure package via tfs build server.
my project is an Azure MVC web api project. when i trigger a build I get the error "The target "PipelineTransformPhase" does not exist in the project."
But I've added the Microsoft.WebApplication.targets file to the appropriate folder in my build server.
this is the line mentioned in my csproj file
Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' == ''" />
even without condition I get the same error.
could someone help to resolve this issue .
many thanks in advance
First, read these SO posts, they might have your answer:
Package / Publish error on Azure
MSBuild target package not found
Is it possible that the .targets file was never found? (If you're on a machine without Visual Studio it won't be there). That would produce an error somewhat like:
The imported project
"...\WebApplications\Microsoft.WebApplication.targets" was not found.
Confirm that the path in the <Import> declaration is correct, and that
the file exists on disk.
I'll assume that isn't the problem. I would run the build with logging enabled and look at where your targets are coming from (or not coming from in this case). It might add some light to your problem. You can use the /fl switch something like my example below to get a detailed (not diagnostic -- which you could do) log from a build:
msbuild /fl /flp:logfile=<yourpath>\yourLog.log;verbosity=detailed
The lines you should be most interested in are around targets. Lines like
Target "Clean" in file "..." from project "..." (entry point): and
Overriding target "Clean" in project "..." with target "Clean" from project "..."
I am trying to setup the build integration between tfs and sharepoint.
We have a separate build server. We have followed these steps and checked them for correctness 3 times. However on sharepoint builds, we keep having this error. And yes the files exists on the build server.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SharePointTools\Microsoft.VisualStudio.SharePoint.targets (416): Could not load file or assembly 'Microsoft.VisualStudio.SharePoint.Designers.Models, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified
Please advice.
Update 1:
1. When I remove the .SLN from the build definition and add the csproj one by one, the build completes but I get this warning for each project (10 times)
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (610): The OutputPath property is not set for project 'Pwc.SP.DMS.CLF.CustomContentField.csproj'. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='Debug' Platform='Any CPU'. You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn't exist for this project
I set /p:IsPackaging=true however in the drop folder I only see log files, there are no wsps or dlls.
If I remove the csproj and add the .sln then I get this error again:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SharePointTools\Microsoft.VisualStudio.SharePoint.targets (416): Could not load file or assembly 'Microsoft.VisualStudio.SharePoint.Designers.Models, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified
If you copied the assembly to the build server, you may not have copied all the assemblies that Microsoft.VisualStudio.SharePoint.Designers.Models depends on. I would use Reflector or some kind of disassembler to view the dependencies. Once you have them all there, you should stop seeing loading issues. Sometimes, the issue relates to the architecture of the process running on the build server.
I would manually build the solution or project using msbuild on the build server i.e.
msbuild a.sln /p:OutDir=e:\dir\ /p:Configuration=Release /p:Platform="Any CPU"
msbuild a.csproj /p:OutDir=e:\dir\ /p:Configuration=Release /p:Platform=AnyCPU
In the Visual Studio 2012 Build menu, there's a Publish command. In this you can establish profiles which are saved as .pubxml files in the Properties folder of the Project. I have one such profile that's a simple file copy operation - it just compiles the site and dumps it to a folder.
How can I use msbuild at the command line to publish a compiled web application to a folder?
What I've tried
I've tried the example from this question:
After Publish event in Visual Studio
And the changes and examples given here:
http://www.digitallycreated.net/Blog/59/locally-publishing-a-vs2010-asp.net-web-application-using-msbuild
The latter seems to get closest, but it causes every library Project the .csproj I'm attempting to publish from to throw an error:
Project "MainProj.csproj" (1) is building "ReferencedProj.csproj" (2) on node 1 (default targets).
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(609,5): error : The OutputPath property is not set for project 'ReferencedProj.csproj'. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='Staging' Platform='AnyCPU'. You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn't exist for this project. [ReferencedProj.csproj]
Done Building Project "ReferencedProj.csproj" (default targets) -- FAILED.
This approach is very similar to what's suggested in this answer:
https://stackoverflow.com/a/7077178/176877
The crucial difference may be that I'm in Visual Studio 2012, rather than VS2008 or 2010.
Old question, but in case this helps anyone, this simple, stripped back approach worked fine for me:
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
...
<BuildDependsOn>
$(BuildDependsOn);
PublishOtherProject;
</BuildDependsOn>
</PropertyGroup>
<Target Name="PublishOtherProject">
<MSBuild Projects="pathtomyproject.csproj" Properties="DeployOnBuild=true;PublishProfile=nameOfPublishProfile" />
</Target>
The key line being:
<MSBuild Projects="pathtomyproject.csproj" Properties="DeployOnBuild=true;PublishProfile=nameOfPublishProfile" />
I am just beginning to set up a Continuous Integration Server using CruiseControl.Net. To keep things simple to begin with, I used the Visual Studio Task to carry out the build, pointing it at the project solution file. However, when the build process occurs, CC.Net successfully gets the latest source version from Subversion, and appears to run the devenv command. The build process then fails, but there is no explanation about why. Here is the output:
BUILD FAILED
Project: MyProject
Date of build: 2009-09-09 16:31:13
Running time: 00:00:49
Integration Request: Dashboard triggered a build (ForceBuild)
Modifications since last build (0)
Tests run: 0, Failures: 0, Not run: 0,
Time: 0 seconds No Tests Run This
project doesn't have any tests
There is nothing else displayed on the page. My XML Logs don't show any build results either.
This is my configuration file:
<!--<ccnetconfig><configurationVersion>1.4</configurationVersion></ccnetconfig>-->
<cruisecontrol>
<project name="MyProject">
<workingDirectory>C:\Users\Builder\Desktop\builder-pc\MyProject</workingDirectory>
<sourcecontrol type="svn">
<trunkUrl>svn://builder-pc/MyProject/trunk</trunkUrl>
<workingDirectory>C:\Users\Builder\Desktop\builder-pc\MyProject</workingDirectory>
<executable>C:\Program Files\Subversion\bin\svn.exe</executable>
<autoGetSource>True</autoGetSource>
<tagOnSuccess>True</tagOnSuccess>
</sourcecontrol>
<tasks>
<devenv>
<solutionfile>C:\Users\Builder\Desktop\builder-pc\MyProject\trunk\MyProject.sln</solutionfile>
<configuration>release</configuration>
<buildtype>Rebuild</buildtype>
<executable>C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe</executable>
<buildTimeoutSeconds>600</buildTimeoutSeconds>
</devenv>
</tasks>
</project>
</cruisecontrol>
I have deliberately removed things like the SVN username and password.
Building the solution using the VS Command Prompt works, albeit with warnings. This is using the same swtiches that CC.Net would be using.
Can anyone help? Is it failing because there are no unit tests to run, or because of the warnings? Or is it best to switch to MSBuild or NAnt instead of using the Visual Studio Task?
If there is no useful information in the build log, try looking at the server log for information about the failure.
I think the reason you aren't seeing any output in the xml log files is because you don't have an appropriate <publishers> section in your <project>.
Try:
<publishers>
<xmllogger />
</publishers>
Try running the build with MSBuild instead of devenv.exe. If the log gets merged into the xml but is not displayed properly in the web dashboard, make sure that appropriate xsl transforms are enabled. Also, as Scrappydog mentioned, add the xmllogger publisher (although it should be added by default if you don't have any publishers defined at all, you can check this in the 'Project Configuration' page on the dashboard.
You should use devnev.com (note the file extension is .com, not .exe) in the same path (i.e. C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE), instead of devnev.exe.
The <executable> block is optional, and from the CruiseControl.NET documentation, it will use the latest version of devnev.com, not devnev.exe.