[英]Getting application GUID in a .NET Core 6 application
當我在 .NET Framework 中編程時,我曾經通過這種方式獲取 Winforms 應用程序的 GUID: 我什至可以通過這種方式獲得其他價值,例如公司: 在 .NET Core 中不起作用,例如,返回一個空的 GUID。 我該怎么做? ...
[英]Getting application GUID in a .NET Core 6 application
當我在 .NET Framework 中編程時,我曾經通過這種方式獲取 Winforms 應用程序的 GUID: 我什至可以通過這種方式獲得其他價值,例如公司: 在 .NET Core 中不起作用,例如,返回一個空的 GUID。 我該怎么做? ...
[英]Azure Pipeline 1 solution with multiple projects and separate versions
我設置了一個 azure 管道來構建一個 .net 框架 class 庫。 當前設置是解決方案中的 1 個解決方案和 1 個項目,一切正常。 我使用Assembly Info Reader擴展來讀取用於版本控制的AssemblyInfo.cs 。 這工作正常,完全符合預期。 我想要實現的是將第二個項 ...
[英]Azure Pipelines populate NuGet package fields
我有一個使用 .net 框架 4.6.1 的 Class 庫項目,我正在使用 Azure 管道構建一個 NuGet package。 我已經填充了 NuGet package 屬性中的大部分字段,但是我正在努力解決一些問題。 我正在使用擴展從 AssemblyInfo.cs 讀取AssemblyIn ...
[英]Need to get TortoiseSVN revision programmatically
我希望 TortoiseSVN 修訂號可用於從我的 MVC C# 應用程序中讀取(使用 MS Visual Studio 2019) 我需要知道如何讓 Tortoise 將存儲庫的修訂號寫入我的網絡應用程序可以訪問的文本文件或 Properties/AssemblyInfo.cs 或 web.Con ...
[英]How to handle fixed and variable [assembly] items if both seem to be present mandatory inside one file?
我正在建立一個構建服務器,也稱為持續集成服務器,基於 Jenkins,用於構建 C# 應用程序和 DLL。 我有一個AssemblyInfo.cs文件,其中包含兩種信息: 固定信息,例如: ...和可變信息,例如: (這是由命令dotnet-gitversion /updateass ...
[英]How to add commit hash to details of an executable file using GitVersion
在上一個問題中,我詢問了如何將提交 hash 添加到在 Visual Studio 中構建的可執行文件。 我快到了:我決定使用GitVersion ,這個工具確實修改了我的 Visual Studio 項目的AssemblyInfo.cs文件,導致一些有趣的信息被添加到我的可執行文件的“詳細信息”選 ...
[英]Is AssemblyInfo.cs file needed for .Net Core projects?
我已將 Asp.Net 框架中的 WPF 項目遷移到 Asp.Net 核心中。 現有的 .net 項目在屬性文件夾中有 AssemblyInfo.cs。使用“dotnet new wpf”創建新的 WPF 項目時。 AssemblyInfo.cs 文件被添加。 .Net 框架中的 Assemb ...
[英]Log4Net configuration loading in AssemblyInfo
我面臨一個奇怪的問題。 在一個解決方案中,我有一個共享程序集信息文件(解決方案文件)並將其與常規 AssemblyInfo.cs 一起鏈接到我的項目中。 屬性設置為構建。 所有項目之間共享的屬性位於 SharedAssemblyInfo.cs 文件中。 特定於項目的屬性位於 AssemblyInfo ...
[英]Update AssemblyInfo const variable
我有一個文件,我在其中指定了我的版本: 我嘗試使用構建管道上的“Update AssemblyInfo”任務更新它: 執行任務時,請記錄更新: 但是文件的內容沒有更新:它仍然存在: 我是否需要刪除 const 字符串並將字符串內容放在方法的參數中? 那么更換真的會完成嗎? ...
[英]What is TempAssemblyInfo.cs?
我的問題很基本,我了解 AssemblyInfo.cs 是什么,但是為什么在同一個 Properties 文件夾中會生成一個 Temp 版本? 它是干什么用的? 人們通常會將其添加到 their.gitignore 中嗎? ...
[英]AssemblyInfo in dotnet core/csproj with Property from Target
我正在嘗試使用從編譯日期時間和 mercurial 修訂版自動生成的程序集信息設置一個 csproj。 在控制台 output 上,我得到了一致的結果:2.90.20160.239 但在 tmp AssemblyInfo.cs 中僅正確使用了 $(Build),$(Revision) 基本上為 0。 ...
[英]Configuring log4net without code in Rider for dotnet 2.1 project
我正在使用 Rider IDE 開發一個寵物 .netcore2.1 項目。 我目前正在嘗試為項目添加 log4net 支持,並嘗試以“正確的方式”(單獨的配置文件,自動配置 log4net 而無需編寫初始化代碼等)。 到目前為止,我發現的所有教程( ex1 , ex2 )都建議通過添加程序集屬性 ...
[英]Could not load file or assembly "path" or one of its dependencies. The system cannot find the file specified
我有一個服務。 我嘗試使用 c# 安裝它。 即使存在服務文件,我也收到錯誤消息Could not load file or assembly 'file:///C:\\Sample\\sample.exe' or one of its dependencies. The system cannot ...
[英]Visual Studio always restoring because Directry.Build.props
我創建了一個Directory.Build.props文件,其中VersionSuffix包含當前的Hour和Minutes : <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Pro ...
[英].Net Core msbuild build.proj equivilent of AssemblyInfo
我正在將一個項目從 AspNet Mvc 4 升級到 AspNet Core Mvc 2.2; 我正在嘗試遷移 msbuild build.proj 文件以為創建 dll 的項目設置版本和其他屬性; 除 GenerateAssemblyInfo 任務外,一切正常。 在 netcoreapp2.2 ...
[英]Programmatically access metadata from project file
在VS2019/.NET Core 3.0中,項目元數據保存在項目文件中: 其中一些 vales 可以通過版本或自定義屬性訪問。 但是像Authors 、 PackageTags等一些新值還不是AssemblyInfo處理的一部分。 我的問題是:如何從我的應用程序中訪問這些值? ...
[英]How to programatically update AssemblyInfo.cs as a Pre-Build event (Visual Studio / msbuild)
我想在項目中定義一個位置來存儲版本字符串。 我要尋找的行為是將版本存儲在項目目錄中的文本文件(version.txt)中,然后我的預生成事件更新了Properties / AssemblyInfo.cs中的內容。 是的,我知道只有兩個字段,並且它們彼此相鄰,但是我仍然想知道這是否可行。 ...
[英]Modify the .exe's AssemblyInfo using PowerShell in TFS 2018 build
我想使用 PowerShell 更新我的應用程序的程序集信息,如 TFS vNext 版本中的產品名稱、文件描述。 我想在構建定義中使用構建變量並將其傳遞給腳本。 我已經用這個( https://writeabout.net/2015/11/01/set-assembly-and-app-vers ...
[英]How can you share Assembly Info between VS 2019-formatted projects?
在VS 2017中,或更准確地說,在VS 2017中使用的舊項目格式中,每個項目都有一個帶有Properties文件夾的AssemblyInfo.cs文件,其中包含項目版本,版權等內容。 如果您想在多個項目之間共享某些信息,比如說特定解決方案中的所有信息,則創建一個AssemblyInfo ...
[英]Using of updated value in AssemblyInfo.cs
我想弄清楚如何處理和更新C# WinForms桌面應用程序的AssemblyInfo.cs的值。 例如,在哪里以及如何處理 並在AssemblyInfo.cs更新以始終只獲得currentYear與特定.exe - > Properties/Details - > de ...