I am attempting to use the Visual Studio Performance Profiler to profile a process I have running. I am using the "Sampling" collection type, and am attaching to the process after it has already started. When I finish profiling and attempt to load the report, it displays the message "No Call Tree Data Is Available" above the CPU usage graph.
In addition, the following error is generated:
DA0002: It appears that the file was collected without properly
setting the environment variables with VSPerfCLREnv.cmd. Symbols for
managed binaries may not resolve.
The only information I can find on this error is around running the profiler from the command line, not from Visual Studio.
My best guess is that this may be a 32-bit vs. 64-bit issue, as I just recently received an upgraded computer with the 64-bit of Windows 7. Everything worked fine on my previous machine which had the 32-bit version of Windows 7.
Related
I am using Visual Studio, Test Complete and C#. I am basing it off another project which also uses the same. This other project uses Oracle to query and works fine.
I based all my settings on the other project (any CPU, all the same references, etc). However, when I run it and attempt to connect to oracle I get an exception about a bad image (this happens when you run 64 bit and try to load a 32-bit client). I copied all the references, and tried all combinations of build. I do think I am running 64-bit because when I am debugging and try to insert a line it says it is disallowed in 64-bit mode. On the other application it lets me insert lines during debugging.
Here is the exception:
e {"Attempt to load Oracle client libraries threw BadImageFormatException. This problem will occur when running in 64 bit mode with the 32 bit Oracle client components installed."} System.Exception {System.InvalidOperationException}
I try replacing the oracle library but it always seems to go back. Better would be to run in 32-bit mode. As you can see from the picture, for some reason "Prefer 32-bit" is disabled (also in the application that works).
Any idea what to do? This will also, once it runs on my machine, be transferred to another.
This is Visual Studio 2012 (11.061219.00)
Use connection.GetType().Assembly.Location to check which DLL is actually loaded.
Typically (and simplified, see How the Runtime Locates Assemblies) assemblies are loaded from GAC (Global Assembly Cache) or from directory where your .exe is stored. Note, the GAC takes precedence!
If a .exe or .dll file is x86 or x64, you can check with sigcheck tool.
In Oracle Client 12.1 Setup and later the ODP.NET is not added to GAC anymore, you need to add it manually.
You may use my Oracle Connection Tester which could show you the problem of your installation.
I am working on a plug-in for an application. I have old development tools that have problems. My development tools are all from old 32 bit versions. CodeWarrior 6.7.and 8. I am running windows 7 pro 64 bit and having problems with the old tools. The CodeWarrior debugger will only work one time and I have to reboot before it will work again. It also has some problem using it. Break points stop working.
I switched to UeStudio from IDM but can not get a debugger to work. I created a project to use the compilers from Microsoft Visual Studio 10.0. UeStudio is supposed to use an integrated debugger. It downloads WinDbg.exe but it wont start up. The only WinDbg I found on Microsoft is from the Debugging Tools for Windows (x86) and (x64). It does not integrate with UeStudio. It starts up in a separate window. I have played around with it a bit but can not get it to load my DLL. I keep getting and error that it can not load my symbols (mismatching symbol file). I have set it to look were the '.pdb' for my plugin is located an doubled checked that it is correct. It's message names my DLL. I do not have symbols for the application. They do not supply one. I can load my source file and set Break points. But can not examine data.
Anybody get UeStudio debugging to work on windows 7? Or have any idea on debugging DLL on windows 7 cheaply.
I use OllyDebug.
OllyDbg
IDA is also very nice (paid)
I recently installed Visual Studio 2010 to help me with some exercises for class.
It all worked great in school but when I got home and tried to run and debug the second program I got this error:
Unable to start ...\Kapitel_1\Debug\Kapitel_1.exe
This application has failed to start because the application configuration is incorrect. Review the manifest file for possible errors. Reinstalling the application may fix this problem. For more details, please see the application event log.
How can this be solved?
This message generally means that the machine on which you built the application did not have the same redistributables than the system where you run the application.
Redistributables are sets of DLLs needed for your application to run properly.
In your case, I noticed that you are trying to run a debug build. That might just be the problem: you cannot run an application or use a DLL that has been built in debug configuration on a system with no debugger installed. Installing Visual Studio (ideally the same version your school has) should do the trick. You could also rebuild your application in Release configuration to avoid having to install a debugger on the running system.
Another case where this error message might be displayed is if you just installed a new Visual Studio update on the system that built the application and not on the system where you are trying to run it. In that case, you would need to update your system with the latest set of redistributables from Microsoft (at time of writing, here was a good place to look for that).
Whats the correct way to build the setup installers for a Windows Forms app to install and run on a Windows 7 32 bit machine, using Visual Studio 2010 on a Windows 7 64 bit machine ?
I've just brushed the dust off a 3yr old Visual Studio 2008 app, built on Windows XP, using SQL Express 2005.
I've updated it to VS2010, SQL Express 2008, and rebuilt it on a Windows 7 64 bit machine. It needs to run on a Windows 7 32 bit platform.
The setup project for database keeps failing (on startup) when run, saying its only for an x64 machine. (The setup for the app runs ok and installs.)
I've been through every project in the solution and set it to build using x86 (as opposed to Any CPU). I've removed all PreRequisites. The only thing suspect left in there is a DB CustomAction project (which runs the db scripts).
From googling it seems to me building on a 64 bit machine with 'Any CPU', means it should produce setup files that will run on a 32 bit machine via WOW ? and without having to make all the changes Ive been making ? Am I missing something bleedingly obvious ?
Thanks.
Try this:
select your setup project in Solution Explorer
go to its Properties pane
make sure that TargetPlatform is set to x86
I always find it frustrating coming across posts of the same question I have that never had a resolution posted. So I'll post what I found in case it, or even some if it, is of use to others one day. I found a lot of other developers reporting the aimless Windows 7 program 'has stopped working' message.
By the way, I found the easiest way to test deploying the app and the installers was to build a Virtual PC machine with the same configuration as the platform will eventually run on. Then copy that Virtual PC, and test run on the copy. That way, I can just delete the copy at any time, recopy from the original and start over, quickly.
Yes, as Cosmin said, the TargetPlatform Property of the solution also needs setting to x86. Anyway, didnt fix the the problem, the app still produced the 'has stopped working' message.
Next I checked the SQL logs ERRORLOG file (c:\Program Files\Microsoft SQL Server\MSSQL10.SQLExpress\MSSQL\Log) and it was reporting the app was trying to logon using Mixed Mode authentication, whereas SQL was set for Windows Authenication. Now I KNOW I selected Mixed mode when I installed SQL Express, as my app uses a sql service account which my db installer creates the account for. So somehow that was changed by something (dont know what?). To set to Mixed mode via SQL Server Management Studio you just right click on the instance, select Security, and change Server Authentication. Without Management Studio, you need to edit the registry HKEY_LOCAL_MACHINE/Software/Microsoft/Microsoft SQL Server//MSSQLServer, and edit key LoginMode = 2 for Mixed. Once again, didnt fix the problem, the app still produced the 'has stopped working' message.
Next, by chance I stumbled across some posts about this message can be caused during startup by loading 32 bit apps on Windows 7. I put MessageBoxes, and Try/Catchs on the first lines I could, and they never got displayed, and no error was caught.
The next thing I tried was to run DependencyWalker over my exe. It reported 2 x 32 bit files missing: IEShims.dll and GPSVC.dll. There are posts from other devs encountering this, and the end result was I found them in C:\Windows\winsxs (GPSVC.dll was called x86_microsoft-windows-g..licy-base.resources_31bf3856ad364e35_6.1.7600.16385_en-us_c10af1bed239c523_gpsvc.dll.mui_0c160ac2). I dropped them into C:\Windows\System32, recompiled my app, deployed it to my test machine, and it finally ran !
Still dont understand why just putting them into the System32 dir on my dev box made the app run on the test machine ? But anyway, it fixed the problem, and hope this is of help to others.
We have an automated build server that produces builds using Visual Studio 2005 and CruiseControl.NET (on Windows XP x64). Normally nobody is logged into the system, but occasionally we have to log in via Remote Desktop in order to perform maintenance.
We have noticed that if cl.exe is running (Microsoft's C++ compiler) at the instant we log out from remote desktop, then cl.exe will terminate with error result 4:
Project : error PRJ0002 : Error result 4 returned from 'C:\Program Files (x86)\Microsoft Visual Studio 8\VC\bin\cl.exe'.
This obviously causes the current build to fail with a pretty mysterious message. Does anyone know how to prevent this from happening?
Did you try to run ccnet service under some other, non-admin, account.
Note: I stumbled over this question when searching for what error PRJ0002 : Error result 4 returned from ... cl.exe actually means.
I can give the following info:
This happened to me on a Windows XP (32 bit) test box for our automated build, and the build-run was definitely run under a different user account than the user I logged out with.
However, I know that there are no problems on our production build servers on log-out, but these servers run Win 2003 Server and Win 2008R2 Server resp. (There, I only have a problem if the same user used to run the build logs out, but we can easily avoid that.)
So I would suspect that this problem will not occur on Windows Server OSs, but only on Win XP. (Can't give any opinion on Win7.)