dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
18.85k stars 4.01k forks source link

version with wildcards and determinism - AssemblyInfo.cs #39354

Open vsfeedback opened 4 years ago

vsfeedback commented 4 years ago

This issue has been moved from a ticket on Developer Community.


Hello,

I have a sugestion: update the message // You can specify all the values or you can default the Build and Revision Numbers // by using the '' as shown below: // [assembly: AssemblyVersion("1.0.")] // and set the <Determinism>false</Determinism> in project file as shown below: <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProjectGuid>{559EFE43-8D23-4FEE-A9E6-A2D70AB5C855}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>DataAccess</RootNamespace> <AssemblyName>DataAccess</AssemblyName> <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> // <Deterministic>false</Deterministic> </PropertyGroup>

This will avoid the error message: Error CS8357 The specified version string contains wildcards, which are not compatible with determinism. Either remove wildcards from the version string, or disable determinism for this compilation
DataAccess C:\Users\anton\source\repos\OperatorNotificationSystem\DataAccess\Properties\AssemblyInfo.cs 35 Active

thanks,

Antonio Herrero Lopes


Original Comments

Jane Wu [MSFT] on 10/15/2019, 07:27 PM:

Thank you for taking the time to provide your suggestion. We will do some preliminary checks to make sure we can proceed further. We’ll provide an update once the issue has been triaged by the product team.

jinujoseph commented 4 years ago

cc @jmarolf do you know where the template for this file is ? AssemblyInfo template

tmat commented 4 years ago

I don't think we should make this part of a template. We want customers to use deterministic build and stop using AssemblyVersion(*), not the other way around.