I am having some serious grief trying to publish my mvc6 application due to a powershell file blockage. I ran powershell as an administrator and adjusted the execution policy. But it doesnt seem to have any impact on the publishing process in vs2015. Further to that i even tried in vain to run the Unblock-File cmdlet in the NPM.
Anyone have any ideas about how I can get this to work? the full error is below:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.DNX.Publishing.targets(386,5): Error MSB4018: The "InvokePowerShell" task failed unexpectedly.
System.Management.Automation.PSSecurityException: AuthorizationManager check failed. ---> System.Management.Automation.Host.HostException: A command that prompts the user failed because the host program or the command type does not support user interaction. The host was attempting to request confirmation with the following message: Run only scripts that you trust. While scripts from the internet can be useful, this script can potentially harm your computer. If you trust this script, use the Unblock-File cmdlet to allow the script to run without this warning message. Do you want to run G:\_PIPELINE_MANAGEMENT\_SOURCE\_MANAGEMENT\_2016\ProjMgr\src\ProjMgr\Properties\PublishProfiles\ProjMgr-publish.ps1?
at System.Management.Automation.Internal.Host.InternalHostUserInterface.ThrowPromptNotInteractive(String promptMessage)
at System.Management.Automation.Internal.Host.InternalHostUserInterface.PromptForChoice(String caption, String message, Collection`1 choices, Int32 defaultChoice)
at Microsoft.PowerShell.PSAuthorizationManager.RemoteFilePrompt(String path, PSHost host)
at Microsoft.PowerShell.PSAuthorizationManager.CheckPolicy(ExternalScriptInfo script, PSHost host, Exception& reason)
at Microsoft.PowerShell.PSAuthorizationManager.ShouldRun(CommandInfo commandInfo, CommandOrigin origin, PSHost host, Exception& reason)
at System.Management.Automation.AuthorizationManager.ShouldRunInternal(CommandInfo commandInfo, CommandOrigin origin, PSHost host)
--- End of inner exception stack trace ---
at System.Management.Automation.Runspaces.AsyncResult.EndInvoke()
at System.Management.Automation.PowerShell.EndInvoke(IAsyncResult asyncResult)
at Microsoft.Web.Publishing.Tasks.InvokePowerShell.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
Done executing task "InvokePowerShell" -- FAILED.
Done building target "PowerShellPublish" in project "ProjMgr.xproj" -- FAILED.
Done building project "ProjMgr.xproj" -- FAILED.
Done executing task "MSBuild" -- FAILED.
Done building target "FileSystemPublish" in project "ProjMgr.xproj" -- FAILED.
Done building project "ProjMgr.xproj" -- FAILED.
2>Publish failed due to build errors. Check the error list for more details.
Create another publish profile and try again.
For me this works.
I managed to get it to publish by copying my entire project folder to the root of my local. Must be a folder permissions issue somewhere...
Related
I'm trying to work with release in TFS, I add a task a "Copy Publish Artifact" to publish a file that will be generated in a release it gives me the error:
##[error]System.Management.Automation.ParameterBindingValidationException: Cannot bind argument to parameter 'StagingFolder' because it is null.
I test with the task "Windows machine file copy" it gives the error 53
Copy started for - '\\documents-oab.si.fr.intSraorange\alfresco\webdav\Sites\cc-dtp\documentLibrary\andbox_Auto /user:***** *****'
2018-05-07T08:43:15.7623208Z ##[error]System.Management.Automation.RuntimeException: Copying failed for resource :
2018-05-07T08:43:15.7623208Z
2018-05-07T08:43:15.7623208Z Failed to connect to the path \\documents-oab.si.fr.intSraorange\alfresco\webdav\Sites\cc-dtp\documentLibrary\andbox_Auto /user:***** ***** with the user ***** for copying.
2018-05-07T08:43:15.7623208Z System error 53 has occurred.
2018-05-07T08:43:15.7623208Z The network path was not found.
My questions is: how can i publish file generated in a release is there any method ??
You can not publish an artifact in a release using staging folder, because it really does not exist. It is a build variable only.
When you used the "Windows machine file copy", is is showing you in the log that "The network path was not found.".
Or it really does not exist or the user running the task nas no permission to access it.
To copy a file to one location to another you could:
Use a Windows Machine File Copy
Use a File copy task
Use a powershell command to copy files
Use a command line to copy files
I have to update our build-system from the old "XML-System" to the newer vNext.
Now I have the problem, that in a build progress, I'm getting errormessages from ligther.exe:
[error]light.exe(0,0): Error LGHT0217: Error executing ICE action 'ICE01'. ...
up to ICE07.
And at the end:
[error]light.exe(0,0): Error LGHT0216: An unexpected Win32 exception with error code 0x643 occurred: Action - 'ICE09' Fatal error during installation
When I make the same build with the "old" XML-Version it works without any problems, any ideas?
Thanks a lot.
Kriz
According to the error prompting message: An unexpected Win32 exception with error code 0x643 occurred: Action - 'ICE09' Fatal error during installation
It's probably a permissions problem with validation. You could try to give the build service account more privileges such as local administrator permission on the build agent.
Besides, there are no tools to convert XAML build definition to vNext directly, so please double check you have manually created fully in a accord.
I saw this issue only on the build machine, where the build task has no admin rights.
I didn't saw this on my developer machine, where I have admin rights. This error is written by the light.exe, which is the Windows Installer XML linker contained in the Wix Toolset.
In order to solve this I suppressed validation of the light.exe. This can be done in two different ways:
On the commandline of light.exe
-sval
On the commandline, when using WixSharp
Compiler.LightOptions = "-sval";
(26.07.2016)I am using TFS2015 Update3 in a VM.
When I try to queue a build through the web interface or from Team Explorer, I get the following.
Then I restart all services related to TFS in services.msc and then after some time it starts working again.
So this happens too often.
I have a custom pool running:
Is there a way to debug this behaviour?
Examining the Log files
Link to Worker log file
Link to Agent log file
Exception occurs in this order here:
Checking if artifacts directory exists C:\workspaces\agent\_work\2\a
Deleting artifacts directory
System.ComponentModel.Win32Exception (0x80004005): The directory is not empty
at Microsoft.TeamFoundation.Common.FileSpec.DeleteDirectoryLongPath(String path, Boolean recursive, Boolean followJunctionPoints)
The weird thing is, queueing new build works most of the time, this happens only sporadically
It could be, that I have opened a file from that folder in notepad with many tabs open. Will observe if this issue persists and report.
If this is happening sporadically, it might a long path exists here in artifacts:
C:\workspaces\agent_work\2\a
Or, there was a cancelled build which left the artifact directory half cleaned which exposed a bug in cleaning.
The 2.x agent isn't subject to long paths (net core) but only works with 2017+:
https://github.com/Microsoft/vsts-agent
We can troubleshoot but it would be good to get to 2017+ (2018 QU3 is out) with a 2.x agent.
If that's not an option, message me and we can dig into what I think is a cancel / state bug.
I'm trying to setup Standard Lab Environment with TFS 2012 utilizing Build-Deploy-Test workflow. I setup test controller and test agents but when the LabManagement workflow starts executing I get an exception on RunDeploymentTask activity
Initial Property Values
BuildLocation = \\S0503TFS2T\TFSPlayground\ConsoleApplicationBuild\ConsoleApplicationBuild_20121210.23
DeploymentScriptDetails = agent1 | "$(BuildLocation)\Deploy.bat" $(BuildLocation) | c:\Env
LabEnvironmentUri = vstfs:///LabManagement/LabEnvironment/4
MaxWaitTime = 00:30:00
ThrowOnError = True
UseRoleForDeployment = True
Deployment Task Logs for Machine: win7testagent1
Access is denied
Exception Message: Team Foundation Server could not complete the deployment task for machine 'win7testagent1', script '"\\S0503TFS2T\TFSPlayground\ConsoleApplicationBuild\ConsoleApplicationBuild_20121210.23\Deploy.bat"', arguments '\\S0503TFS2T\TFSPlayground\ConsoleApplicationBuild\ConsoleApplicationBuild_20121210.23' and working directory 'c:\Env'. (type LabDeploymentProcessException)
Exception Stack Trace:
Server stack trace:
at Microsoft.TeamFoundation.Lab.Workflow.Activities.RunDeploymentTask.ExecuteDeploymentTask.RunCommand(AsyncState state)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase)
at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData)
at System.Action`1.EndInvoke(IAsyncResult result)
at Microsoft.TeamFoundation.Lab.Workflow.Activities.RunDeploymentTask.ExecuteDeploymentTask.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
Apparently, this is security issue, that i cannot get over it
Here's how this process is explained by MSDN:
The build-deploy-test workflow starts a build, and then gets the deployment scripts.
The build definition copies the build files to the drop location.
The workflow runs each deployment script in the working directory of the specific machine or machine role that the script is assigned to.
Each deployment script retrieves build files from the drop location.
Each deployment script copies or installs the specified build files onto machines in the lab environment.
At this point the problem shows up - the workflow runs each deployment script in the working directory of the specific machine.
Both machines are in the same domain the user that runs the Build service is also in the administrators group in the remote machine. I have even shared the remote folder where the workflow is supposed to copy the files/script with everyone in the network but no luck again.
I'm doing something stupid that driving me crazy - any help or thoughts are greatly appreciated!
Best,
Rado
The following solution may fix your problem.
Steps: Create local account on the following server: local lab service account - tfslab
tfs test controller server: create local tfslab account. Also configure the tfslab as lab service account in test controller configure console
tfs test agent server: create local tfslab account and add tfslab to local admin group. Also update Visual Studio Test Agent service and Visual Studio Lab Agent Service to run as tfslab.
tfs drop folder server: create local tfslab account. And add share read permission to tfs drop folder.
Details discussion see here.
You may try to check %ErrorLevel% at the last of your bat script. I met the same error, and it turned out that that error was caused by exit code of robocopy, which returns 1 when the copy successes. I set the error code to 0, the issue was fixed.
We are using sikuli tool for mobile automation on our MAC OSX 10.7.3 I have written a shell script to open simulator and to run scripts on simulator:
SikuliScript.sh
/Users/ezprintsqa/Downloads/FoneMonkey/bin/iphonesim launch /Users/ezprintsqa/Documents/Xcode/DerivedData/SnapCards-btmjdowsgmixpvdyfxfvhxtoihab/Build/Products/Debug-iphonesimulator/SnapCardsFoneMonkey.app&
/Users/ezprintsqa/Downloads/Sikuli-IDE.app/sikuli-ide.sh -r /Users/ezprintsqa/Downloads/SikuliWorkSpace/SnapcardsTestSuite1.sikuli
When I execute from command line I can see simulator opening and scripts getting executed on simulator.
But when I run from Jenkins I am getting the following error:
[JavaAppLauncher Error] CFBundleCopyResourceURL() failed loading MRJApp.properties file
[DEBUG] Could not start simulator session: Error Domain=DTiPhoneSimulatorErrorDomain Code=5 "Operation failed with underlying error 4294956486." UserInfo=0x100305c70 {NSLocalizedDescription=Operation failed with underlying error 4294956486., NSUnderlyingError=0x100300610 "The operation couldn’t be completed. (OSStatus error -10810.)"}
[LaunchRunner Error] No main class specified
[JavaAppLauncher Error] CallStaticVoidMethod() threw an exception
Exception in thread "main" java.lang.NullPointerException
at apple.launcher.LaunchRunner.run(LaunchRunner.java:113)
at apple.launcher.LaunchRunner.callMain(LaunchRunner.java:51)
at apple.launcher.JavaApplicationLauncher.main(JavaApplicationLauncher.java:61)
Any suggestions will be very helpful
It definitely looks like a permission issue. The official Jenkins installer for Mac sets up Jenkins to run either as user "daemon" or user "jenkins". You need to make tools needed by Jenkins readable and executable by that user. Also, they need to be in a directory which is readable and executable by that user.
However, even if you get the permissions fixed, you will probably have further problems with your test run. The official Jenkins installer for Mac sets up Jenkins to run as a launch daemon. These run in the system context and they have no access to any desktop or GUI session, which means it is not possible to draw windows on the screen => Any tool that displays windows, like iPhone Simulator or Sikuli is going to fail.
You could try my unofficial Jenkins.app instead, which should solve your problem. It is available at https://github.com/stisti/jenkins-app (download it under the Downloads tab.)