News


Last year Microsoft released VS 15 and add a interesting new feature called “ Diagnostic Tools debugger window

Asy you read on internet when someone trying to show the execution time of 2 different2- function it will use stopwatch and some other kind of thing to prove which one is better. From VS 2015 you have a better option to check the execution time of code. You can exactly figure out how much time it will take.11

 

 

 

 

 

 

Just open the diagnostic window and put a breakpoint in code. and another one when execution complete. You can see how much time your code take to execute in diagnostic window as given example.

For more information look at this article written by Visual studio team

https://blogs.msdn.microsoft.com/visualstudioalm/2015/01/16/diagnostic-tools-debugger-window-in-visual-studio-2015/



If you work in Visual studio 2015 update 1 and got issue like this“

An error was encountered during code generation. The changes you have made in the designer have not been committed to the source code”

then you are not alone. Many developer found this issue. Check this page https://msdn.microsoft.com/en-US/library/mt634751%28VS.140%29.aspx?f=255&MSPPError=-2147217396 for detail.

For fix this problem install this https://www.microsoft.com/en-us/download/confirmation.aspx?id=50376

This will fix this problem in Visual studio update 1.



Few months ago I work on a .net project (windows form actually)  which I downgrade to .net 2.0 for some reason ( it was.net 4). Downgrade the project is not done easily but at the end we win the War. We finally downgrade the project to .net 2.

 

For System.Linq I use LinqBridge http://www.albahari.com/nutshell/linqbridge.aspx 

So Chart control will not show to you unless you have a project made in .net 3.5+

I research a lot and many trick is no longer works.

 

Here is the trick to implement the Chart control.

Actually my chart in winform is working (in .net 2 code is ready but only visual studio refuse to run it) so I make a new Winform project in .net 3.5 add the dll reference and add the chart to form. This is all I need to use it in my project.

When I compile it’s done (.net 3.5)

Now I copied the same dll to .net 2 project. You can add this dll in .net 2 and it will run on system those contain .net 2 framework. You need to copy local the chart dll (so it will not require anything on client pc).

 

Now When you open the form it will not show anything but it  will run perfectly. My Visual studio 2015 simply refuse it because it’s doesn’t get it. But it will run perfectly.

 

For any debug issue you can simply make a copy and change it to .net 3.5  and debug it for fix. Copy the same code back in .net 2 and it will run.

 

The only thing that you will miss is you can’t see when you open the form in design mode. You need to use another copy in .net 3.5 to debug it. Except this, this code will work fine.



If your visual studio run too slow for download the nuget package that is common to the most project you build in daily rutine then you can follow same trick as 2013.

open the local appdata folder by this

%userprofile%\appdata\locallow

open the nuget > cache folder and add it to

Tools > options > Package source > Add it here and next time choose Offline for package source and you can save your time and bandwidth both.



If you compile your winform project (regardless to target version of .net framework) and it’s can’t be compiled on another machine (which don’t have update 1 RC as yours) then here is the trick to fix it.

 

Delete Every obj folder in root of every projects. if you have multiple project then consider this stackoverflow post to do it faster http://stackoverflow.com/questions/755382/i-want-to-delete-all-bin-and-obj-folders-to-force-all-projects-to-rebuild-everyt


Now when you done after delete all obj folder you can simply click F5 and it will be run fine.

 

Smile



I am removing this post since I am no longer use Amazon.in or amazon.com for anything. For more information search the internet for better result.


In previous version of Visual studio (2013 actually) Web Essentials 2013 compile everything easily. If you just fork something and start editing less file it’s save the .css file in same folder where the .less file reside.

 

In Web Essentials 2015 the compiling process for less has been removed and it’s work no more. If you trying to use  tools like Simpless or winless they will not work because currently when I tried to use winless and simpless I got error like the file has been used by another process and visual studio show me file save dialog everytime and after saving it’s not work.

 

Don’t worry guys, As mads remove the less compiler from their extension it’s look like he has made another extension to make less compiling work.

https://visualstudiogallery.msdn.microsoft.com/3b329021-cd7a-4a01-86fc-714c2d05bb6c

You can download it from the given link. The only cons of this extension is it’s not automatically compile the less file. You need to right click on file and save the location of file to make it work.



Finding a good Music streaming is really so hard. Today I play guvera and thing to let use it for future. Now See what it happen to me.

 

First I tried to pay it doesn’t work. I tell the support and it telling me that give us error so we look into it. It’s error 25004 Payment failed.

 

It’s working on other site but not in Guvera. I thing it’s hourly issues and it’s maybe has fixed now. I tried to payment again and they charge me 1447.39 (49.91 29 times on same date). the phone that is registered continuously ping by the notification.

 

I see nothing has been changed in my account. My account is still free. Now I have contact their support by email. I got no answer. Maybe They don’t send mail after 4 PM.

I will update this when I get update back from Guvera. Right now Let’s see what happened.

 

 

Guvera_bug

 

 

 

 

 

 

 

 

 

 

Here is the screenshot to show what happened with my account.





 

2 Year ago I write a post here to give my view on Mysql and it’s nuget packages http://geekswithblogs.net/anirugu/archive/2013/11/04/donrsquot-use-mysql-.net-connector-here-is-why.aspx

 

Nuget package is much better way to fix the dll. Just type the command in console and reference has been added to your C# project very easily. You don’t need to do anything to update it every time.

Visual studio make this process easier.

 

From last few days I got a trouble. When I share with my code with other it’s not work on another machine which have Mysql Connector installed on the system.

Everytime I take there code and compiled on my machine and give them back it’s not working there. Nuget installed the nuget packages again and it’s use nuget packages reference there and it’s installed on there machine which make trouble on c# to run them.

 

The code will be compiled, Warning will be shown in Error in visual studio. But because Connector have a DLL installed in GAC it will make issues that “not matched“.

Now to fix this issues try this trick.

 

Open the csproj file of your project. Search for mysql

 

replace it with this code, Previously it’s referenced from packages folder, Now if you are making reference from bin folder it will work.

 

<Reference Include="MySql.Data, Version=6.9.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
     <SpecificVersion>False</SpecificVersion>
     <HintPath>..\projectname\bin\MySql.Data.dll</HintPath>
     <Private>True</Private>
   </Reference>

projname is your own projectname. Now it’s called the dll from your bin. Change the path according to your project location.

Now open the packages.config and where it’s stored the packages settings. Now remove the mysql reference from there but cut the line that have mysql.

If you have attached many project to your project do same on that too if they have mysql too.

 

Now it fixed. Now VS will not download the dll from Nuget again and again. Now they are calling it from Bin folder.

 

Yahooooooo. Now Nuget can’t burn my minutes to just fix them again and again.

 

Happy Coding Smile