How do i formulate file path for testsettings on the Runsettings file parameter <SettingsFile> - azure

Whats the proper way to form relative file path/ or file path for the runsettings parameter
<SettingsFile>xxxxxAutomation.testsettings</SettingsFile>
In my local environment this works but when i push it to build release agents it fails since
its looking for the file in a different directory which is my release folder
but instead its looking for this file in what appears to be in a folder directory.
This is the directory its looking at E:\Agent_work\r10\a\xxxxxxxxx.testsettings,
here is my current way i have it set
<SettingsFile>xxxxxAutomation.testsettings</SettingsFile>
here is the error message
Error: The test settings file E:\Agent_work\r10\a\xxxxxxxxxx.testsettings, specified in the MSTestAdapter settings, is not available. Either access to the file is denied or the file does not exist. Ensure that the test settings file is available and try again.
instead of
E:\Agent_work\r10\a_XXXXX CI Build\drop\XXXXX_Automation_Test\bin\Release\xxxxxxxxx.testsettings
There is no documentation that states how to formulate the file path on msdn and didn't see
anything online.

I suggest you can add a Copy Files task to copy the missing file from .../bin/release folder(Use the browse option) to default working directory:
I suggest you resolve this issue via modifying your pipeline instead of settings file, so that you can also work well locally with the unchanged runsettings file.
In addition: Clean Target Folder input should be disabled(unchecked) cause our target folder is the default working folder. Deleting all files in that folder would cause unexpected issues.

Related

How to set RubyMine's default working directory to the executing .rb program's subdirectory?

In RubyMine, I have a project with many subfolders, each of which contains:
One or more standalone single-file executable Ruby programs (.rb files);
An input text file.
In older versions of RubyMine, when running one of the standalone executable programs (via Cmd+Shift+R on my Mac), the default folder in which RubyMine would look for the input file would be the same directory as the .rb file currently being executed -- which worked great.
The code used to read the file is something like:
data = File.readlines('input.txt')
However, after recently updating RubyMine to v2022.3.1, the behavior has changed, such that RubyMines now seems to be looking in the project's root directory for the file, instead of the same subdirectory as the .rb file currently being run. This produces the error:
in `readlines': No such file or directory # rb_sysopen - input.txt (Errno::ENOENT)
To correct this, I've been going into Run (menu) > Edit Configurations; and in the Edit Configurations dialog, in the configuration that RubyMine auto-created for the current executable file, changing the Working Directory value from the default of the project's root directory, to the subfolder of the current .rb file.
However, this above workaround is annoying, since I need to do it once each for every individual one of the many individual .rb executable files in my project.
My question: How can I configure my project and/or RubyMine itself to go back to the older behavior of defaulting a given .rb file to use its own directory as the default Working Directory, instead of the project's root directory?
(This question and/or its solution might also apply to other JetBrains IDEs such as IntelliJ, since they all seem to work similarly.)
The previous behaviour has been changed with https://youtrack.jetbrains.com/issue/RUBY-29236. So now yes, the logic is the following:
in case of no Ruby module, project's root will be used
in case of Rails, its home folder
otherwise the module's root
There is no option to change it in RubyMine but you can configure the configuration template using some variable there as Working directory.

Unable to run dotnet under certain directories?

I am using the command: dotnet "myfile.dll"
Initially it was giving me this error: The user's home directory could not be determined. Set the 'DOTNET_CLI_HOME' environment variable to specify the directory to use.
Now after messing around with it, I have moved my files to c:/mydir, and it is giving this error: Failed to initialize CoreCLR, HRESULT: 0x80070057. I found this, but isn't c:/mydir a drive root?
Couple of things I noted:
I am able to run the .dll fine in a different directory.
Both directories contain same files.
The reason I want to run it in c:/mydir is because I am using AWS CodeDeploy, and that is where it copies the files (as far as I know; and the other directories are just the old versions where the files get copied from).
These issues are not linked (the first one I get from running a automated shell script after installation, and the second I get from manually trying to launch the .dll).
If someone could help me solve either one of these issues it would be greatly appreciated.
Try adding Environment=DOTNET_CLI_HOME=/temp to your Service declaration in your .service file. Example syntax:
[Service]
...
Environment=VARNAME=VARCONTENTS
So the actual like would look like this
Environment=DOTNET_CLI_HOME=/temp

CSPack-created package file is missing \siteroot folder

I am using cspack command to create cspkg as part of build. The command that I am using is
cspack.exe D:\StoreSimplePortal\StorSimple-Portal\src\StorSimple.CloudService\ServiceDefinition.csdef /out:StorSimple.CloudService.cspkg /role:StorSimpleExtension;D:\StoreSimplePortal\StorSimple-Portal\out\debug-AMD64\StorSimpleExtension /sitePhysicalDirectories:StorSimpleExtension;Web;D:\StoreSimplePortal\StorSimple-Portal\out\debug-AMD64\StorSimpleExtension /rolePropertiesFile:StorSimpleExtension;D:\StoreSimplePortal\StorSimple-Portal\src\StorSimple.CloudService\RoleProperties.txt
The build succeeds but /sitesroot folder is not created. Am I missing something here.
Can you verify that the sitesroot is in the StorSimpleExtension directory? If it is not, verify that it is included in the .csproj file.
The problem seems to occur when the site physical directory parameter is too similar to the role path parameter. Try altering the path parameter to:
/sitePhysicalDirectories:StorSimpleExtension;Web;D:\StoreSimplePortal\StorSimple-Portal\out\debug-AMD64\storSimpleExtension\
Note the added '\' and lowercase directory name.
See this question for more details:
https://social.msdn.microsoft.com/Forums/azure/en-US/014ce124-5ca6-46ce-b1ea-3d677a092f65/azure-sdk-16-cspack-command-line-tool?forum=windowsazuredevelopment

trouble creating an axis 2 .aar file: xml/services not found error

I am trying to create an aar file using OSX 10.7.5 (as a part of this tutorial). To generate the .aar, I navigate to the directory holding my webservice in my eclipse workspace and type
jar cvf FirstWebService.aar ./*
This is the command that Apache says to use to generate the aar in their Code Listing 9 from the apache axis 2 documentation.
The command creates an.aar -- but something is wrong with the process that I am using to create the .aar because when I go to load the .aar file into tomcat's /webapps I get an .xml/services not found error.
I am not sure what to do to fix this error. If I search my computer's file system for the services.xml file, I can find it in /path to eclipse workspace/workspace/MyFirstWebService/WebContent/WEB-INF/services/FirstWebService/META-INF
but I am not sure if this file is supposed to be rolled in to the .aar file somehow or if I can just manually plunk this file somewhere into the apache directory structure to get the thing to run.
Note: I do not think I am manually unzipping or unpacking the aar like in this question. Axis2 web service error: services.xml not found I am just running the command listed above from the apache documentation.
Here is the .aar file
note I am using all of the same versions of the software as in the tutorial -- but I am using OSX 10.7.5 where they use windows in the tutorial. Accordingly, I have changed the make-aar command for windows shown in the tutorial (jar cvf FirstWebService.aar com META-INF) into the one shown above. If I just try to run the command from the tutorial jar cvf FirstWebService.aar com META-INF I get the same xml/services not found error. It gives this output in the terminal...
com: no such file or directory
META-INF: no such file or directory
added manifest
I found the issue. When you type the command to create the aar file you have to be in the directory .../EclipseWorkspace/EclipseProjectName/WebContent/WEB-INF/services. This directory contains /META-INF/services.xml. The process that makes the .aar file must be looking in this folder.

Microsoft.WindowsAzure.targets "The specified path, file name,or both are too long"

I am trying to publish a project to Windows Azure but get an error in the generated Microsoft.WindowsAzure.targets file related to length of paths and file names. How can I determine which is the problematic path or filename. The error relates to the "" tag in the generated file
Thanks
Martin
Already an older post - did you check this post?
Path too long error when building a windows azure service
This might reslove your issue.
Since this was still a problem for me years later and the above doesn't apply to Azure SDK v2.8, I was able to solve it by creating a symbolic link to my projects folder. Open up the command prompt as an administrator and run this:
mklink /D C:\Dev C:\Users\danzo\Source\Workspaces
Obviously you can change "C:\Dev" to whatever you want it to be and you'll need to change the longer path above to the root directory of your soltions/projects folder.

Resources