Vs compilation error cs1525: invalid expression term ‘throw’, check the package Microsoft Net. Whether the compilers version is lower than 2.1.0. If it is lower than 2.1.0, upgrade this package to more than 2.1.0.
Tag Archives: Vs
Vs publish error: NETSDK1152: multiple publishing output files with the same relative path were found
report errors
C:\Program Files\dotnet\sdk\6.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(112,5):
Error netsdk1152: multiple publication output files with the same relative path were found:
D:\backup – work\project – February 27, 2020\Luzhou Yangtze River sixth bridge\SRC\lzcjlqbim.Webapp.MVC\lzcjlqbim.Webapp.MVC.XML, bin\debug\netcoreapp2.2\netcoreapp2.2\lzcjlqbim.Webapp.MVC.XML.
There was no such thing in the previous release. I don’t know why this release overturned. Find out the reason slowly in the future…
Solution:
New code in lzcjlqbim.webapp.mvc.csproj
<PropertyGroup>
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
</PropertyGroup>
Vs link error lnk2026: the module is not secure for safeseh images
The solution is as follows:
This problem can only be encountered when using x86. My project is 64 bit. The specific setting location is shown in the figure below: select no safeseh: No
Official interpretation: safeseh
Vs generation fails without error [How to Solve]
Vs generation fails without error
Problem Description:
Copy from one machine to another
The first XP system, VS2005 framework2.0
Second win7 Vs2011 used
Reason for generation failure:
Some DLLs inside are not registered in win7, that is, there is a yellow exclamation mark
Due to more than 700 warnings, ha ha
Important information can’t be seen, so I don’t know what’s wrong
Solution:
Item (all) — “right click” — “property” — “generate” — “warning” set to 0 (portal)
View specific warning errors: C# compiler error warning
Then regenerate. At this time, most of the warnings will disappear. There are only a few messages that affect the generation failure. At this time, you can view and modify the target
Summary: if the generation fails, but there is no error prompt and only a warning, you should see the warning (the situation I encountered is that several DLLs do not exist and a yellow exclamation mark appears Remove it (OK)
[Solved] VS Compilation errors: #error: Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll ver…
error
The following error occurred while compiling the file with vs:
#error: Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _ AFXDLL or do not use /MD[d]
Checked on the Internet, most of the solutions ignore some details, so they may not solve the problem. Here are some details
solutions
1. Select “solution manager” first, and then change “multi thread debugging DLL (/ MDD)” to “multi thread debugging DLL (/ MT)” or “multi thread debugging (/ MTD)” according to the following path: Project – properties – C/C + + – code generation – runtime
2. Select “solution manager”, and then follow the following path: Project – properties – configuration properties – General – Project default – use of MFC, and select “use MFC in shared DLL” (sometimes it does not need to be modified)
3. From the error prompt: “please define”_ Afxdll or do not use/MD [D] “, we can also define” define “_ Afxdll “to solve the problem
precautions
1. Note that selecting “property manager” and “Solution Explorer” will get different property pages. The former is to modify the properties of the whole vs system, while the latter only affects the current project
2. What is provided here are only three points that should be modified to solve this error. If the above solution is completely followed, sometimes it can not solve the problem. The correct idea is to randomly combine the options mentioned in the first two methods and recompile them to try to find out if there is any error. This is the easiest way. After all, everyone is configured in a different environment
[Solved] VS error C4996: ‘scanf’: This function or variable may be unsafe.
Compile the C language project in VS, if the scanf function is used, the following error will be prompted when compiling:
error C4996:’scanf’: This function or variable may be unsafe. Consider using scanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
The reason is that Visual C++ uses more secure run-time library routines. The new Security CRT functions (that is, those with the “_s” suffix), please see
“Security Enhanced Version of CRT Function”
The solution to this problem is given below:
Method 1 : Replace the original old functions with new Security CRT functions.
Method 2 : Use the following methods to block this warning:
- Define the following macros in the precompiled header file stdafx.h (note: it must be before including any header files):
#define _CRT_SECURE_NO_DEPRECATE
- Or statement
#pragma warning(disable:4996)
- Change the preprocessing definition:
Project -> Properties -> Configuration Properties -> C/C++ -> Preprocessor -> Preprocessor Definition, add:
_CRT_SECURE_NO_DEPRECATE
Method three : Method two does not use the more secure CRT function, which is obviously not a good method worth recommending, but we don’t want to change the function names one by one. Here is an easier method:
Define the following macros in the precompiled header file stdafx.h (also before including any header files):
#define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 1
When linking, it will automatically replace the old functions with Security CRT functions.
Note: Although this method uses a new function, it cannot eliminate the warning. You have to use method two (-_-) at the same time. In other words, the following two sentences should actually be added to the precompiled header file stdafx.h:
#define _CRT_SECURE_NO_DEPRECATE
#define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 1
Explanation of the cause of the error:
This kind of warning from Microsoft is mainly because of the functions of the C library. Many functions do not perform parameter detection (including out-of-bounds). Microsoft is worried that using these will cause memory exceptions, so it rewrites the functions of the same function. The function of has carried out parameter detection, and it is safer and more convenient to use these new functions. You don’t need to memorize these rewritten functions specifically, because the compiler will tell you the corresponding safe function when it gives a warning for each function. You can get it by checking the warning message. You can also check MSDN for details when you use it.
When using FORTRAN under vs, there is a fatal error lnk1561: the entry point must be defined, which is the solution to this problem
After chopping hands, the fraud call came before the express delivery was received. How to improve the privacy and security of e-commerce>>>
After IVF is installed, a new project is created, but it can’t run
The error is as follows
solution:
Click configuration manager
Click new on the platform, select new platform, copy settings from here, and select Win32
Set the active solution platform to x64
It can run normally
Note: if you don’t select it, copy the settings from here and select Win32. The following error will be reported. You only need to delete the new one and reset it
AWStats Vs Webalizer Vs Google Analytics Visito…
Recently, I’m deploying the web log statistics program. I’ve seen several mainstream open source analysis software on the Internet. I don’t know which one is better. After a search, I’ve got a general understanding of the differences between the three statistics. Different web statistical programs will give different results for different purposes.
The following is a real statistical case of the three
The three main differences are: Google Analytics collects users’ access information through a piece of code embedded in the page program, while the other two collect users’ information by analyzing the logs on your web server. This shows the difference in data collection. Google Analytics collects data on the user’s browser, and the other two programs collect data on your server. In fact, if you live in different time zones and visit different sites, the three treat ‘days’ differently. Google Analytics mainly depends on the local time of your life, while the other two treat’ days’ differently according to the time on your site server.
Google Analytics
1 Goole statistics relies on embedding a special JS code in each page of your site. It’s very easy to embed a special code in all pages. It can be solved with tools such as CMS, but not everyone thinks it is feasible. Some pages may not have a suitable place to embed Google’s JS statistics code, so when users visit these pages, they can count the number According to the data, there will be errors.
2. Even if all web pages of a site are embedded with statistical code, if the site is slow to load, the Google statistical code may not have a chance to run. For example, the statistical code is deployed at the bottom of the web page.
3. Some users are afraid of malicious JS code on the site. They may refuse part or all of JS code to run on their browser. If your visitors are such users, the statistics will be wrong.
Google statistics relies on cookies to calculate what a visitor has done, such as whether a user is a new visitor or an old visitor. It can also calculate the duration of a visitor’s visit. If the user cleans up the cookies, the Google statistics program will lose this part of the data.
Google stats doesn’t record search engine robots or other crawlers that visit your site. If you want to know which robot visited your site, you have to go to the log on the server to find it.
Google statistics program starts counting 30 minutes after a user visits the page. If you visit a site and it takes 31 minutes for you to go out for lunch, then browsing the same site again will be counted as two visits.
As a site statistics tool, Google analytics can help you find out where users visit you, how they find you, what they do on your site, and so on. With this information, you can optimize your site for market changes. Generally speaking, it is suitable for marketing personnel to make business adjustments according to statistical information.
AWStats
Awstats defines an authorized visitor based on IP address and user agent, and obtains statistics by analyzing your web service logs. For example, some visitors use the browser’s agent (firebox) to visit several pages and have an IP address. At this time, the statistical program thinks that a human has visited the site. However, if the user agent is Google bot, it will reject the data in the statistics.
However, some robots can’t be recognized. Therefore, awstats keeps a database of robots that can be recognized, and the visits of robots are sometimes counted as human visits. Sometimes accessing a site with different IP addresses in the same session will be regarded as multiple access records. If a user visited a page that he visited yesterday or last week, awstats will not measure all his visits.
You can see how much bandwidth robots or crawlers consume on your site and where they come from. It’s useful to find out who’s crawling your site.
4. Awstats does not use cookies statistics. Awstats uses a period of 60 minutes to count the number of visits. If a user visits for 30 minutes and visits again after 35 minutes, it will be regarded as an access record. However, if a user visits for 55 minutes and visits again after 10 minutes, it will be regarded as two visit records.
Awstats is not a market statistics tool, but it can let you understand which is user access and which is robot access. You may find that someone is stealing your pictures, occupying your bandwidth and so on. Awstats is more suitable as an admin tool than a marketing tool.
Webalizer
Webalizer is similar to awstats in that it analyzes the logs on the server and does not try to distinguish between human access and robot access.
Webalizer uses 30 minutes to count user visits instead of 60 minutes in awstats, so more visitors will be recorded.
You can set webalizer to ignore confirmed spiders or robots.
Just like awstats, webalizer is not a tool used by marketers. As an admin tool, webalizer is slightly worse than awstats. The software has been silent since 2002 and has been updated since 2008.