Application configuration is incorrect????What to do? - visual-studio-2010

i run my application in visual studio 2010 express and when i run,it gives me an error that:-
"the application has failed to start because application configuration is incorrect.Review the manifest file for possible errors"
My manifest file looks like this:-
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
</requestedPrivileges>
</security>
</trustInfo>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.VC80.DebugCRT" version="8.0.50727.6195" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50727.6195" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
</dependentAssembly>
</dependency>
</assembly>
How to resolve it?

The manifest file contains references to Visual Studio 2008 runtime, but you're compiling it in VS2010. That seems to be the reason for the error.

Related

excluding my executable from the Program Compatibility Assistant

I'm trying to have a executable excluded by the PCA. After reading this, I used resource hacker to add a manifest with administrator permission. But after doing that, although the application now prompts for administration privilege it still isn't excluded by the PCA.
I want this executable excluded by PCA in all windows version after Windows XP. The reason being it no longer works properly after running it once. On first run it works correctly, but after the first run and PCA added it to its list of programs it no longer works.
This is the manifest I inserted and I'm using windows 10.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!--This Id value indicates the application supports Windows Vista functionality -->
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
<!--This Id value indicates the application supports Windows 7 functionality-->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
<!--This Id value indicates the application supports Windows 8 functionality-->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
<!--This Id value indicates the application supports Windows 8.1 functionality-->
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
</application>
</compatibility>
<assemblyIdentity type="win32"
name="myOrganization.myDivision.mySampleApp"
version="6.0.0.0"
processorArchitecture="x86"
publicKeyToken="0000000000000000"
/>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
</windowsSettings>
</application>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>

add manifest to compiled exe file from jar

I've a runnable MyApp.jar which I compiled to MyApp.exe by using launch4j and because this app need administrator permissions I try to add manifest file to it by following this article : http://msdn.microsoft.com/en-us/library/bb756929.aspx
When I perform
mt.exe –manifest manifest.xml –outputresource:MyApp.exe;#1
the process completed without errors but MyApp.exe file reduces its size from 6mb to 32kb only and when I try to run it I got the following error: Error: Invalid or corrupt jarfile.
Maybe somebody know what's wrong with it?
My manifest file is attached below:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0"
processorArchitecture="X86"
name="MyApp.exe"
type="win32"/>
<description>{app name}</description>
<!-- Identify the application security requirements. -->
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges>
<requestedExecutionLevel
level="requireAdministrator"
uiAccess="true"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
Finally we have solved this by adding manifest file through launch4j app during compilation time and changed uiAccess flag from true to false uiAccess="false" despite of the fact that our application is graphic, otherwise it didn't work.
I've used this file:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0"
processorArchitecture="X86"
name="MyApp.exe"
type="win32"/>
<description>{app name}</description>
<!-- Identify the application security requirements. -->
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges>
<requestedExecutionLevel
level="requireAdministrator"
uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
And put it here:

How can I figure out which framework was used for build application's (Spotify) UI?

I would like to know which framework was used to build Spotify's UI.
Is that possible somehow?
Would decompiling help?
EDIT:
Found that in the assembly. Seems to be something from the .NET or C++ or C# world?
C:\BuildAgent\work\89ac9b83199a0548\build\desktop\_win32\Release\spotify.pdb
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
version="1.0.0.0"
processorArchitecture="X86"
name="Spotify"
type="win32"
/>
<description>Spotify</description>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
</application>
</compatibility>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
</requestedPrivileges>
</security>
</trustInfo>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="x86" publicKeyToken="6595b64144ccf1df" language="*"></assemblyIdentity>
</dependentAssembly>
</dependency>
</assembly>
Spotify's UI is built with a combination of a completely custom C++ UI toolkit that was built in-house and HTML5/Javascript using Chromium.

Remove XML element using WiX XmlConfig

I have this XML file:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<dependency>
<dependentAssembly>
<assemblyIdentity name="Assembly1" version="1.1.0.0" type="win32" publicKeyToken="7XXXXXXXXXXXD"/>
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly>
<assemblyIdentity name="Assembly2" version="1.1.0.0" type="win32" publicKeyToken="7xxxxxxE89CD" />
</dependentAssembly>
</dependency>
</assembly>
I want to use Wix XmlConfig to remove the AssemblyIdentity element with name="Assembly2". I have tried this Wix configuration, but it is only working if the element I want to remove is the first element:
<util:XmlConfig On="install"
Action="delete"
Id="DeleteElement"
Node="element"
File="[MANIFESTFOLDER]\test.exe.Manifest"
VerifyPath="//assembly/dependency/dependentAssembly/assemblyIdentity[\[]#name='Assembly2'[\]]"
ElementPath="//assembly/dependency/dependentAssembly"
Sequence="1">
</util:XmlConfig>
How can I remove my desired element even though it is not the top one?
(It doesn't necessarily have to be the last one, it can for example be the second last one.)

The application has failed to start because the application is incorrect

I am getting this error while execution of my application.
I am using VS 2008 version '9.0.30729.1 SP' on Windows Server 2008.
Here is my manifest file description
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
</requestedPrivileges>
</security>
</trustInfo>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.VC90.DebugCRT" version="9.0.21022.8" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.VC90.DebugMFC" version="9.0.21022.8" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.VC90.CRT" version="9.0.30729.4148" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.VC90.DebugCRT" version="9.0.30729.1" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
</dependentAssembly>
</dependency>
</assembly>
Can anybody explain why it requires both version of 'Microsoft.VC90.DebugCRT' as you can see in manifest file. version '9.0.21022.8' and '9.0.30729.4148'.
I have seen in my folder 'C:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\ Microsoft.VC90.CRT' the 'msvcm90.dll' version are '9.0.30729.1'
Are the error is because of this?
I have seen under system event showing 3 errors are as follows.
Dependent Assembly Microsoft.VC90.CRT could not be found and Last Error was The
referenced assembly is not installed on your system.
Resolve Partial Assembly failed for Microsoft.VC90.CRT. Reference error message: The
referenced assembly is not installed on your system.
Generate Activation Context failed for d:\Barriergates\Debug\Barriergates.exe.Manifest.
Reference error message: The operation completed successfully.
Please help in these issue.
Thanks.
There are some special steps you must take to run your Debug EXE on a test machine. See details here.

Resources