Visual Studio dies when opening solution - visual-studio-2012

When opening a particular solution in VS2012, the process is killed. Event viewer shows Error 1026
Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.BadImageFormatException
Stack:
at Microsoft.VisualStudio.Enterprise.Common.AspNetHelper.CleanupListener()
at Microsoft.VisualStudio.Enterprise.Common.AspNetHelper.Finalize()
Any ideas of cause?
EDIT
I do seem to be able to open other solutions. Just trying to reinstall .NET framework. Will try deleting the SUO file if that doesn't work

I ended up reinstalling Visual Studio and it fixed this

Related

Failed to start release app ported to the VS 2019

I'm porting an application from VS 2005 to VS 2019. I successfully ported the debug version but faced with issues during release one.
First, when I launch my release app, I got an error "MSVCP80.dll not found". It's strange because debug version successful find the dll in the "C:\Windows\winsxs\x86_microsoft.vc80.debugcrt_1fc8b3b9a1e18e3b_8.0.50727.762_none_24c8a196583ff03b"
Second, if I copy MSVCP80.dll and MSVCR80.dll to the release/bin folder I got an error: "R6034 an application has made an attempt to load the c runtime library incorrectly" and "The application was unable to start correctly (0xc0000142)"
So, there the problem? Is any DLL missing in my system? Or it is a build issue? Why debug is Ok bur release is failed?

Android Studio 2 error :app:compileDebugJavaWithJack

This is the complete error from Android Studio 2.1.1. I know this code compiles because on other PC it does, just not on this one which has Windows 10 x64. All other projects fail with similar result.
Error:Execution failed for task ':app:compileDebugJavaWithJack'.
> java.lang.RuntimeException: java.lang.AssertionError: com.android.jack.library.LibraryIOException: I/O error when accessing file 'I:\Android\KeepVidDownloader\Android\app\build\intermediates\packaged\debug\classes.zip': Failed to delete directory 'C:\Users\BCDIAC~1\AppData\Local\Temp\vfs-1464787788985-0'
For Build -> Clean Project I have used the solution from here https://stackoverflow.com/a/32924320/1958032
I think that there could be a similar solution for running/making the app.
How to solve this?
This issue is a conflict between antivirus and Android Studio.
In my case using Avira, Windows 10 and Android Studio 2.2.
I just disabled Avira for the first build and enabled it again when build was complete.
No need to do this every time- only at the first build.
I had a similar problem and solved it by File->Invalidate Caches and Restart.

VS 2012 not starting

I tried to start my Visual Studio 2012 Professional as every day.
Out of nothing, it will not start anymore.
Already googled around but can't find a solution that realy solves my problem.
If possible I would like not reinstallin Visual Studio completely.
Some facts I already figured out:
I did not install any new packages/updates since yesterday
It starts with devenv.exe /SafeMode
It does not start with devenv.exe /ResetSettings
Starting with devenv.exe /Log will fail, but it shows the following:
Could not load file or assembly 'Microsoft.VisualStudio.SmartDevice.ProjectSystem.Base.dll' or one of its dependencies. The system cannot find the file specified.
C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 11.0\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\TESTWINDOW......\PrivateAssemblies\Microsoft.VisualStudio.SmartDevice.ProjectSystem.Base.dll
The file mentioned is locally not existing. At my colleagues computer this file also not exists but Visual Studio is running normally.
I'm currently running sfc /scannnow in case any system-files are somehow corrupted. (Nothing found)
Any ideas what I can do next to find the issue?
Plugins/Extensions installed:
ReSharper 7
GitExtensions
Update:
Repairing ReSharper through Programs and Features seems to fix the problem. After restarting same error occurs

Build Failed. MonoDroid does not support running the previous version

This is my first Xamarin android project with MVVMCross.
Started from scratch.
The project builds without any errors but when i try to debug it, i get a build failed: MonoDroid does not support running the previous version. Please ensure your solution builds before running or debugging it.
Build output says:
1>------ Deploy started: Project: Mobile.Droid, Configuration: Debug Any CPU ------
1>Error: The operation could not be completed ==========
Deploy: 0 succeeded, 1 failed, 0 skipped ==========
Ide.log: ERROR [2014-02-05 16:08:08Z]: Could not update jumplists System.InvalidOperationException: The file type is not registered with this application. at Microsoft.WindowsAPICodePack.Taskbar.JumpList.AppendCustomCategories() at Microsoft.WindowsAPICodePack.Taskbar.JumpList.Refresh() at MonoDevelop.Platform.JumpList.UpdateJumpList() at MonoDevelop.Platform.JumpList.OnUpdateTimerEllapsed(Object sender, EventArgs args)
I'm using Visual Studio 2012 (Update 4)
Windows 8
Xamarin Studio 4.2.2
Xamarin.Android 4.10.02014
Please help me cause i already spent a day trying to solve this issue.
Found the problem, i needed to set my startup project to the android app.
I could slap myself, i didn't pay attention to it cause for WP8 it's not needed.
Took me a day and half to solve this :-(
Once again this proofs that error messages are not always clear in what they mean or say.
The reason may be that you not launched any virtual devises for running or debugind your app.
Please check does you able to choose some AVD at your Start button.
In next example I have two runed android emulators: MonoForAndroid_API_10 and MonoForAndroid_API_12:
If you have not, do next steps:
Open Android Emulator Manager:
Choose device and press Start. Look at API level you selected. It is important. I recomend to select level not less than 11. Level 10 or lower may gives you error in deployment.
Launch the devise. Now you are able to start your app in Run or Debug mode.
You may have quit the emulator during the build process.
First off, this error means that there was an error somewhere in the build / deploy process. This can be for a variety of reasons (see other responses on this topic).
Another common cause of this error is simply that you exited the Android Emulator too soon.
The Android Emulator that is included with the Android SDK takes a long time to load (esp. the first time you use it). If you exit out of the emulator before it loads, you will get this error. (For some people on older machines, the emulator loading process can take up to 15 minutes)
When you click run in VS, the emulator should open. When it opens, it will have a blank black screen. If you look in the output menu in VS it will say "Waiting for device". Sometimes this seems to be the final state of the emulator while in fact it is still loading.
If your emulator is unresponsive, look at the Output > Build window and see if it says "Waiting for Device".
If it does (or has a message that is consistent with the log of a successful build below), in 2 to 15 minutes, the android home screen should come up. Then, in another 2 to 10 minutes, the app should launch.
Here is the log of a successful build/deploy of a Xamarin "Blank Android" project in Visual Studio.
1>Starting emulator: Xamarin_Android_API_15
1>Emulator is running: Xamarin_Android_API_15
1>Packaging application..
1>Build started.
1>C:\Program Files (x86)\MSBuild\14.0\bin\csc.exe /noconfig /nowarn:1701,1702,2008 /nostdlib+ /errorreport:prompt /warn:4 /define:DEBUG;TRACE;__XAMARIN_ANDROID_v1_0__;__MOBILE__;__ANDROID__;__ANDROID_1__;__ANDROID_2__;__ANDROID_3__;__ANDROID_4__;__ANDROID_5__;__ANDROID_6__;__ANDROID_7__;__ANDROID_8__;__ANDROID_9__;__ANDROID_10__;__ANDROID_11__;__ANDROID_12__;__ANDROID_13__;__ANDROID_14__;__ANDROID_15__;__ANDROID_16__;__ANDROID_17__;__ANDROID_18__;__ANDROID_19__;__ANDROID_20__;__ANDROID_21__ /errorendlocation /preferreduilang:en-US /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v5.0\Mono.Android.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\mscorlib.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Xml.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Xml.Linq.dll" /debug+ /debug:full /filealign:512 /optimize- /out:obj\Debug\App9.dll /ruleset:"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Team Tools\Static Analysis Tools\\Rule Sets\MinimumRecommendedRules.ruleset" /target:library /utf8output MainActivity.cs Resources\Resource.Designer.cs Properties\AssemblyInfo.cs "C:\Users\user\AppData\Local\Temp\MonoAndroid,Version=v5.0.AssemblyAttributes.cs" obj\Debug\\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs obj\Debug\\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs obj\Debug\\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
1>App9 -> c:\users\user\documents\visual studio 14\Projects\App9\App9\bin\Debug\App9.dll
1> Processing: obj\Debug\res\layout\main.xml
1> Processing: obj\Debug\res\values\strings.xml
1>C:\Program Files (x86)\Java\jdk1.6.0_39\\bin\keytool.exe -list -alias androiddebugkey -storepass android -keypass android -keystore "C:\Users\user\AppData\Local\Xamarin\Mono for Android\debug.keystore"
1>C:\Program Files (x86)\Java\jdk1.6.0_39\\bin\jarsigner.exe -keystore "C:\Users\user\AppData\Local\Xamarin\Mono for Android\debug.keystore" -storepass android -keypass android -digestalg SHA1 -sigalg md5withRSA -signedjar bin\Debug\\App9.App9-Signed-Unaligned.apk "c:\users\ user\documents\visual studio 14\Projects\App9\App9\obj\Debug\android\bin\App9.App9.apk" androiddebugkey
1>C:\Users\ user\AppData\Local\Android\android-sdk\build-tools\23.0.0\zipalign.exe 4 "c:\users\user\documents\visual studio 14\Projects\App9\App9\bin\Debug\App9.App9-Signed-Unaligned.apk" "bin\Debug\\App9.App9-Signed.apk"
1>Build succeeded.
1>Waiting for device..
1>Detecting installed packages
1>Detecting installed packages...
1>
1>Installing shared runtime
1>Target device is armeabi-v7a.
1>Installing the Mono shared runtime (armeabi-v7a - 1441837293)...
1>
1>Installing platform framework
1>Installing the API 21 platform framework..
1>
1>Installing application on device
1>Copying application to device...
1>
1>Getting installation path...
1>Using fast dev path: /mnt/sdcard/Android/data/App9.App9/files/.__override__
1>Synchronizing assemblies...
1>Synchronizing assemblies
1>
====
The "previous version" error apparently just means that there was a build error - see http://forums.xamarin.com/discussion/3410/monodroid-problem
For the jumplist problem the only links i could find were about an old version of Xamarin.Android - see Xamarin 4.0.13 Layout Renderer failed
Both of these issues seem to be related to your xamarin install. If the continue, perhaps your customer support contact in xamarin can assist.
I had the same issue. When I click on AVD button from Visual Studio, nothing happens. So, I opened Android Studio and from there I was able to open AVD manager and started Emulator. Then I was able to Run the application from Visual Studio without any issues.
Delete the /bin and /obj folders in your Android and shared projects then try again.
I had the same problem. Apparently I deployed a release version to the device and then was attempting to deploy using debug after. After uninstalling the version on the device the deployment under debug worked fine.
I had 2 deployable projects in my solution (a unit test project and an application project).
I couldn't run the unit test project even though it was marked as startup project and it was set for deployment in configuration manager.
I solved it by setting the application project as not to be deployed in configuration manager.
I find a solution!!
Same problem:"Build Failed. MonoDroid does not support running the previous version" on VS15.
I was on VS15, then i moved to Xamarin IDE, building and debugging: appears an error about the memory in my device (Samsung Galaxy Ace), so i uninstall some applications.
it had 405MB for available space before deploying
I run in Xamarin IDE and the application runs
I check my phone memory and the application installed use more than 100MB
Then i try on Visual Studio again, all OK.
Images of my app: http://1drv.ms/1PRZwV8
So I had a problem very similar to this, I was getting the error:
"Build Failed: Xamarin.Android does not support running the previous version. Please ensure your solution builds before running or debugging it."
After a few hours of trying different things and after a lot of frustration I managed to fix this and just want to share my solution.
All I did was:
- Next to the "Debug" option on Visual Studio I had the option "Any CPU";
- I clicked this option and then chose "Configuration Manager";
- I found my project name and next to it I saw "Debug" and "Any CPU";
- I clicked the "Any CPU" option opening the dropdown list;
- Chose "New..." and added the option x86 to the list;
- Then I used Debug with the option x86 active and everything went fine.
I hope this helps!
Cheers,
Ruben

Visual Studio 2012 won't start

I installed VS2012 Premium from our MSDN subscription and it was working fine the first couple of days but then I installed a few extensions I can't now start VS2012 and it gives the error:
Faulting application name: devenv.exe, version: 11.0.50727.1, time stamp: 0x5011ecaa
Faulting module name: ntdll.dll, version: 6.1.7601.17725, time stamp: 0x4ec49b8f
Exception code: 0xc0000374
Fault offset: 0x000ce6c3
Faulting process id: 0xee8
Faulting application start time: 0x01cd89bb777fc1dd
Faulting application path: C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe
Faulting module path: C:\Windows\SysWOW64\ntdll.dll
I'm running it on Windows 7 64 bit.
I've tried to repair, uninstall and install again and nothing. I tried to restore to a previous restore system point but nothing.
The extensions I installed I can remember:
VS10x Code Map
VSCommands
Visual SVN
Nuget manager
(all the above my colleagues have it too and it works fine for them) and:
Web Essentials
Visual Studio Color Theme Editor
SlowCheetah
Mobile Ready HTML5
Questions are:
Anyone else has had this problem?
Is there a way I can uninstall extensions from a command line or software? (I removed the extensions folder but that doesn't do
anything)
Can I repair the "C:\Windows\SysWOW64\ntdll.dll"? Is it really a problem with this dll?
I haven't been able to find any similar issue in other versions and because VS2012 is new doesn't seem to be much information either.
It is working now!. This is what I did:
Following the suggestion here:
Removed the key: [HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers]. VS2012 loading but then crashing before I could do anything else (error in C:\Windows\syswow64\KERNELBASE.dll)
Then I removed:
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0]
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0_Config]
and started again and is working fine.
I obviously lost all my settings but no big deal as I can now do some work! :)
Running devenv.exe with the /SafeMode argument would probably have also fixed it.
I opened a different .sln and then went back to my faulting project and it loaded! Maybe something with a faulty close-down of the project
Removing all VS settings is a bit harsh unless all visual studio instances crash immediately.
What probably happens when you encounter this is that Visual Studio opens the designer window that caused it to crash in the first place... this is often an extension, but it might also just be a bug in VS. For example: I sometimes experience this when working with LINQ-TO-SQL and have the database-schema designer open.
The easiest resolution is to simply remove the SUO file with the solution settings, and open the SLN. You can then do whatever you want, except go to the file with the issue- once you know what that file is, you can fix it (f.ex. in the case of a DBML by simply removing it and regenerating it)
Just copy all dte*.olb files, from C:\Program Files (X86)\Common
Files\Microsoft Shared\MSEnv to C:\Program Files X86\Microsoft Visual
Studio 9.0\Common7\IDE.
From https://mycodepad.wordpress.com/2013/12/07/visual-studio-2012-4-run-as-administrator-the-application-cannot-start-error/
Simply running as Administrator seemed to be enough to get it running for me, at least temporarily.
I had a similar ntdll.dll issue ... C++ updating SQL Server ...
I fixed it by using the SQL Server OBDC connection rather than the SQL Server Native Client 11.0
We're trying to see why as it is working for some updates and not others ... but it works all the time for reading.
All the above solutions didn't work for me, but this one work.
Copy dte*.olb from C:\Program Files (X86)\Common Files\Microsoft Shared\MSEnv to
C:\Program Files X86\Microsoft Visual Studio 9.0\Common7\IDE.
http://www.clausconrad.com/blog/the-application-cannot-start-running-visual-studio-as-administrator
First launch devenv.exe with the /SafeMode option, then Uncheck the Allow macros to run from "Enviroment->Add-in/Macros Security" and test!
The problem is due to path variable. setting path variable in Environmental variables to below 2048 characters worked for me.

Resources