- .NET Framework可以移轉到NET Core,可以透過.NET Portability Analyzer來進行分析
- .NET Framework只有支援Windows平台
- 如何正確判斷程式語言是C#開發
- 觀察是否有程式進入點public static void Main
- 副檔名是否為cs
- 程式內容是否有namespace關鍵字開頭
- 程式內容是否有using關鍵字開頭
- 程式內容是否有class關鍵字開頭
- 如何判斷該專案使用.NET Framework的版本
- 專案 > Solution Explorer > Properties > Application > Target Framework
遇到一些狀況與解決方案
問題一、檔案產生後不會自動加密出現錯誤
It is NOT certain that the key belongs to the person named
in the user ID. If you *really* know what you are doing,
you may answer the next question with yes.
解決方案
gpg --edit-key YOUR@KEY.ID
gpg> trust
Please decide how far you trust this user to correctly verify other users' keys
(by looking at passports, checking fingerprints from different sources, etc.)
1 = I don't know or won't say
2 = I do NOT trust
3 = I trust marginally
4 = I trust fully
5 = I trust ultimately
m = back to the main menu
Your decision? 5
Do you really want to set this key to ultimate trust? (y/N) y
資料來源:https://askubuntu.com/questions/288853/why-is-gpg-getting-upset-and-how-do-i-stop-it
問題二、可以將昨天產生的檔案刪除嗎
string OldfileName = DateTime.Now.AddDays(-1).ToString("yyyyMMdd");
string path = System.Configuration.ConfigurationManager.AppSettings["FilePath"];
string OldfileName1 = path + "\\" + OldfileName + ".csv.gpg";
string OldfileName2 = path + "\\" + OldfileName + ".xls.gpg";
log.Info("刪除檔案:" + OldfileName1);
File.Delete(OldfileName1);
log.Info("刪除檔案:" + OldfileName2);
File.Delete(OldfileName2);
從以前一直覺得.NET很厲害,但是就是一直沒學好他,很多似懂非懂的觀念,但是現在ChatGPT派上用場,釐清一些觀念外,也幫忙開發程式
沒有留言:
張貼留言