The primary reference “MySql.Data” could not be resolved because it was built against the “.NETFramework,Version=v4.5” framework. This is a higher version than the currently targeted framework “.NETFramework,Version=v4.0”.

We have a VB.NET application which was originally developed with the target framework as .NET Framework 4.5. However, because the client wants it to also run on Windows XP, we were forced it to change to .NET Framework 4. The solution is in this link. Just follow the steps on the Workaround section. I also copied the steps below to save you time from opening another page.

However, of course, if the current program requires the features that .NET Framework 4.5 offers, then you have no other choice but to re-program to support Windows XP (if the client doesn’t want to upgrade their computers and is willing to pay again to support Windows XP).


Workaround

The simplest workaround is to edit the modeling project file to ignore target framework version mismatches as follows:

1. Unload the modeling project by right clicking on it in Solution Explorer window and choosing Unload Project.

1

2. Open the project file into the editor by right clicking on it in Solution Explorer window and choosing Edit projectname.modelproj.

2

 

3. Add the following element inside the <Project> element:
<PropertyGroup>

<ResolveAssemblyReferenceIgnoreTargetFrameworkAttributeVersionMismatch>true</ResolveAssemblyReferenceIgnoreTargetFrameworkAttributeVersionMismatch>

</PropertyGroup>

3

4. Save the project file.

5. Right click on the modeling project in Solution Explorer and choose Reload Project.

4

6. Validate your architecture in the usual way.

Advertisements

Windows Explorer Hangs

Have you encountered an instance where your My Computer (or in Windows 10, the default name is This PC) just hangs out of the blue? When this happens, you will not be able to use the GUI-way of navigating through your files, although you can via command prompt. If you’re going to ask me why this happens, well, honestly I do not know. There’s a myriad of reasons why a program malfunctions. In this scenario, the “explorer.exe” is the problematic program.

As the famous line in IT Crowd says, “Have you tried turning it off and on again?”

it-crowd

This is also applicable to programs! But not all programs, so take caution when restarting a particular program in the operating system.

You may follow below steps at your own risk on how to “repair” explorer.exe. The steps below only applies to Windows 10.

  1. Open the Task Manager.
    1. You can run taskmgr.exe via Run dialog box.
    2. You can right-click the taskbar and click Task Manager.
  2. Click the Details tab.
  3. Find the explorer.exe.
  4. Right-click and click End process tree.
  5. What happens next is you basically cannot see anything but a black screen and your cursor. So what to do now??
  6. Press Ctrl + Alt + Delete. You’ll have the options:
    1. Lock
    2. Switch User
    3. Sign Out
    4. Task Manager
  7. Click Task Manager.
  8. Click on File > Run new task.
  9. Type explorer.exe.
  10. The desktop will show again as well as the windows.
  11. Try to access My Computer or This PC (or whatever name you named it). If it’s functioning properly now, then I think it’s already “fixed”. 😀

SD Card Reader Not Reading Automatically

So I had this experience with my laptop which runs Windows 10. Every time I insert my SD card, the Windows doesn’t seem to react, or maybe it’s the hardware’s fault. What I did is this:

  1. Go to the Device Manager.
  2. Find the card reader. In my laptop, it’s under Memory technology devices > Realtek PCIE CardReader.
  3. Right-click the particular card reader that you are using then click Disable.
  4. Wait for a second to completely disable. Then right-click again to Enable.
  5. At last! My SD card is now being read. 🙂

This works for me every time, although I do not know exactly the cause. I haven’t researched anything about it, I just thought of disabling / enabling it via Device Manager. 🙂

Windows: How to know which application uses a port

1. Run command prompt.
2. Type netstat -ano | findstr 0.0:<port>

For example:

netstat -ano | findstr 0.0:80

Image

The 8080 in the picture is the process ID (PID). You may see the corresponding application of the process ID through Windows Task Manager. You may also use another application such as XAMPP and run Netstat.

If there is no application using the port you provided, it will not return any value.