Visual Studio 2015 is very slow on Windows 10

When I have upgraded Windows 7 my computer to Windows 10 I have also installed Visual Studio 2015 professional. From the first moment Visual Studio 2015 was very slow. My computer was freezing all the time.

I have read many articles about the slowness of Visual Studio 2015, but I cold not find anything that helped, so I have decided to switch back to Windows 7. Unfortunately after the downgrade process my computer did not boot anymore. Finally I had to reinstall Windows 7 and all my applications. Luckily all my files were on the hard drive, so I did not lose anything.

Since that, I have found the following recommendation at http://stackoverflow.com/questions/31760339/visual-studio-2015-slow

  • Uncheck [Tools->Options->General->Automatically adjust visual experience based on client performance]
  • Uncheck [Use graphics acceleration if available]
  • You can leave [Enable rich client visual experience] checked

Sooner or later I will have to bite the bullet and install Windows 10 again, hopefully by that time Microsoft corrects this very serious problem, or I will try these steps to make it work.

 

NUnit in Visual Studio 2015

To use NUnit in Visual Studio 2015

Create a unit test project and download NUnit from NuGet

  • Start Visual Studio 2015 and open or create a solution
  • In your solution create a new class library for your unit tests
  • Right click the unit test project and select Manage NuGet Packages
  • Type NUnit into the search field
  • Install
    • NUnit
    • NUnit Test Adapter
    • NUnit Runners

Create unit tests

Run the unit tests

DynDns update error

On Windows 8 and Windows Server 2012 the Dyn Updater cannot update the IP address if you set the IPv-4 Configuration to Automatic during installation. The log contains the following error messages:

daemon – WARNING – Unable to get IP addresses for …dyndns.org, will retry later.

frontend – WARNING – API request failed. Status: 500 Method: ipaddress.get

frontend – WARNING – API error: Error connecting to checkip.dyndns.org. Please verify your internet connection and try again.

To make the Automatic IPv-4 Configuration setting work

  • Open a web browser and get the current IP address by navigating to http://checkip.dyndns.com/
  • Open the Dyn Updater,
    • Select the  host you want to fix,
    • Click the Configure Selected Hosts button.
      DynDns01
    • Select Static Address for the IPv4 Configuration,
    • Enter the current IP address,
    • Click the OK button.
      DynDns02

    • Select the item again and click the Refresh Host List button.
      DynDns03

    • Select the item again and click the Configure Selected Hosts button.DynDns04
    • Select the Automatic IPv-4 Configuration and click the OK button.
      DynDns05

 

Value was either too large or too small for a UInt32 error message when checking files into TFS

When you try to check-in or shelve files in Microsoft Team Foundation Server (TFS) sometimes the following error message appears:

Value was either too large or too small for a UInt32.

Cause:

There is an unsaved file in the IDE.

Solution:

Click Save All in the tool bar and try to check-in the files again.

No Entity Framework provider found for the ADO.NET provider with invariant name ‘System.Data.SqlClient’

When one of the projects in your solution is referencing the Entity Framework to access a database the Entity Framework NuGet package is added to that project. In the Visual Studio IDE your application may work fine, but when you deploy it to the test or production server the following error message may appear:

Exception Type: System.Data.Entity.Core.MetadataException
Exception: Schema specified is not valid.
Errors: [YOUR_DATABASE].ssdl(2,2) : error 0152: No Entity Framework provider found for the ADO.NET provider with invariant name ‘System.Data.SqlClient’. Make sure the provider is registered in the ‘entityFramework’ section of the application config file. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information.

To resolve the problem add the Entity Framework NuGet package to the main project of your application:

  • In the Solution Explorer right click the main project,
  • Select Manage NuGet Packages… in the context menu,
  • On the left side of the NuGet manager select Online, Microsoft and .NET,
  • On the right side enter EntityFramework into the search field and hit Enter,
  • In the middle click Install in the EntityFramework box.

How to add a new table to an existing Microsoft SQL Server replication publication

To add a new table to an existing MS SQL Server publication

  • Remote desktop into the database server, or a server in the same domain of the database server
  • Start Microsoft SQL Server Management Studio (SSMS)
  • Connect to the database with ComputerName\SQLServerName
    If there is only one instance of Microsoft SQL Server on the computer the two names are usually the same, but still both are needed, otherwise you get the following error message:SQL Server is unable to connect to server…
    Additional information:
    SQL Server replication requires the actual server name to make a connection to the server. Connections through a server alias, IP address, or any other alternate name not supported. Specify the actual server name, …\…  (Replication.Utilities)
  • Right click the Local Publication
  • Select the Articles page
  • Uncheck the “Show only checked articles in the list” check box to see the not replicated tables
  • Select the tables you want to add to the replication
  • Click OK

Error creating a Scheduled Task on Windows Server 2008 R2

When the “Run whether user is logged on or not”  option is selected in the General tab of the Create Task window the Task Scheduler has to save the password of the selected user.

During the save the following error message appears:

Task Scheduler

An error has occurred for the task <task name>. Error message: The following error was reported: A specified logon session does not exist. It may have already been terminated.

To enable the Task Scheduler to save the password of the selected user, disable the Network access: Do not allow storage of passwords and credentials for network authentication security policy of the server:

  • Click the Start button of the Start Menu and enter SECPOL.MSC into the Search programs and files text field
  • On the left side select Security Settings | Local Policies | Security Options
  • On the right side double click the Network access: Do not allow storage of passwords and credentials for network authentication policy
    Do not allow storage of passwords
  • Select the Disabled radio button and click OK
    Do not allow storage of passwords Disabled

 

Enable File Level Authentication or set SSL requirements in IIS 7 and 7.5

In Windows Server 2008 and 2008 R2 the Internet Information Services (IIS) Manager looks different from the  IIS 6 version.

To set file level attributes, like authentication, SSL requirement, follow the steps below:

  • Start Internet Information Services (IIS) Manager
  • On the left side select the application you want to administer.
  • At the bottom of the middle pane select the Content View tab to view the files of the application.
  • In the middle pane right click the file you want to administer and select Switch to Features View in the drop down menu.
  • In the middle pane double click the Authentication, SSL Settings, or any other icon you want to make changes to.

How to create a mirrored volume in Windows Server 2008 R2?

To create a mirrored volume in Windows Server 2008 R2

  • In the Start Menu right click Computer,
  • In the popup menu select Manage,
  • On the left side of Server Manager expand Storage and select Disk Management,
  • You need a second hard drive with as much unallocated space on it as the size of the volume you want to mirror.
  • Right click the volume you want to mirror and select Add Mirror…
  • Select the disk that will contain the mirror and click the Add Mirror button,
  • The operating system will create a volume on the mirror disk and will start to copy the contents of the original volume to the mirror. This operation can take hours depending on the size of the mirrored volume.

IPv4 Network Subnet Prefixes, Masks, Usable Hosts

The following table shows the IPv4 network subnet prefixes, subnet masks, and the number of usable hosts.

Prefix size Network mask Available subnets Usable hosts per subnet Total usable hosts
/24 255.255.255.0 1 254 254
/25 255.255.255.128 2 126 252
/26 255.255.255.192 4 62 248
/27 255.255.255.224 8 30 240
/28 255.255.255.240 16 14 224
/29 255.255.255.248 32 6 192
/30 255.255.255.252 64 2 128
/31 255.255.255.254 128 2 * 256

* for point-to-point links only

In a subnet the following two addresses cannot be assigned to hosts:

  • the first address is the address of the subnet,
  • the last address is the broadcast address to all hosts.