I have multiple K2 workflow projects which build fine in VS2012. When I attempt to deploy any using VS I simply get a Build Failed message. When I attempt to do a command line build and deploy I get...
Microsoft.Build.Share.InternalErrorException: MSB0001: Internal
MSBuild Error: Task Instance should be null at
Microsoft.Build.Shared.ErrorUtilities.ThrowInternalError(....
I am unable to find any info about this error. Can anyone help?
I found that MSBuild had been set up to use a system environment variable called Environment then match that to a K2 server environment name. I hadn't set up a K2 environment with the correct name. I did this using the K2 Workspace Management Console and now my project deploys successfully.
Related
I have a project that build locally but not when deployed in azure using github + kudu integration.
It complains about the C# version being 7.3
If I manually change the autogenerated deploy script, it solves the issue.
I change the following (in Azure)
D:\home\site\deployments\tools\deploy.cmd
****** FROM ******
IF DEFINED MSBUILD_PATH goto MsbuildPathDefined
SET MSBUILD_PATH=%ProgramFiles(x86)%\MSBuild\15.0\Bin\MSBuild.exe
:MsbuildPathDefined
****** TO ******
IF DEFINED MSBUILD_PATH goto MsbuildPathDefined
SET MSBUILD_PATH=%ProgramFiles(x86)%\MSBuild\15.0\Bin\MSBuild.exe
:MsbuildPathDefined
SET MSBUILD_PATH=%ProgramFiles(x86)%\MSBuild-15.9.21.664\MSBuild\MSBuild\15.0\Bin\MSbuild
i.e. I just force it to use MSbuild15
My immediate problem is solved, but it feels like a hack. Is there a way to specify the msbuild version properly?
using this as a guide:
How do you get KUDU to use MSBuild 15
the MSBUILD_PATH is set in the app "configuration" -> "New application setting" (click the +) and then enter
Name: MSBUILD_PATH
Value: %MSBUILD_15_DIR%\msbuild.exe
and check the "Deployment slot setting"
validate by opening powershell in the kudu interface and running:
PS D:\home> echo $env:MSBUILD_PATH
Your Kudo environment should have msbuild variables for each version:
D:\home>set msbuild
MSBUILD_15_DIR=D:\Program Files (x86)\MSBuild-15.9.21.664\MSBuild\MSBuild\15.0\Bin
MSBUILD_16_DIR=D:\Program Files (x86)\MSBuild-16.4\MSBuild\Current\Bin
MSBUILD_PATH=D:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe
My azure devops build started failing without any code or build changes.
The following error is thrown in the VisualStudio Build step
Error : The value for PublishProfile is set to 'FileSystem', expected to find the file at '...\FileSystem.pubxml' but it could not be found.
Turns out this is a bug.
https://developercommunity.visualstudio.com/content/problem/754048/error-the-value-for-publishprofile-is-set-to-files.html
https://github.com/microsoft/azure-pipelines-image-generation/issues/1276
I was able to work around it for now by changing my build host image from windows-2019 to vs2017-win2016
So in my yaml
pool:
vmImage: 'vs2017-win2016' #instead of window-2019
I have a TFS 2013 build that I'm trying to get to publish to a folder on the build server. I've installed WebDeploy, but I always get the error:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets (4274): Web deployment task failed. (Could not connect to the remote computer ("localhost"). On the remote computer, make sure that Web Deploy is installed and that the required process ("Web Management Service") is started. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION_NOT_REACHABLE.)
I've set up a website on the build server and that's where I'm trying to publish the website. Actually I don't even care about publishing it per se - I just need my build output to go to a folder locally automatically. Right now we have to manually open the solution and choose Publish... to get the output that subsequent InstallShield builds need for input. Here are my MSBuild arguments. Does anyone have any idea what could be missing?
/p:SrcDir=C:\Builds\TFS\WebApps\Src
/p:RevKeyname=WebAppsRevNr
/p:DeployOnBuild=true
/p:DeployTarget=MsDeployPublish
/p:MSDeployServiceURL=https://127.0.0.1:8172/msdeploy.axd
/p:CreatePackageOnPublish=True
/p:DeployIisAppPath="WebApp"
/p:MsDeployPublishMethod=WMSVC
/p:AllowUntrustedCertificate=True
/p:AutoParameterizationWebConfigConnectionStrings=False
/p:Authtype=NTLM /p:username=""
I've checked both net start wmsvc and net start msdepsvc and both are running. Any ideas?
Thanks!
UPDATE
I've tried everything that Andy suggested and now when I run this from the command line I get this bizarre error message:
"C:\Workspace\VS2013\WebApps\Main\Src\webapps.sln" (default target) (1) ->
"C:\Workspace\VS2013\WebApps\Main\Src\CoreWebApps\CoreWebApps.csproj"
(default
target) (7) ->
(AutoParameterizationWebConfigConnectionStringsCore target) ->
C:\Program Files
(x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.Web
.Publishing.targets(2295,5): error : Could not open Source file: Could not
find
a part of the path
'C:\Workspace\VS2013\WebApps\Main\Src\CoreWebApps\Areas\Adm
in\Views\Web.config;Areas\Admin\Views\Web.config'.
[C:\Workspace\VS2013\WebApps
\Main\Src\CoreWebApps\CoreWebApps.csproj]
Any idea why it's looking for Web.config;Areas\Admin\Views\Web.config'.? That makes no sense.
Please try below items to narrow down the issue:
Try to use IP or Machine Name instead of "localhost"
Logon your build agent machine, then manually execute the same
MSBuild command within the same arguments(which you provided in build
definition) to build and deploy your solution, then check result. You
need to ensure you can manually run the same MSBuild command within
deploy argument to build and deploy your solution successfully from
build agent machine. Then use the same deploy arguments in TFS Build
definition.
Double check Web Deploy settings to make sure that the name of the
website is exactly that of what's in IIS.
Install Web Management Tools before Web
Deploy : Install the Web Management Services (Roles -> Web Server >
Management Tools > Management Services). Then uninstall Web Deploy, and then install Web Deploy again.
You can also reference this thread for your troubleshooting.
Update:
For the issue "Could not open Source file: Could not find a part of the path" you can reference below similar articles for the troubleshooting.
https://social.msdn.microsoft.com/Forums/en-US/8f959964-c951-4f9a-8486-8283a925c9f6/build-error-could-not-open-source-file-though-i-know-it-exists?forum=windowsazurewebsitespreview
https://our.umbraco.org/forum/getting-started/installing-umbraco/60222-Umbraco-721-Build-fails-after-deploy-to-Azure-WebSite (See the last two answers)
I have installed all third party setups required for "Multi Device Hybrid Apps" successfully. But when i go to run my app using Visual Studio 2013 it gives me following two errors :
Error 1: cmd: Command failed with exit code 255
Error 2: The command ""C:\Users\PC-Name\AppData\Roaming\npm\node_modules\vs-mda\vs-cli"
prepare --platform Android --configuration Debug --projectDir . --projectName "Test2"
--language "en-US"" exited with code 8.
I have checked all Environment Variables which are at there right variables.
Kindly tell me how to get rid off from above errors.....
Exit code 8 often indicates that at least one of the environment variables that Cordova requires for build has not been added to your path.
There are three environment variables that must be defined:
1) %JAVA_HOME% -- C:\Program Files(x86)\Java\jdk1.7.0_55
2) %ADT_HOME% -- C:\Users\YOUR_NAME_GOES_HERE\AppData\Local\Android\android-sdk
3) %ANT_HOME% -- C:\apache-ant-1.9.3
Note -- The paths for these tools may be different on your PC. You need to verify the actual install paths for each.
Once you have defined these variables, copy the entry below into your System path variable. Reboot PC after making these changes.
%JAVA_HOME%\bin;%ADT_HOME%\tools;%ADT_HOME%\platform-tools;%ANT_HOME%\bin;
A similar question was covered in an earlier post.
I figured out the real cause, just update your node.js or either remove spaces from project directory path.
For Example :
Before Project Directory Path : C:/Users/Jon Snow/MyProjects/ProjectName
After Project Directory Path : C:/Users/JonSnow/MyProjects/ProjectName
I am trying to retrieve Build Projects related information from my CruiseControl server through command line using cccmd.exe and passing the url and project name as command line arguments. The problem is when I am trying to use API's exposed by Cruise Control Service like
client.GetArtifactDirectory(project.Name);
client.GetLatestBuildName(project.Name);
I am getting the exception "The project does not exists on the CCNet Server" for my local CCNet Server.
For my production build server, I am getting the exception "Key cannot be null".
Finally found the solution, had to copy the folders and foldername.state files that are created during project build process to the directory from where ccservice.exe was running.