Index Sources & Publish Symbols step fails in TFS 2015 - indexing

By default TFS Build creates a "Index Sources & Publish Symbols" step in a Visual Studio Build definition. When the step's property "Path to publish symbols" is empty, everything works fine. But when setting the path to a local directory, the step generates the following error:
2015-09-25T11:00:09.7991491Z Executing the powershell script: C:\NewAgent\tasks\PublishSymbols\1.0.4\PublishSymbols.ps1
2015-09-25T11:00:10.0022755Z Find-Files -SearchPattern **\bin\**\*.pdb -RootFolder C:\NewAgent\_work\990dcb3f\Projects
2015-09-25T11:00:10.0491548Z Found 15 files to index...
2015-09-25T11:00:10.0491548Z Invoke-IndexSources -RepositoryEndpoint <repositoryEndpoint> -SourceFolder C:\NewAgent\_work\990dcb3f\Projects -PdbFiles <pdbFiles>
2015-09-25T11:00:10.6272794Z Invoke-PublishSymbols -PdbFiles <pdbFiles> -Share C:\DebugSymbols -Product EntityMapper -Version 20150925.14 -MaximumWaitTime 7200000 -MaximumSemaphoreAge 1440 -ArtifactName
2015-09-25T11:00:10.7348541Z ##[error]Can't infer artifact type from artifact location C:\DebugSymbols.
2015-09-25T11:00:10.7504779Z
2015-09-25T11:00:10.7504779Z Start: AssociateArtifact
2015-09-25T11:00:10.7504779Z ##[error]Artifact Type is required.
2015-09-25T11:00:10.7504779Z End: AssociateArtifact
The pdb files are published to the specified directory, so i don't really understand what is causing the error (which then causes the whole build job to fail).

When the step's property "Path to publish symbols" is empty, everything works fine.
Yes, because if symbols path is not set, the script only index sources, not publishing symbols.
But when setting the path to a local directory, the step generates the error
You need prepare your symbol store. In your case setup folder sharing and permissions.

In my case changing the "Path to publish symbols" from
//myserver/symbols
to
\\myserver\symbols
solved the issue. Don't know why this happend to me but ok... :)

Related

IntelliJ throws "init terminating in do_boot", but same erl command works in Windows command line

Setup: IntelliJ IDEA 2022.2.2, Erlang 25.0
I am trying to run the Erlang code available at https://erlangbyexample.org/send-receive. I am able to run in werl and Windows command line. But I am getting the error "init terminating in do_boot" when I run in IntelliJ.
I checked a similar issue reported in this question , wherein the solution was to convert list input to integer/s. However, my Erlang code does not expect any input, it just expects the function name.
Please provide a pointer to resolve the issue.
"C:\Program Files\Erlang OTP\bin\erl.exe" -pa F:/1TB/P/workspace-IntelliJ-Erlang1/out/production/workspace-IntelliJ-Erlang1 -pa F:/1TB/P/workspace-IntelliJ-Erlang1 -eval send_recv:run(). -s init stop -noshell
{"init terminating in do_boot",{undef,[{send_recv,run,[],[]},{erl_eval,do_apply,7,[{file,"erl_eval.erl"},{line,744}]},{init,start_it,1,[{file,"init.erl"},{line,1234}]},{init,start_em,1,[{file,"init.erl"},{line,1220}]},{init,do_boot,3,[{file,"init.erl"},{line,910}]}]}}
init terminating in do_boot ({undef,[{send_recv,run,[],[]},{erl_eval,do_apply,7,[{_},{_}]},{init,start_it,1,[{_},{_}]},{init,start_em,1,[{_},{_}]},{init,do_boot,3,[{_},{_}]}]})
Crash dump is being written to: erl_crash.dump...done
I configured RunConfiguration to BUILD before RUNNING ("Before launch" section). As result, RunConfiguration was creating an empty folder "../out/production/workspace-IntelliJ-Erlang1" without .beam files, if the folder does not exist. It would delete any existing .beam files if the folder exists. Hence, the RUN was failing eventually.
As a workaround, I removed the BUILD before RUNNING option from RunConfiguration. And, I manually built using BuildProject before RunConfiguration.
TODO: I will check why was not RunConfiguration able to generate the .beam file.
Check if there is a file called send_recv.beam in either of the directories specified as code path in the -pa arguments. (The undef error means that it can't find the function send_recv:run/0, more often than not because it can't find the compiled module.)
My guess is that this file is actually in the directory where you ran Erlang from the command prompt, but IntelliJ runs Erlang using another working directory. The current working directory is part of the code path by default, which would be why this works from the command prompt but not within IntelliJ.

CodePipeline ElasticBeanstalk [ERROR] An error occurred during execution of command [app-deploy] - [CheckProcfileForDotNetCoreApplication]

I've built a Code Pipeline (Source > Build > Deploy) and it's failing on the deploy step.
It's a Net Core 3.1 Api project.
I check the elastic beanstalk logs and I see:
2020/07/02 14:14:00.600060 [ERROR] An error occurred during execution of command [app-deploy] - [CheckProcfileForDotNetCoreApplication]. Stop running the command. Error: error stat /var/app/staging/MyApi/MyApi.dll: no such file or directory with file /var/app/staging/MyApi/MyApi.dll
As far as I know I have no control over /var/app/staging/ and this is built in AWS stuff?
The build step is working so I am unsure on this error.
My buildspec.yml is:
version: 0.2
phases:
build:
commands:
- dotnet publish -c release -o ./build_output ./MyApi/MyApi.csproj
artifacts:
files:
- '**/*'
base-directory: 'build_output'
This is the "zipfile/build_output" folder:
This is the zip file root folder:
These are the files in the build artifacts zip file that pipeline is using. The error says it cannot find MyAppName.dll (renamed to MyApi in the pic). It's there so I wonder why the problem.
Perhaps it doesnt like the folder structure in the zip file - see pic.
I had the same problem.
In my case, if the solution name and project name were different, I got the same error when I deployed the code from Visual Studio to Beanstalk, but when I added a project with the same name as the solution name and built it, I didn't get an error.
I suspect that there will be behavior during deployment that assumes the .dll file has the same name as the solution name.
Warning: This is a workaround, not a solution!
On the project that's failing to deploy, change the "Assembly name" in Project Properties / Application tab, to the name of the DLL it's missing (typically the solution name or the first period-separated part of the namespace).
i.e. "SLNNAME"
Then, redeploy your beanstalk app and it should work.
As Marcin correctly noticed, the indentation was incorrect for the "base-directory"
base-directory: 'build_output'
Should be
base-directory: 'build_output'
As others have noted, it is looking for only the first part of your project name .dll. In my case, my project and Assembly name were both UC.Web which yielded the error during deployment:
Error: error stat /var/app/staging/UC.dll: no such file or directory with file /var/app/staging/UC.dll
My solution that worked was I renamed my Assembly name from UC.Web to simply UC and it deployed successfully. While a solution for everyone, it is a workaround for the time being until Amazon fixes this.

ASP.NET 5 site fails to publish to azure appservice because of a long path

I'm trying to publish a relatively new ASP.NET site to azure appservice from Visual Studio.
I'm getting the following error message during the preview:
The "Dnu" task failed unexpectedly.
System.Exception:
Microsoft .NET Development Utility Clr-x86-1.0.0-rc1-16231
Copying to output path C:\Users*****\AppData\Local\Temp\PublishTemp*****************.********.WebApi114
Error: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
at Microsoft.DNX.Tasks.Dnu.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext()
Path is long indeed. How do I fix it?
Error is from windows file API, not control by Azure App Service. Sadly I think you will have to find a way to shorter your file path in order to fix this issue.
I was running into the same issue trying to build an Angular2 app locally. So I tend to agree with Xiaomin that it may be a local issue. What worked for me was to run the dnu publish command from a command prompt with the output flag set with a shorter folder destination provided. For example, navigate to the location of the project you want to publish in a command prompt and type:
"dnu publish --runtime active -o c:\Sample"
The above command will post your output to c:\Sample.
You can interrogate the options as follows:
"dnu -help"
"dnu publish -help"

Cannot run Cordova Applications using Visual Studio 2013

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

MSBuild throws 'name too long' on project if called from Jenkins but not CMD

If I run the following command manually everything compiles fine.
cd D:\Jenkins\[redacted]\Api>
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe /property:Configuration=Release Api.sln
If I run the same command (copy/paste) from Jenkins MSBuild gives me the following error for one of my projects
"D:\Jenkins\[Redacted]\Logic\[Redacted].Api2.Logic.csproj" (default target) (26) ->
(GenerateSatelliteAssemblies target) ->
ALINK : error AL1061: Cannot set option 'description' because 'The file name is too long. '
Why does the MSBuild work when running through the CMD but not via Jenkins? It doesn't look like a permissions issue and only one project out of many that hasn't been touched in months breaks.
Even the error message is a little odd - There is no description in the assemblyinfo and there are much longer file names that compile without issues in the solution.
What could be causing this? The best I could find is this http://connect.microsoft.com/VisualStudio/feedback/details/728795/error-al1061-when-building-satellite-assemblies-with-long-names which was of no use.