Conversion to x64 platform in visual studio failing - visual-studio-2012

So I built a huge website for my company using the AnyCpu option. I didn't think it would matter - I have a 64bit machine with x64 windows, it's getting deployed to a x64 server, and there's no attached dll's, so it should just all be in 64, right?
Well, in the process of trying to implement some security, the company's support told us the application MUST be strictly x64. I figured it was, but to humor them, I went into the configuration manager, and changed all the target cpu, platform etc settings to x64.
Unfortunately now, it breaks when I hit f5 to run it. I've run into this before, I think, and I vaguely remember needing to delete some temp internet files somewhere, but I tried closing VS, deleting the bin folder, deleting the root folder from /framework/tempASPfiles... but I still get the BadImageFormatException - "an attempt was made to load the program with an incorrect format."
What's the best and fastest way to convert an app to x64? and am I right in thinking I need to delete some files somewhere?

Related

Visual Studio 2017 crashes after 10-20 minutes

For over a month now I've been experiencing problems with VS2017 on my home PC. I even tried submitting the feedback to Microsoft. There's more info about the problems I'm experiencing there.
The problem:
The gist of it is that VS is eating RAM like crazy. As soon as I start opening files, adding new files, using IntelliSense, building or (especially) debugging, the RAM usage skyrockets.
After that it's only a matter of time before the VS crashes and restarts without any error message. Though there are numerous error messages throughout these breif ~20min I have with each session.
Additional details I observed:
Doesn't happen with Python projects, as these don't have to be built constantly. It might be eventually happening if you debug a lot, but I didn't have the chance to check that because most of my Python coding is debugged on an external device
Size of the loaded solution doesn't matter;
UWP and WPF seem to crash the most. Console Projects take longer to crash.
Also affects .NET Core;
It doesn't matter which version of .NET Framework I use;
VS2015 worked perfectly, but I don't have it anymore after the format
What I already tried:
I reinstalled VS;
I refreshed Windows;
I reinstalled Windows;
I checked my drives and RAM for issues - none found;
I switched from Community to Enterprise;
I tried disabling extensions;
I applied some shady hotfix I found somewhere;
Finally, I installed Rider which seems to be the best solution as of now. It still lacks many important features, though.
Is there anything else I can do/try/check? Did anyone experience (and fix) a similar issue?
Cheers!
You get a System.OutOfMemoryException, this means your Visual Studio runs out of free virtual address space (4GB on 64 Bit Windows for the 32Bit Visual Studio because Visual Studio is configured to be large address aware and MS refuses to release VS as 64Bit program which would fix this issue).
To analyze the memory usage, you need to run WPRUI.exe (part of Windows Performance Toolkit (which gets installed by VS2017) for some scenarios, if not, install it on your own), select Reference Set (Note: expand the Resource Analysis entry first to see all options).
and click on Start. Capture the memory usage grow for some 100s of MB and click on Save.
Open the generated ETL with the analyzer (WPA.exe) and analyze what the process devenv.exe is doing.
Also zip the ETL + NGENPDB folder (important) as zip and attach it to your bug report so that Microsoft can analyze it.

Visual Studio 2012-Update 2 Won't Load Solution if SUO File is Present

I develop in VS 2012/.NET on several computers (all running Windows 8 Pro x64). Although VS is installed on all computers I keep the project folder on an external USB3 drive. Every once in a while I would find the project files had been corrupted on the USB drive (e.g. cross-linked). Fortunately I keep frequent backups but clearly this situation is intolerable, so I set out trying to find what the issue(s) might be.
I still don't have a clear answer but one piece of strange behavior is this: if I open the .SLN file for my project in VS 2012 when an .SUO file is NOT present it loads fine, builds are OK, etc. HOWEVER, if I then save the project, exit VS (so an SUO file is created) and then attempt to REOPEN the solution VS hangs at (....loading). I get the usual "Visual Studio is busy....." messages and there is no point in waiting, the solution just never loads. I have to kill VS in TM. I've tested this repeatedly, and I've even done it from the local hard disk (as opposed to the USB drive) to see if USB was the problem. It isn't. Remember, this is all on the same computer (so as to remove "moving" as the cause of the issue). The only way I can work with the project is to delete the SUO file before trying to open it.
I would assume, if this was a VS bug, it would be pretty much all over the web and my searches would have turned up something. So I'm asking if anyone has any idea what the problem might be or if there are links that might help me figure things out.
Thanks in advance.

"A remote operation is taking longer than expected" x64

First off, I think I've been to every website and forum there is that's discussing this issue and I've tried many different things. I'm at my wits end. This is the dumbest thing and I just want to start coding again!
I'm using Visual Studio Express 2012 for Windows Desktop. I have a x64 project I'm trying to run in Debug mode using the local windows debugger. The only external library I'm using is that of which is required to run DX11.
I attempt to run my program and it freezes. A window pops up saying "A remote operation is taking longer than expected."
I click Terminate and another window pops up asking if I'd like to terminate the remote session. Why yes, I would.
Then it says, "Unable to start program (my path leading to my .exe). The network connection to the Visual Studio Remote Debugger has been closed."
To my understanding, because Visual Studio itself is a 32 bit application, it needs to use the Remote Debugger to compile to x64. Is that correct?
Regardless, I'm still failing to see where that would break down. I've ran several repairs on VS and upgraded to Service Pack 2 (or 1, whichever is the latest).
I've ran a windows repair and uninstalled any VMWare type stuff on my computer. I'm not using a VPN.
I've even copied msvsmon.exe from my laptop (working instance of the project) over to this computer and still no luck.
I'm about ready to Nuke my OS and do a clean install on everything. sigh
Found the problem. It wasn't Windows Firewall like other threads describe. It was my internet filter. I guess it decided to try and block msvsmon.exe because it was using the network. Adding it, along with WDExpress.exe to the application exceptions list did the trick.

Visual Studio 2012 Web Publish keeps overwriting existing files with same version

Just installed VS2012 and run across a strange behavior by the one click publish feature.
I'm publishing via FTP and everything works fine except it seems that VS insists on overwriting some files over and over even though nothing's changed.
In VS2010 clicking the "publish" button over and over just runs through the steps and finishes in a few seconds, in VS2012 it takes about two minutes as it keeps copying a 5mb dll and some other stuff too.
P.S the "delete all existing files prior to publish" is off
It's an absolute pain. I've resorted to keeping the solution open in VS2010 alongside the VS2012 and using VS2010 to publish, it's annoying, but it's faster...
Unfortunately there's no option for only changed files in VS 2012. Not sure why they took it out, other than maybe too many people complained that VS wasn't synching properly when their FTP servers were the problem. FTP servers are notorious for not giving back correct file info.
This is real too slow on large amount of files.
My best experience is to remove unused folders not containing assemblies (scripts, css, etc...) this way <ExcludeFoldersFromDeployment>Content;Scripts;Views</ExcludeFoldersFromDeployment>
.
Publish these files straight when you change them . Otherwise publish assemblies from profile .
https://msdn.microsoft.com/en-us/library/ee942158.aspx#can_i_exclude_specific_files_or_folders_from_deployment

Can I just drop vjslib.dll into the /bin directory of my application?

I am in the middle of a production deployment. Unfortunately I am deploying to a tightly controlled environment. It is unlikely I'm going to get clearance tonight to run the full Visual J# redistributable EXE. Our app is currently throwing errors saying that it can't find the assembly "vjslib.dll". Can I just drop this into the bin of our app and have everything work without all the hassle of the full-blown EXE install for the server?
The vjslib.dll file is a redistributable file. You should be able to place it in the BIN directory and have everything work just fine unless there is another dependency missing. You may need to add vjsnativ.dll as well.

Resources