After installing "Microsoft.Net.Compilers.3.4.0", I was getting errors when building ASP .NET projects in Visual Studio 2019:
"...\packages\Microsoft.Net.Compilers.3.4.0\build\Microsoft.Net.Compilers.props(14,5): Error : Microsoft.Net.Compilers is only supported on MSBuild v16.3 and above"
This is a bug in Microsoft.Net.Compilers.3.4.0. Someone at Microsoft made a change in the file "Microsoft.Net.Compilers.props" without understanding the different terms. The section in question is
<Target Name="ValidateMSBuildToolsVersion" Condition="'$(BuildingProject)' == 'true'">
<!-- The new editorconfig support requires MSBuild version 16.3. -->
<Error Text="Microsoft.Net.Compilers is only supported on MSBuild v16.3 and above"
Condition="'$(MSBuildToolsVersion)' < '16.3'" />
</Target>
Please note that this section is named "ValidateMSBuildToolsVersion", not "ValidateMSBuildVersion". While the "MSBuildVersion" is 16.4 in the "C:\Program Files (x86)\Microsoft Visual Studio\2019\<editionnamehere>\MSBuild\$(MSBuildToolsVersion)\, MSBuildToolsVersion itself is not 16.4! In fact, it may not even be a number, if Visual Studio decides to use the "Current" version. That is why in the prior version of "Microsoft.Net.Compilers.props", the check looked like this:
<Target Name="ValidateMSBuildToolsVersion" Condition="'$(BuildingProject)' == 'true'">
<Error Text="Microsoft.Net.Compilers is only supported on MSBuild v15.0 and above"
Condition="'$(MSBuildToolsVersion)' == '2.0' OR
'$(MSBuildToolsVersion)' == '3.5' OR
'$(MSBuildToolsVersion)' == '4.0' OR
'$(MSBuildToolsVersion)' == '12.0' OR
'$(MSBuildToolsVersion)' == '14.0'" />
</Target>
Of course, the error text in the prior version is a little misleading as well: it referred to "MSBuild v15.0", not "MSBuild Tools v15.0".
Right now, the MSBuildToolsVersion is set to "15.0" when you create a new project in Visual Studio 2019. You can use a text editor to open the project file and verify that. If you migrated your project from an older version of Visual Studio, the number could be smaller than 15.0.
But Visual Studio 2019 does not necessarily use this number. If Visual Studio 2019 does not find what it is looking for in "C:\Program Files (x86)\Microsoft Visual Studio\2019\<editionnamehere>\MSBuild\$(MSBuildToolsVersion)\", it would automatically set MSBuildToolsVersion to "Current", and use the folder "C:\Program Files (x86)\Microsoft Visual Studio\2019\<editionnamehere>\MSBuild\Current\". That was why the prior version of "Microsoft.Net.Compilers.props" does not use "Condition="'$(MSBuildToolsVersion)' < '15.0'", since a numeric comparison would not work on "Current"!
So, for now, the fix is to change this section to
<Target Name="ValidateMSBuildToolsVersion" Condition="'$(BuildingProject)' == 'true'">
<Error Text="Microsoft.Net.Compilers is only supported on MSBuild Tools v15.0 and above"
Condition="'$(MSBuildToolsVersion)' == '2.0' OR
'$(MSBuildToolsVersion)' == '3.5' OR
'$(MSBuildToolsVersion)' == '4.0' OR
'$(MSBuildToolsVersion)' == '12.0' OR
'$(MSBuildToolsVersion)' == '14.0'" />
</Target>
Now I am able to use "Microsoft.Net.Compilers.3.4.0" without errors.
Wednesday, December 11, 2019
Tuesday, July 9, 2019
Ubuntu with 4.15 Kernel in VMWare Shows Blank Screen without Login Prompt
Today I upgraded my Ubuntu installation in VMWare Workstation 12 Player. After the upgrade, Ubuntu rebooted, but it showed only a blank screen without a login prompt.
It turns out that this is a known bug: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1832138. To fix this, I did the following:
1. Restarted the client VM and set keyboard input focus in the VM window by clicking the left mouse button in it.
2. Pressed the shift key while the VM was restarting.
3. Selected the 4.15 version as the recovery instance from the menu of boot options.
4. When a list of options for recovery modes were shown, selected to login as root.
5. Pressed the enter key when a prompt showed up and went to the root prompt.
6. Edited /etc/gdm3/custom.conf with "vi".
7. Removed the "#" at the front of the line #WaylandEnable=false to un-comment it. Saved the change.
Then I restarted the VM.
The login prompt came back, and I am now able to login again.
It turns out that this is a known bug: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1832138. To fix this, I did the following:
1. Restarted the client VM and set keyboard input focus in the VM window by clicking the left mouse button in it.
2. Pressed the shift key while the VM was restarting.
3. Selected the 4.15 version as the recovery instance from the menu of boot options.
4. When a list of options for recovery modes were shown, selected to login as root.
5. Pressed the enter key when a prompt showed up and went to the root prompt.
6. Edited /etc/gdm3/custom.conf with "vi".
7. Removed the "#" at the front of the line #WaylandEnable=false to un-comment it. Saved the change.
Then I restarted the VM.
The login prompt came back, and I am now able to login again.
Tuesday, May 14, 2019
Eliminating International Trade Deficit Is Suicide for the US
The United States has been running international trade deficits for more than forty years. The reason that the United States let this continued for so long is that international trade deficits are needed to maintain the US dollar's status of being the international trade currency.
When any country in the world wants to buy oil from the Middle East, it needs to pay with US dollars. Where would the US dollars come from? You trade with the US using any merchandise other than US dollar, of course. Once you have the US dollars, you can then buy oil from the Middle East. Of course, you can also buy shirts from China, or cars from Japan, all in US dollars. These US dollars are not going back to the US, for sure. Because they are needed for international trade with countries other than the US. As the world economy grows bigger and bigger, more and more US dollars are needed to circulate outside of the United States. The only way that this can happen is that the US runs a bigger and bigger "trade deficit".
Notice that the US trade deficit chart agrees with the fact that starting from the early seventies, the values of exported goods as share of GDP for the entire world started to rise drastically.
Here is one interesting thing that happened in 1973 (http://www.thepeoplehistory.com/1973.html):
US exports the US dollars, just like any other merchandise. It is a commodity. No other currency has this status because no other can be used for international trade this way. Once you understand this, and you accept the fact that the US dollar is a unique commodity that can be traded like any other merchandise, you will see that US does not have an international trade imbalance after all.
What would happen if US eliminates its trade deficit, i.e., no longer exports US dollars? As the world economy grows, there will be a shortage of US dollars on the international market. Like with a shortage of anything else, two things will happen:
When people find substitutes, US dollar will lose its international trade currency status. US will lose all of the perks that came with it, such as the controlling power of the international banking system, for example. Then the value of the US dollar will collapse. Because once it loses the international trade currency status, it will have far less value. Its only remaining value will be for buying merchandise from the US. Then the American people will really have to work hard for it. Just imagine, if you are having a hard time when you can just print value on paper, how hard would it be when you can no longer do that?
Many countries have been seeking substitutes of the US dollar for years. Japan wants to use Japanese Yen, EU wants to use Euro, and China wants to use Chinese Yuan. None succeeded because the cost of doing business with US dollars is always cheaper. Now with the help of Mr. Navarro, things just might tip to the side of Japan, or the side of China, or the side of EU.
Because the international trade deficits are actually balanced with the export of US dollars, there has been an influx of wealth in other commodities for the last forty some years, equal to the international trade deficits. If you have been worse off, or if you are not better off as much as you think that you should have been, you need to examine the wealth distribution system of the US in that time frame. Where did the wealth go? The cost of printing (producing) US dollars as a commodity for export should be close to zero, right? Do we really have to resort to letting Uncle Sam doing the actual importing with the dollars that it prints to be convinced of that?
If the wealth distribution system does not work right, trade or no trade, you have a problem.
When any country in the world wants to buy oil from the Middle East, it needs to pay with US dollars. Where would the US dollars come from? You trade with the US using any merchandise other than US dollar, of course. Once you have the US dollars, you can then buy oil from the Middle East. Of course, you can also buy shirts from China, or cars from Japan, all in US dollars. These US dollars are not going back to the US, for sure. Because they are needed for international trade with countries other than the US. As the world economy grows bigger and bigger, more and more US dollars are needed to circulate outside of the United States. The only way that this can happen is that the US runs a bigger and bigger "trade deficit".
Notice that the US trade deficit chart agrees with the fact that starting from the early seventies, the values of exported goods as share of GDP for the entire world started to rise drastically.
Here is one interesting thing that happened in 1973 (http://www.thepeoplehistory.com/1973.html):
US exports the US dollars, just like any other merchandise. It is a commodity. No other currency has this status because no other can be used for international trade this way. Once you understand this, and you accept the fact that the US dollar is a unique commodity that can be traded like any other merchandise, you will see that US does not have an international trade imbalance after all.
What would happen if US eliminates its trade deficit, i.e., no longer exports US dollars? As the world economy grows, there will be a shortage of US dollars on the international market. Like with a shortage of anything else, two things will happen:
- People will look for substitutes
- Its price will go up before substitutes are found. After a substitute is found, its price will drop.
When people find substitutes, US dollar will lose its international trade currency status. US will lose all of the perks that came with it, such as the controlling power of the international banking system, for example. Then the value of the US dollar will collapse. Because once it loses the international trade currency status, it will have far less value. Its only remaining value will be for buying merchandise from the US. Then the American people will really have to work hard for it. Just imagine, if you are having a hard time when you can just print value on paper, how hard would it be when you can no longer do that?
Many countries have been seeking substitutes of the US dollar for years. Japan wants to use Japanese Yen, EU wants to use Euro, and China wants to use Chinese Yuan. None succeeded because the cost of doing business with US dollars is always cheaper. Now with the help of Mr. Navarro, things just might tip to the side of Japan, or the side of China, or the side of EU.
Because the international trade deficits are actually balanced with the export of US dollars, there has been an influx of wealth in other commodities for the last forty some years, equal to the international trade deficits. If you have been worse off, or if you are not better off as much as you think that you should have been, you need to examine the wealth distribution system of the US in that time frame. Where did the wealth go? The cost of printing (producing) US dollars as a commodity for export should be close to zero, right? Do we really have to resort to letting Uncle Sam doing the actual importing with the dollars that it prints to be convinced of that?
If the wealth distribution system does not work right, trade or no trade, you have a problem.
Thursday, January 24, 2019
Ambulance Drivers Need to Know Better
My son is attending University of California San Diego. He almost got ran over by an ambulance in the middle of a pedestrian crossing, because the ambulance driver turned the pedestrian crossing signal to red immediately and gave himself a green light, and the driver then just drove through the crossing as if no one was there.
My son said that this was the second time that this happened to him.
While it is true that "the walk cycle can be skipped or shortened as emergency vehicles approach these intersections, in accordance with federal rules" (https://www.sun-sentinel.com/news/fl-miami-traffic-turnbell-091415-20150914-column.html), the law also says that the "drivers are required to yield to pedestrians already in a crosswalk, even if the signal has turned green." I do not know how many people know these laws, but the ambulance driver must have known. If he did not know, his employer is definitely being very negligent.
Putting someone's life at such great danger just because you are trying to save another makes no sense. I hope that the ambulance drivers in San Diego would not wait until something terrible happens to realize that.
My son said that this was the second time that this happened to him.
While it is true that "the walk cycle can be skipped or shortened as emergency vehicles approach these intersections, in accordance with federal rules" (https://www.sun-sentinel.com/news/fl-miami-traffic-turnbell-091415-20150914-column.html), the law also says that the "drivers are required to yield to pedestrians already in a crosswalk, even if the signal has turned green." I do not know how many people know these laws, but the ambulance driver must have known. If he did not know, his employer is definitely being very negligent.
Putting someone's life at such great danger just because you are trying to save another makes no sense. I hope that the ambulance drivers in San Diego would not wait until something terrible happens to realize that.
Subscribe to:
Posts (Atom)