Build with gradle on windows 8.1 gives problems with desktop.ini - windows

I am trying to build a cordova app I have build in Netbeans. It fails every time and I have been able to google the problems and solve them. Now I have come to a problem I cannot fix. I am building my app with gradle, with the command:
gradlew clean build
I get the following error:
(path to cordova project)\platforms\android\build\intermediates\res\debug\xml\desktop.ini:1: error: Error parsing XML: syntax error
The problem is that windows automatically creates the desktop.ini file, when new folders are created, and this causes some problems.
I have tried to disable the creation of the desktop.ini file by adding this key to the registry:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"UseDesktopIniCache"=dword:00000000
It does not work and the desktop.ini file is still created.
Does anyone know how i can get around this? Can the creation of desktop.ini be disabled? Or can I get gradle to ignore desktop.ini?

I had to search the desktop.ini in the Application/src/main/res and Application/build folders and delete all to build the project. You may have to remove indexing of search results in windows to get the hidden desktop.ini files in the folder.

Related

Missing assets in IPA when building Xamarin iOS app using msbuild on jenkins

When building the same app (on Mac VS2019) from the same prepared zip archive with removed bin and obj folders and cleaned solution right before build I get different IPA "archives".
The one from jenkins is missing Assets.car and app icons so the app doesn't show home screen icon and splash during loading. During the _CopyResourcesToBundle target that should copy all required assets it gives:
Building target "_CopyResourcesToBundle" partially, because some output files are out of date with respect to their input files.
Because it runs into partial state it probably doesn't copy all the required files.
When building on the local machine with the same VS2019 (8.4.2) for Mac and the same Xcode (11.0) no matter when using IDE or the terminal it gives correct IPA file.
Building target "_CopyResourcesToBundle" completely.
...
Output file "bin/iPhone/Release/RssReader.app/AppIcon60x60#2x.png" does not exist.
Output file "bin/iPhone/Release/RssReader.app/AppIcon76x76#2x~ipad.png" does not exist.
Output file "bin/iPhone/Release/RssReader.app/Assets.car" does not exist.
...
bin/iPhone/Release/RssReader.app/AppIcon60x60#2x.png
LogicalName=AppIcon60x60#2x.png
Optimize=false
OriginalItemSpec=obj/iPhone/Release/actool/bundle/AppIcon60x60#2x.png
OutputPath=bin/iPhone/Release/RssReader.app/AppIcon60x60#2x.png
bin/iPhone/Release/RssReader.app/AppIcon76x76#2x~ipad.png
LogicalName=AppIcon76x76#2x~ipad.png
Optimize=false
OriginalItemSpec=obj/iPhone/Release/actool/bundle/AppIcon76x76#2x~ipad.png
OutputPath=bin/iPhone/Release/RssReader.app/AppIcon76x76#2x~ipad.png
bin/iPhone/Release/RssReader.app/Assets.car
LogicalName=Assets.car
Optimize=false
OriginalItemSpec=obj/iPhone/Release/actool/bundle/Assets.car
OutputPath=bin/iPhone/Release/RssReader.app/Assets.car
The above part is obviously not present when building on jenkins.
This looks like several other threads when others were struggling with missing assets and they were clearing some misty Xamarin cache folders, adding and removing assets to the project with rebuild, cleaning and removing bin/obj folders.
This is not the same case as app is always built on the cleared workspace in the tmp location with removed bin and obj folders and cleaned before the build. Adding/removing and moving the location of the resource also doesn't help.
Apps cannot be built on symlink locations due to msbuild internal issue.
See: https://github.com/xamarin/xamarin-macios/issues/7759

android-studio project error .zip extract: path too long

I just recently tried to extract a .zip file that contains a android-studio project from my usb key. I moved the .zip file on my desktop and then used the 'extract-all' from windows. During the extract, I get this message:
Now If I would change the name of the class, it would probably give me errors when I build gradle. Is there a way to simply override this error message ? Is this a windows issue or is it an android-studio problem (naming files too long)?
So far, I've tried extracting each file but it didn't work. I've also tried it on other computers and its the same result... Any ideas on how to proceed ?
Try using 7zip link, this will likely solve your problem!

unable to open executable Library/Developer/Xcode/DerivedData/ myAppTests.xctest/MyApp For AppTests': No such file or directory

I get an error when I'm trying to build my App saying that Xcode is unable to find some file (xctest files i believe).
FYI: I recently changed the name of the project from the sidebar in Xcode and it asked me if wanted to update the name of all the other files as well and I said yes so it probably has something to do with that.
Anyone ever experienced that?
It's a very nominal error. To solve the error:
Clean the project
Delete the derived data
Can I safely delete contents of Xcode Derived data folder?
Delete "XCTest.Framework" file from Project Navigator > Targets >
'Project Name' > Build Phases
Try cmd + shift + K to clean

Running NUnit-Console on a Mac

Apologies for the nubbery, but I'm having a real pain getting NUnit to run on my Mac. The overall goal is to have Jenkins on our Mac build server build our Xamarin project and run the relevant tests to the .sln file.
I've got NUnit-Console installed and invoking correctly on the mac. However, whenever I pass it /relative/path/to/solution.sln (or .csproj, we don't have a .nunit or built .dll), NUnit finds the the .sln file correctly, however it then throws this error: Could not find file "/relative/path/to/solution\TestProject.csproj".
The .csproj is there, but NUnit seems to want to append a backslash instead of a forward slash. Is there some config option I've missed for this?
Ok so it doesn't look like you can configure NUnit-Console to not do this. If anyone reads this and is looking for a work around, you just need to get your built files from their location, onto a location that Nunit-console running on windows can access.
For my particular use case with Jenkins as the build manager, I've set the project to build on our MAC server, then as a post build action added 'Archive for Clone Workspace SCM'. I've then setup another project called [ProjectName]Tests, which has the other project targeted in 'Source Code Management' > 'Clone Workspace'.
The test project then has my relevant calls to nunit-console as a Windows batch script and everything works as expected!
Hope this helps save others some time if they hit the same issue!

Why am I getting an Error 1309 : Error reading from file..... when attempting to use a .msi generated by InstallShield in VS 2013?

Error 1309 : Error reading from file.....
I am using VS2013 - with latest download of InstallShield Limited Edition
From VS2013 -> Solution Explorer -> Installshield Project -> Uninstall/Install: everything is fine.
If I run the installer file (right click .msi file->uninstall/install) from the directory it is compiled in everything is fine.
If I copy the .msi file anywhere else I get the above error UNLESS I copy the 'program files' directory that is also created in the DISK1 folder of installshield project.
I thought this was all supposed to be packaged into 1 file (isn't that the purpose of InstallShield?)
This question was originally posted on the flexera forum, but no one seems to be responding to questions on that forum:
https://community.flexerasoftware.com/showthread.php?214260-Error-1309-Error-reading-from-file
Any thoughts on how to fix this?
Thanks,
JB
I have solved it. When you have your InstallShield LE project ready to Build, Go into Build, Configuration Manager and change the build to SingleImage. Next do a Build. When you navigate the folders to where the CD_ROM folder is, you will see a new folder called SingleImage. As you go through that you will find the single MSI file that contains all folders. No more issues with Error 1309.
Hope that helps.
You should also ensure that the 254 character limit for the files' local url is not exceeded

Resources