My PC is a one and half year system that came with Windows 8 Home Premium edition. As a professional software engineering, it has been upgraded to Professional edition at soon as it arrives the office. Then installed and uninstalled tones of the software. Finally it upgrades to Windows 10 Professional edition. The problem is there are some many junks left in the system and I do not want to deal with me. Since Microsoft is so nice to provide a digital entitlement on all Windows 10 system, I think a clean reinstall can get rid off those junk files.
The reinstall goes well until I check the activation. Not a professional edition? How can it be? By doing some Internet searching, Ed Bott's How to upgrade from Windows 10 Home to Pro without hassles just solves my problem. The Windows installer is too smart to determine which Windows edition is right for your PC. If your PC comes with OEM tag in BIOS, the Windows installer will install that edition for you without asking which Windows edition you want. That's why I got Home edition. If you do happen to have the same problem, just change product key with the default product key and problem is gone.
Sunday, April 24, 2016
Friday, July 11, 2014
The Files Are Check-out After Back On-line
My colleague said he
has a problem on his visual studio solution. Every time, he worked on an offline
solution. The files were check-out as soon as the solution is back online. It
was so annoying for him. He could not just undoing pending check-out because it
will lose all his works. He want my help on solving this problem.
Since I could not
reproduce his problem, it puts on the shelf for months. Later these days, he
had the same problem again and kept the screen for me. After I saw the screen
and told him to check those files that he modifies. It looked right after this
action. Usually he just clicked OK button in that situation and all files were
check-out. So the question was why TFS thinks all files are needed to
check-out? I recalled my memory on how TFS manages the files. I knew the file’s
attribute is set to read-only when it is check-in and writable when it is
check-out. So I checked one file’s attribute in the file explorer and confirmed
my suspicion. Even though the solution explorer shown they are check-in, the
files’ attribute were writable. That’s why TFS thinks the files are modified.
There is one more
puzzle: why those files are writable during offline? My colleague believed he
does not change those files’ attribute and I believed so. It was a tedious job
to change those files’ attribute. Anyway, in order to avoid this problem again,
my colleague had to set those files’ attribute to read-only manually.
Labels:
TFS,
Tips,
Visual Studio
Saturday, April 13, 2013
Debug: Cannot watch a variable value
One day, my colleague call me for help. He cannot figure out why he cannot watch a variable value during step debug. The similar codes are shown as following:
String[] serverNames = SQLServers.GetNames();
He sets a break point at that particular line and hint shows nothing. He thinks maybe something wrong with the GetNames method. So he changes the code to a simple one:
int b1 = 1;
It shall show some thing in step debug, right? It turns out shows nothing at all. Just like the original code. Then he creates another solution, a very simple console application, with the following codes:
int a1 = 2;
int b1 = a1;
He sets the break point at a1 line and do a step over. The watcher and hint do show a1's value. Now he wonder it is a Visual Studio bug or not? He asks me to try it on my system if it is his system problem or not. Unfortunately, my system shows the same thing. I talk to my colleague that compiler may not show the value if it does optimum. However, he says it runs in debug option not release option, the code will not optimal. That's true.
I keep pondering on the debug mode and the optimum. Suddenly I remember one thing about his coding style. He loves to ship his code with debug option. As you know the debug code is not optimum. Therefore, I suggest him to check "Optimize Code" option in Build tab. Since it is a long time story, we forget it completely. After I pin up the problem. The puzzle is solved.
String[] serverNames = SQLServers.GetNames();
He sets a break point at that particular line and hint shows nothing. He thinks maybe something wrong with the GetNames method. So he changes the code to a simple one:
int b1 = 1;
It shall show some thing in step debug, right? It turns out shows nothing at all. Just like the original code. Then he creates another solution, a very simple console application, with the following codes:
int a1 = 2;
int b1 = a1;
He sets the break point at a1 line and do a step over. The watcher and hint do show a1's value. Now he wonder it is a Visual Studio bug or not? He asks me to try it on my system if it is his system problem or not. Unfortunately, my system shows the same thing. I talk to my colleague that compiler may not show the value if it does optimum. However, he says it runs in debug option not release option, the code will not optimal. That's true.
I keep pondering on the debug mode and the optimum. Suddenly I remember one thing about his coding style. He loves to ship his code with debug option. As you know the debug code is not optimum. Therefore, I suggest him to check "Optimize Code" option in Build tab. Since it is a long time story, we forget it completely. After I pin up the problem. The puzzle is solved.
Saturday, March 24, 2012
CHM: Navigation to the webpage was canceled
One day, my college asks me to check one CHM file. He cannot read anything from his computer. It sounds easy for me. I plug his USB sticker in my computer and open it. Oops, a window with nothing (Fig. 1)
Fig. 1
So I think Google can help me and do a quick search that comes out tons of the solution. The first one comes from HelpSmith.com with four possible solutions. I try one by one without luck. After digging more helps, one from StackOverFlow.com said just copy it to c:\. It sounds too simple to be true. Anyway, what can I lose? Then, it shows up flawless.
Sunday, February 20, 2011
Is not a valid win32 Application
Recently I ran into a problem. I wanted to play around AudioVideoPlayback class. A FORM was good enough to deal with it. The solution built successfully. Then, BOMB, a message box popped up and said “xxx is not a valid win32 application. (Exception from HRESULT: 0x800700C1).” What a surprised!
There was no luck from Google and MSDN. Most of the solution suggested to give up AudioVideoPlayback and used one project that was hosted in SourceForge. It was not the answer what I expected. Then an unrelated article has showed up in my eyes. The author was asked about a DLL that was managed code which call unmanaged code. It was built successful but cannot referenced and got an error: “is not a valid win32 application.” The repliers told about win32 application runs under 64-bit OS. Suddenly I thought I find the problem.
The wizard generated the build solution with “Any CPU” option. It was Ok for a 32-bit Windows but 64-bit Windows. It seems this kind of the application will call 64-bit components at first in 64-bit Windows. Somehow AudioVideoPlayback had issue on 64-bit cross over to 32-bit. The issue would be gone if the build solution specified with x86 only.
There was no luck from Google and MSDN. Most of the solution suggested to give up AudioVideoPlayback and used one project that was hosted in SourceForge. It was not the answer what I expected. Then an unrelated article has showed up in my eyes. The author was asked about a DLL that was managed code which call unmanaged code. It was built successful but cannot referenced and got an error: “is not a valid win32 application.” The repliers told about win32 application runs under 64-bit OS. Suddenly I thought I find the problem.
The wizard generated the build solution with “Any CPU” option. It was Ok for a 32-bit Windows but 64-bit Windows. It seems this kind of the application will call 64-bit components at first in 64-bit Windows. Somehow AudioVideoPlayback had issue on 64-bit cross over to 32-bit. The issue would be gone if the build solution specified with x86 only.
Tuesday, November 09, 2010
[Bug]C2509: ExitInstance
It was a strange thing when I use AppWizard to generate a SD application with Office 2007 style in VS 2010. The code was generated in an inherited CWinappEx class. However, this method was not declared in header file. It generated a C2509 error when building the project.
At this moment, I manually added the declaration in the header file for removing this error message. Maybe VC team will fix it in the later service pack.
At this moment, I manually added the declaration in the header file for removing this error message. Maybe VC team will fix it in the later service pack.
Labels:
C/C++,
Computer Technology,
Tips,
VC 2010,
Windows
Thursday, September 30, 2010
emulator: ERROR: the user data image is used by another emulator. Aborting
By developing Android application under Eclipse is a wonderful thing. One thing bothers some developers is an error message “emulator: ERROR: the user data image is used by another emulator. aborting.” There are tons of the postings and the answers by searching this error message. In my opinion, those solutions are too complex and handy. Then one solution comes to my eyes, http://www.cnblogs.com/over140/archive/2010/08/06/1793264.html. His method is quite simple – just reset adb. Simple, right?
Subscribe to:
Posts (Atom)
