I am working on one of the Project (MVC)
IDLE: MS Visual Studio Enterprise 2017 ,version 15.9.50
Issue is: whenever I run any project in browser(localhost) and open Debugging tool it keep on create files
look like "VM2000" "VM5869" randomly
I have no idea why and for what it is generating and not allowing me to debug because screen blinks each time when file creates . please help me out. I will tag image too
I tried in different browsers too still facing same issues
Related
I'm writing a web app using Durandal and it's annoying to have to stop debugging and then restart everytime I add a new controller etc.
You could open 2 visual studio instances
1 for editing (don't debug with it, just edit / save / maintain your project)
A second one WITHOUT the project opened, and have it attached as a debugger to your IE/Firefox/Whatever you use for script debugging.
You can edit the 1st one all you want and the 2nd will only get it's source from live data when you refresh the page so it will be kept up to date. This allows you to change anything that runs in the client side, including adding files, without interupting your debugging session. Of course it doesn't help if you want to add server side compiled elements but there's no way to recompile without re starting debugging anyway.
I found a solution. Basically want to either have IIS Express launched from outside of visual studio or move to full IIS locally.
I have to create around 200 WP7 apps that are very similar. They differ only in the content, icons and name. So manually create them isn't a good idea so let's I've written a little tool, which does the following:
Copy the created template project
Copy the content files from a source directory to the copied template.
Change the app name, tile name and app id in the WMAppManifest.xml
Add the copied content files in the .csproj-file.
This works and the generated project opens error-free in Visual Studio 2010 and compiles without errors. The xap-file can be deployed on device and emulator.
The problems:
If I want to debug the app by pressing F5 in Visual Studio I get "The application could not be launched for debugging. Ensure that the target device screen is unlocked and that application is installed", both for device (which is unlocked and connected with Zune/WPConnect) and the emulator.
If I try to start the app on the emulator it closes immediatle after start. BUT if I start the app on my device it works like a charm. Crazy stuff.
The curious stuff: If I do the things which my little tool does manuelly I can debug the project from Visual Studio.
This only occures with my generated projects. Every other WP7 project (existing or newly created within VS) works and debugs error-free.
I tried to PCs: Win7 x64 with VS2010 Ultimate and an other one Win7 x64/VS2010 Pro and on both maschines I have the problem.
Maybe someone has an idea which causes the problem. Thanks for the help!
Edit: I've seen something new: The AssemblyInfo.cs file is located in the properties folder and correctly included in the csproj-file. But if I try to open the Assembly Information from the project properties all fields are empty and if I try to set them I get an error ("value is not in the expected range" or something like this).
I've got similar problem with some sample programs.
It turned out that I have to set in a Solution properties:
Active config => Debug|Windows Phone
it works for me
If they only differ in content, icons, and name, would it be simpler to make one complete app, copy it 199 times, and then just put the appropriate files into the correct directories?(if you made a tool to make templated projects, i'm sure you could do this with code too)
Plus that way if you ever need to change the program you can just recopy with that code again, but not copy the content, thus updating all of your individual 200 apps.
In VS 2010, I have an asp.net web application project. I made a change to a java-script file and saved it. I then run the application in debug mode and looked at the corresponding dynamically generated java script file. The dynamically generated file still represents the code before i made the recent changes. I tried restarting VS and my computer to no avail... This issue just started happening for no apparent reason.
Thanks,
Right click on solution, and click clean.
Wondering if anyone has a solution to this 2010 bug. I have a project that built fine in Visual Studio 2008 that wont build in 2010 because Visual Studio is holding on to the dll after the application is run ONLY if a designer window is open. I created a really light weight project that shows this problem. If you create an application then create a lib dll. Put one form in the dll, open the form in design view and then run the application. It will run fine, then close the app, go to the code view of the form in design view, and change the code ( I just renamed a single variable) then try to recompile you get the following:
Error 1 Unable to copy file "obj\Debug\customlib.dll" to "build\debug\customlib.dll". The process cannot access the file 'build\debug\Customlib.dll' because it is being used by another process.
If you run Process Explorer and search for the dll, the only process holding the dll is devenv.exe!!!
I have done a ton of searching on this problem and have found similar issues with older versions of Dev Studio where people were able to just add a pre-step to move the locked dll to another name (.locked) and build. Well that works the first time, but the next time you run then edit you are locked out of both the current dll and the one you moved to .locked, so unless I am willing to add code to randomly generate a name for the locked dll, this wont work for me (I don't want my debug directory size to grow with files never getting deleted.)
I have only found one workaround and if you are in this same boat this is what I have to do to edit and run. I make sure EVERY design view window is closed BEFORE I ever run my project in the debugger. If you close all the open design view windows devenv.exe will not hold the dll.
Does anyone have a better solution to this problem?
I'm not sure whether this will work for you or not, but this similar question if you have this line in AssemblyInfo.cs:
[assembly: AssemblyVersion("2.0.*")]
changing it to:
[assembly: AssemblyVersion("2.0.0.0")]
will solve this isue.
The Visual Studio add-on "VSCommands" claims to have a fix for this problem. I've not tested it yet, but it also claims to have an in-IDE stackoverflow reputation tracker which intrigues me :)
Your "Close designer before debugging" workaround seems to be working for me (so far), for which I'm very grateful. It was beginning to get to the stage where am large part of my day was spent in the following workflow...
F5
loud expletive
ALT F4
WIN 3
waits impatiently...
F5
I have had the same problems for a long time and then suddenly they disappeared. I realized that the source of the problems was initializing code in the constructors of WCF services and WPF controls. After cleaning the constructors from any dependencies to other assemblies everything has been fine.
So my suggestion is: Clean your constructors.
In WPF it is possible that inserting:
if (DesignerProperties.GetIsInDesignMode(this)) return;
or similar will have the same effect.
In Visual Studio 2010 I've created a Silverlight app by choosing the "Silverlight Business Application" template.
I changed some code in Home.xaml.cs, closed Visual Studio, opened it again, and began making more changes.
But now the changes that I make to the code don't take effect at all. It's as if the entire application is cached. I can even delete the whole contents of the Home.xaml.cs file so it is blank, and pressing F5 shows me my original Silverlight app. This happens both in Firefox and Chrome. I've rebuilt, deleted the bin directory, but it keeps showing me the same old application.
What do I need to change in this template so that I can make changes to the code, and see them reflected in the application?
Addendum:
I created a new Silverlight Business App, copied all the code to it, and this caches after the first change as well.
So it occurred to me to go into BusinessApplicationTestPage.asp and chang the link to the .xap file:
<param name="source" value="ClientBin/BusinessApplication4.xap?id=111"/>
So i've "fixed" the problem in that I change the id each time I run the application. And I suppose I could put a random number generator in here so that it refreshes each time. But... is this the intent? Isn't there an easier way to develop without this caching, and then only when deploying to cache like this?
Update:
Ok, just by adding that ?id=111 once, it recognizes each change now. Perhaps...
Start by using Control-F5 in IE. This not only refreshes the page, it clears the browser cache so in theory you will download a new version.
If weirdness like this is still happening you need to delete the contents of these folders...
C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files
This is such a well known pain-point in older versions of Visual Studio that most web developers I know have batch files specifically for cleaning out those directories.
These folders exist so that you can alter ASP.NET applications while the application is still running. IIS will detect the changed files and copy them to the temp directory while it silently restarts your web site. Alas this doesn't always work correctly, especially when running under the IDE.
I know this isn't an ideal solution, but I have found that the IE9 Beta caches XAPs much less aggressively than other browsers, and I don't face this problem when running my Silverlight applications in it.