I've encountered a problem where part way through building a solution, VS 2010 becomes locked and never returns. If I build individual projects one by one it works so the building of project is working. The solution contains XNA projects for various platforms and winforms libraries. This did work up until a point but have found no explanation for the sudden freezing.
I've uninstalled all of my plugins to see if that helps but no difference.
In task manager, VS2010 is busy doing something as it's using CPU and consuming memory >1GB.
It took a significant amount of time/removed music to sort it.
Related
I have written a Xamarin.Forms application and now I want to deploy the UWP project to the store but I can't create app packages.
When using Microsoft.NetCore.UniversalWindowsPlatform 6.2.2 or 6.2.0-preview I
in release mode, I constantly get this error :
Payload contains two or more files with the same destination path 'System.Runtime.CompilerServices.Unsafe.dll'. Source files:
C:\Users\john.nuget\packages\runtime.win10-x86-aot.microsoft.netcore.universalwindowsplatform\6.2.0-preview1-26926-04\runtimes\win10-x86-aot\lib\uap10.0.15138\System.Runtime.CompilerServices.Unsafe.dll
C:\Users\john.nuget\packages\system.runtime.compilerservices.unsafe\4.5.0\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll OfflineCurrencyConverter.UWP
But I followed the answer to this GitHub issue saying I should downgrade the package to 6.1.9.
Doing this causes my application to build for ever... the build never stops.
But when I disable .NET Native Tool chain, it builds and run in release mode but packages can't still be created. Please does anyone have a solution ? I'm frustrated.
I feel wasted building a whole app and realizing it can't be packaged at the end for this UWP project.
If it took way longer than you expected to build in release mode, use nuget version of .net native by installing Microsoft.Net.Native.Compiler package on nuget in your project and re-build it as usual. This solution solves the very same problem you have now in my experience.
Building app for .NET Native in release mode can take a very long time. It can even take as much as 10 minutes for larger apps. So make sure to give the compiler the time it needs. It might seem it is building forever, but it should definitely finish.
I'm experiencing a very severe performance issue with VS2015. We have recently moved to VS2015 from VS2013 for our project. I am finding that very often (not 100% consistent) I am getting 50-90% CPU usage on idle when our ASP.NET MVC project is open.
Here's a typical CPU usage scenario:
VS2013
App launch with opening of our project - CPU usage ~50-90%
After around 10-15 seconds - CPU usage ~0-5% and stays there
App close - CPU usage decreases and goes to 0 as app is closed
VS2015
App launch with opening of our project - CPU usage ~50-90%
After around 10-15 seconds - CPU usage ~50-90% and stays there
App close - CPU usage stays at ~50-90% mark and often just hands there. Closing the app is sometimes unsuccessful, with VS2015 giving an "Error Encountered" on close, forcing us to use Task Manager to kill the process.
We are using Pro for both 2013 and 2015. Extensions used are StyleCop, ReSharper 9.2 and Productivity Power Tools (for Column guides only). The extensions are the same for both 2013 and 2015. We have tried uninstalling/disabling the extensions with no performance improvement. The issue is present for a couple of our developers, but not all...
System Config
* MacBook Pro with Windows 10 running in Bootcamp
Fixes attempted
Disable Git source control provider - no performance change
Disable ReSharper/StyleCop - slight performance improvement, but idle CPU usage issue remains
Update VS2015 to Update 1 - no performance improvement
Upgrade from Windows 8.1 to Windows 10 (unrelated to the actual performance issue) - no performance improvement
Re-install of VS2015 - no performance improvement
Disable antivirus (in case it somehow was getting upset with the configuration) - no performance improvement
Unload some of the solution projects - inconsistent performance improvement. It looks like when the non-UI projects are loaded, the performance issue is not present. Once we load 1 of the 2 UI projects, the issue has a 50/50 chance of occurring. Once both projects are loaded, the issue has about 90% chance of occurring. So this is pointing to the UI projects being the culprits, but there is nothing special about those projects - a bunch of controllers and views with some UI util classes along with .css and .js libraries. This change in performance is only present in VS2015 - VS2013 is perfectly happy with all projects. Another point going against the UI projects being to blame is that another WinForms solution which is small in size is having the exact same performance issue in VS2015, while a larger ASP.NET solution is perfectly fine :(
We are trying to move to C# 6.0 and as VS2013 is not supporting that, this is causing us quite a bit of grief..
Any thoughts or advice? Thanks!
In my application I want to read some depth frames over a span of ca. 5 seconds from the kinect v2 to do some volume measurement and reconstruction of moving objects. However, the stream keeps freezing every few seconds rendering the data useless in the worst case.
This behavior can also be observed when running the wpf depth basics example.
Strangely enough - when using kinect studio the issue is not only non existent but when the studio runs even if not connected to the kinect, the problem is fixed for the example application as well.
So obviously there is no problem with the hardware (as it works just fine when running the studio) but perhaps some kind of driver or service issue.
The same is the case when running the c++ version of the sample. The sample alone runs fine and while it is running the c# version runs fine, too.
Do you have any ideas?
If your project's platform target is 'Any CPU' then set it to 'x64'. To do so
Right Click on the project (not the solution) and select properties.
Select 'Build' from the left manu.
Change 'Platform target' to 'x64'.
Press 'Ctrl+S' to save the configuration.
Run the program.
Hope it helps.
Note: My answer is based on Visual Studio 2013.
I have made a Windows Form Application in C# using Visual Studio 2012. Can I publish this as a portable application to windows machines ?
P.S. portability here I am referring is working with any Windows( preferably windows 7 or 8 ) machine without installation and .net framework
Yup.
All you need to do is sheep your bin folder. It has your executable and all dependencies.
No installation will be required.
Just bear in mind that in order to be really portable, you will need to make sure that your application does not modify registries or computer configurations.
(from wikipedia:)
A portable application (portable app), sometimes also called
standalone, is a program designed to run on a compatible computer
without being installed in a way that modifies the computer's
configuration information.
You can if you do not have any dependencies, e.g. you have only the .EXE. If you have some .dlls you can use ILMerge to merge them into one .EXE
Depends on what you understand under portable. Avi's answer certainly works, as does ILMerge, but there's also the one file, no installation needed approach to portability.
I tread carefully because I don't want to advertise any application or another, but apart from taking the entire /bin folder, I've played around with Cameyo in the past and that seems to do a pretty decent job at virtualizing (and rendering portable) most applications as long as they aren't too large (or maybe have too many dependencies on what have you, not sure). Alternative tools may exist, I haven't researched any of them recently and neither do I prefer or affiliate myself with any of them.
Seems to work fine for your average app. I've tried to virtualize Visual Studio, that was fun. Big no-no. Who knows, it might suit your needs. It still doesn't take away the need for a .NET framework installed on the target machine though. As I mention in comment, that might be something for .NET Native (and, at time of writing, the future).
I am having problems with my visual studio 2010 where its memory consumption increases quickly while the application is open. I unistalled all plug ins and now just have the clean version. But while I have the solution open, the memory increases from ~300K to 1GB to such a point if it hasnt crashed, I need to kill the process. The version of the VS is professional and it happens for different solutions.
I feel it may down to the locking on VS2010 config files eating in to memory but thats a guess.
Anyone have similar issues or how I might go about finding what the issues is?
I was having the exact same problem working with large solutions. Give this plugin a try, Solution Load Manager, it lets you essentially "lazy load" projects in your solution, so you only have the ones you're actively working in open and consuming memory.
Worked wonders for me.
I agree with Tipx. Never seen such an issue. My studio hovers around 300MB, but the solution I have open right now has 10 class libraries and 11 web application projects in it.
I'd say open visual studio, start a brand new blank .net solution and let it sit. If it's memory jumps to 1GB, then do a complete uninstall ( http://archive.msdn.microsoft.com/vs2010uninstall ) and reinstall it from the ground up. If it continues exhibiting the behavior on a blank solution then I'd suggest wiping the OS from the machine because something else is really wrong.
If it's memory doesn't climb, then create a blank solution and slowly add your projects into it until something happens. Fix the project showing the behavior.
Of course, if you have a large number of projects OR some third party code is executing on them then 1GB of RAM might be exactly what it needs. I know Telerik's stuff will inspect each project as you click on it to determine if it has the latest version of the controls... I'm guessing others will do something similar.
Create new directory
Move project files new directory (without sln and sou files)
Open project from new location
that's all.