等效于dotnet core / csproj中的AssemblyInfo

由于dotnet核心移回了.csproj格式,因此自动生成了一个新的MyProject.AssemblyInfo.cs包含其中的内容。


[assembly: AssemblyCompany("MyProject")]

[assembly: AssemblyVersion("1.0.0.0")]

请注意,这会在每个版本中自动重新生成。以前,该文件是在/ obj /目录中找到的,但现在似乎只存在于内存中,因为在磁盘上找不到该文件,并且单击错误消息不会打开任何文件。

由于它们是在那里定义的,所以我无法在古典音乐中自己定义它们AssemblyInfo.cs。


我在哪里/如何定义项目的公司和版本?


呼唤远方
浏览 1121回答 3
3回答

繁星点点滴滴

这些设置已移到.csproj文件中。默认情况下,它们不会显示,但是您可以从Visual Studio 2017的项目属性Package选项卡中找到它们 。项目属性,选项卡包保存后,可以在以下位置找到这些值 MyProject.csproj<Project Sdk="Microsoft.NET.Sdk">&nbsp; <PropertyGroup>&nbsp; &nbsp; <TargetFramework>net461</TargetFramework>&nbsp; &nbsp; <Version>1.2.3.4</Version>&nbsp; &nbsp; <Authors>Author 1</Authors>&nbsp; &nbsp; <Company>Company XYZ</Company>&nbsp; &nbsp; <Product>Product 2</Product>&nbsp; &nbsp; <PackageId>MyApp</PackageId>&nbsp; &nbsp; <AssemblyVersion>2.0.0.0</AssemblyVersion>&nbsp; &nbsp; <FileVersion>3.0.0.0</FileVersion>&nbsp; &nbsp; <NeutralLanguage>en</NeutralLanguage>&nbsp; &nbsp; <Description>Description here</Description>&nbsp; &nbsp; <Copyright>Copyright</Copyright>&nbsp; &nbsp; <PackageLicenseUrl>License URL</PackageLicenseUrl>&nbsp; &nbsp; <PackageProjectUrl>Project URL</PackageProjectUrl>&nbsp; &nbsp; <PackageIconUrl>Icon URL</PackageIconUrl>&nbsp; &nbsp; <RepositoryUrl>Repo URL</RepositoryUrl>&nbsp; &nbsp; <RepositoryType>Repo type</RepositoryType>&nbsp; &nbsp; <PackageTags>Tags</PackageTags>&nbsp; &nbsp; <PackageReleaseNotes>Release</PackageReleaseNotes>&nbsp; </PropertyGroup>在文件资源管理器属性信息选项卡中,FileVersion显示为“文件版本”和Version显示为“产品版本”
打开App,查看更多内容
随时随地看视频慕课网APP