Windows Mobile Compact Framework Build Error: CAB file … could not be created - compact-framework

I get the following error when trying to build a .CAB in visual studio on my new PC. The source is identical. The Registry warnings are not present on the old PC either.
Windows CE CAB Wizard
Warning: Section [RegKeys] has no data
Warning: Section [DefaultInstall] key "AddReg" - there are no section entries to process
Error: CAB file "D:\Dev\...\MyProject.CAB" could not be created
ERROR: The Windows CE CAB Wizard encountered an error. See the output window for more information.
No other errors show in the build log for the cabwiz.exe build step.
Any suggestions?

Move the source code to C: drive and build it there, instead of D: drive.
It appears that when cabwiz.exe (Visual Studio) is installed on C: drive, it does not like building projects on D: drive.
Similar issues with network drives noted at http://windowsmobilepro.blogspot.co.uk/2005/11/error-cab-file-could-not-be-created-no.html

Finally I found an answer. All my problems comes from the 8.3 file name generation.
You have to check two thing.
Registry key NtfsDisable8dot3NameCreation under
HKLM/SYSTEM/CurrentControlSet/Control/FileSystem
Valid values are:
0 - Disable 8.3 name generation
1 - Enable 8.3 name generation
2 - Name generation will be evaulated by volume settings
Matty Brown suggested the following (not tested, but may help):
Valid values are (Windows 10 1809):
0 - Enable 8dot3 name creation on all volumes on the system
1 - Disable 8dot3 name creation on all volumes on the system
2 - Set 8dot3 name creation on a per volume basis
3 - Disable 8dot3 name creation on all volumes except the system volume
Volume based settings.
You need an admin command prompt. Check 8.3 name generation with
fsutil 8dot3name query d:
where "d:" is your volume
If the result inform you that your volume has disabled 8.3 name generation, you can set it easily with
fsutil 8dot3name set d:
Two more step is needed. You need a restart, and you have to move files from there and move it back to the original place.
The 8.3 name generation linked to the file operations.
Thats all.
I'm happy now with my new W10 ultrabook with VS2008 and a big WinCe 6 solution.

I know it's a bit too late, but I'll leave this tip for future visits:
Check for whitespaces in Solution & CAB project paths, and also in file names.

I ran into this error while trying to build a legacy CAB project on our new TFS Build Server running Windows 2012. Ironically, the script to build the mobile app and CAB project worked fine on my local development machine, but go the vague "Windows CE CAB Wizard Error: CAB file XXXXXX could not be created" error when I ran it on the build server, via both a TFS build definition or manually.
The article previously mentioned at http://windowsmobilepro.blogspot.co.uk/2005/11/error-cab-file-could-not-be-created-no.html was very thorough and helpful. I used the SUBST trick to shorten the project path and eliminate the spaces in the path names, and the script could then run on TFS / Win2012.

Related

Visual studio 2019 Test is failing with error "System.ComponentModel.Win32Exception (0x80004005): This program is blocked by group policy

I had recently upgraded to Visual studio 2019 from 2017. The tests (xunit) was working fantastic until this update. But after updating, when i run my tests it just says "Outcomes Not Run".!!! strange, even it doesn't shows any details of any error under Output window, later found we have to manually change
"Show output from: " drop-down in Output window to "Tests" to see that. I got these details as below
System.Runtime.InteropServices.COMException (0x89710016): Unable to start program C:\Users\bb00001\.nuget\packages\microsoft.testplatform.testhost\16.5.0\build\netcoreapp2.1\x64\testhost.exe.
This program is blocked by group policy. For more information, contact your system administrator.
Since I works in a very restrictive environment, understood i cant run any exes under that location since GP restriction. But got access to particular locations under C Drive.
Is there anyway I can change my testhost.exe file location? which visual studio can pickup the exe from a configured path?
After referring the link https://learn.microsoft.com/en-us/nuget/consume-packages/managing-the-global-packages-and-cache-folders,
I had set an environmental variable like below, where i set a new nuget-package source which my group policy allows me to run applications
This will automatically override the default location to newly setup location. Later restart the visual studio and rebuild the solution, it must add all the dependencies to new location. It worked for me. Not sure this issue will occur to anyone else, but maybe helpful, if someone with need.

Installing Orafce.sql 3.0 in Windows 7

As mention in Orafce Install.orafunc:
..install Orafce functions in the database, either run the orafce.sql script using the pgAdmin SQL tool..
I tried running the orafce--3.0.sql in pgAdmin sql editor. This give me error
ERROR: could not access file "MODULE_PATHNAME": No such file or directory.
What do you mean by module path?
Installed program:
strawberry perl with DBD::Oracle
postgresql 9.3
pgAdmin III
Not fully installed:
ora2pg
I tried installing ora2pg...with a problem.
H:\PostgreSQL\ora2pg-12.1>perl makefile.pl
Unparsable version '' for prerequisite DBD::Oracle at makefile.pl line 553
Generating a dmake-style Makefile
Writing Makefile for Ora2Pg
Writing MYMETA.yml and MYMETA.json
Done...
H:\PostgreSQL\ora2pg-12.1>dmake && dmake install
"Installing default configuration file (ora2pg_dist.conf) to C:\ora2pg"
Appending installation info to C:\strawberry\perl\lib/perllocal.pod
dmake: Warning: -- Target [install] was made but the time stamp has not been up
dated.
Suggested Solution:
I downloaded a copy of orafce from okbob github
Unzip the file to folder D:/Postgresql/orafce-master
I copy only the following files
orafce--unpackaged--3.0.6.sql
orafce--3.0.6.sql
orafce.control
to folder C:\Program Files\PostgreSQL\9.3\share\extension
Then I try running this command in pgAdmin III sql tools.
CREATE EXTENSION orafce;
I received this Warning and Error.
[WARNING ] CREATE EXTENSION orafce
ERROR: syntax error in file "C:/Program Files/PostgreSQL/9.3/share/extension/orafce.control" line 1, near end of line
I checked orafce.control content. It has this config.
# intarray extension
comment = 'Functions and operators that emulate a subset of functions and packages from the Oracle RDBMS'
default_version = '3.0.6'
module_pathname = '$libdir/orafunc'
relocatable = false`
I can't pass to this wall. What seems the problem?
So, you are working with source raw files. You should to compile these files first - and later you can use it. It is relative simply on Unix like platforms, where C compiler is usually available, and pretty hard on MS Windows, where you have to install C compiler first.
I afraid so we lost pgFoundry archive, where was orafce precompiled and packed.
Almost all Linux distributions support orafce directly - and you can install it without compilation from repositories.
see http://wiki.postgresql.org/wiki/Building_and_Installing_PostgreSQL_Extension_Modules
$libdir is symbol, that is used for PostgreSQL extensions directory. It can be different for any platform - and it is replaced inside compilation stage by actual value. MODULE_PATHNAME has similar meaning. In compilation stage is replaced by valid actual path to library with compiled code.
I am sorry - we don't provide a compiled files - mainly due high risk for MS Windows. We have no forces, and tools to maintain all Win safely. In this moment, you can:
try to contact someone who use orafce for windows for backup of orafce installers
try to compile this extension by self (Microsoft Visual Studio Express edition is free and downloadable on internet).
other possibility is migrate database server to Linux - almost all database maintenance and usage is more simply and more robust there (due missing viruses, antiviruses and less resource requests). The Linux is primary platform for Oracle too.
some tutorials:
http://blog.2ndquadrant.com/compiling-postgresql-extensions-visual-studio-windows/
http://www.scribd.com/doc/40725510/Build-PostgreSQL-C-Functions-on-Windows

Deploying ClickOne application with network share

We have a server PC and other client PCs working connected to server using LAN. We have a application for our internal use which is developed using VB.Net. I used steps in http://www.codeproject.com/Articles/17003/ClickOnce-Quick-steps-to-Deploy-Install-and-Update to deploy clickone statergy for updating our application.After publishing while installing application,this error is coming
I searched i details and found this error
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of D:\Desktop\publish\Global.application resulted in exception. Following failure messages were detected:
+ Downloading file:///D:/Desktop/publish/Application Files/Global_1_0_0_0/Global.XmlSerializers.dll.deploy did not succeed.
+ Could not find file 'D:\Desktop\publish\Application Files\Global_1_0_0_0\Global.XmlSerializers.dll.deploy'.
+ Could not find file 'D:\Desktop\publish\Application Files\Global_1_0_0_0\Global.XmlSerializers.dll.deploy'.
+ Could not find file 'D:\Desktop\publish\Application Files\Global_1_0_0_0\Global.XmlSerializers.dll.deploy'.
I have checked Application files in publish options and Global.XmlSerializers.dll is included. Anyone know why this is happening?
Is there any way to copy some extra files to installation folder(C:\Users\name\AppData\Local\Apps..) when installing or updating clickone application? Because we use some outside support files for our application. Is it possible?
Is there any way to pass argument to clickone application short cut,like passing argument to .exe shortcut("\Global.exe" ?/?customer?/?)?
EDIT:
This is how I published
I checked by giving network path for publishing folder location.But same error coming.
Here is application files included
As you can see Global.XmlSerializers.dll is included
It is looking for a file on the D: drive. It is unlikely that your users all have their D drive mapped to the same location. When you publish you should use the full path rather than mapped drive letters.
//Servername/shareddirectory/appdirectory
Does the install work for you?
Well, there no magic involved in ClickOnce: you can just look into the deployment folder - is the required file there or not?
If not, you need to change the settings in the Publish options for the required file. This message - in my experience - is always a sign that one of the required assemblies has not been published.
In addition it seems that you published to a mapped network drive instead of publishing to an UNC path. You need to publish to a path following the \\server\name\ scheme.
When I have used the wizard and deployed to a network share, in the Publish Wizard:
Specify the location to publish this application:
UDP Path
Click Next
How will users install the application?
From a UNC path of file share
Specify the UNC path:
The same UDP Path (copy pasted from before)

Error LGHT0301: Failed to open the database

I'm using WiX 3.5. Recently, the following WiX error started occurring frequently on the build server:
light.exe (,): error LGHT0301: Failed to open the database. During validation, this most commonly happens when attempting to open a database using an unsupported code page or a file that is not a valid Windows Installer database. Please use a different code page in Module/#Codepage, Package/#SummaryCodepage, Product/#Codepage, or WixLocalization/#Codepage; or make sure you provide the path to a valid Windows Installer database.
Which "database" does the error refer to? (None of the WiX source files have changed in a long time, so I doubt it's a code page problem.)
Other people have reported that this error may be caused by Trend Micro Office Scan, which is indeed installed on the build server. I asked the system administrator to exclude the build directories from the scan, but this error still occurs. How can I determine whether the virus scanner is the culprit? (The error doesn't always occur, so if I disable the virus scanner and the next build succeeds, I still don't know whether the error has gone away permanently.)
The "Disable the ICE validation" worked for me - just a setting through Visual Studio 2012 in the .Setup.
After studying the WiX source code and running Process Monitor, I found that excluding the build directories from the virus scan is insufficient.
Explanation: When light.exe runs, it creates the target MSI file in a temporary directory. (This file is the database that the LGHT0301 error message refers to.) After light.exe closes the MSI file, ntrtscan.exe opens the MSI file for read access and read-only sharing. Later, in the database validation step, light.exe tries to reopen the MSI file for read/write access, and a sharing violation occurs.
Solution: Exclude the temporary directory from the real-time virus scan. On Windows Server 2008, for example, this directory is C:\Users\«username»\AppData\Local\Temp.
This is a common problem with build processes and antivirus. The scanner will detect the new MSI package and try to scan it. Meanwhile the build process also tries to validate it by running the Internal Consistency Evaluators (ICE) suite and you get a failure because the database has a mutex on it.
You should just remove the virus scan from your build output folders. Alternatively decouple the validation from the Light command so that the antivirus scan relinquishes the MSI handle before you run the ICE validation.
I had the same problem which was actually really related to codepages and language settings of my system.
Adding English input language in Windows' regional settings solved the problem on my German Windows installation.
The real cause was Trend Micro real time scanning!
(The following is only for historical reference)
I followed #Michael Liu answer and solved the problem
I had the same problem.
I am not referring to Codepage (or SummaryCodepage) in any of those tags, or in fact anywhere in the WXS. Putting Codepage="1252" didn't change anything.
Finally, I tried adding
encoding="utf-8"
to the XML tag which previously only had a version='1.0' attribute. This fixed the problem, as described in "Failed to open the database" error. - SOLVED
It was also the antivirus program for me.
An easy way to check if the problem is related to the anti-virus program is to disable the ICE validation in the WiX project setting (using version 3.7). This worked for me, and is a permanent setting now, since in our company you can't change the setting of the antivirus software.
This is the most common error I found while using WiX. The easiest solution for this is go to Properties of your project → Tool Settings → (Check) Suppress ICE Validation.

Microsoft Office Excel cannot access the file

I have create Office Excel application in my machine(XP). and i have placed the application in windows server 2008 giving the following error.
Microsoft Office Excel cannot access the file '\server\Input.xls'. There are several possible reasons:
The file name or path does not exist.
The file is being used by another program.
The workbook you are trying to save has the same name as a currently open workbook.
both client and server systems installed office 2007 and added reference microsoftexcellibrary 12.0
created assembly for the application and calling the code from the form.
I was getting the exact same error, although in my case I was trying to run (from Tidal Enterprise Scheduler) a .NET app that used microsoft.interop.excel.
The answer is already in stackoverflow:
[Microsoft Office Excel cannot access the file 'c:\inetpub\wwwroot\Timesheet\App_Data\Template.xlsx'.
I'll re-list the steps from that link:
Create directory “C:\Windows\SysWOW64\config\systemprofile\Desktop” (for 64 bit Windows) or “C:\Windows\System32\config\systemprofile\Desktop” (for 32 bit Windows)
Set full control permissions on Desktop directory above (for example in Win7 & IIS 7 & DefaultAppPool set permissions for user “IIS AppPool\DefaultAppPool”)
Of course, if you're running a scheduled task rather than WebApp, you'll need to make sure the service account you're using has permissions on that folder.
I had the same error when trying to save to:
C:\test.xlsx
When attempting to save to the root directory, it seemed to cause problems. Changing my path to:
C:\MyExcelTests\test.xlsx
Worked fine
I would make sure no Excel processes are running on the machine before you run this application, that should cover the last point.
The first point looks the most likely issue, the path looks like a partial path or an incorrect UNC path. Try putting the full path to the spreadsheet 'C:\server\input.xls' and see if that works.
To stop the middle point, in the workbook.open command you can specify to open as read-only, this will make sure the application can red the file even if it is locked open by another user.