The specified version string contains wildcards, which are not compatible with determinism.

With some versions of Visual studio when you try to make version auto number sometimes it get an error like :

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



Solution :

  1. Unload Project from visual studio and edit .csproj file Or open .csproj solution file in editor.
  2. Search for tag and Change value from true to false
  3. Save file and reload project again inside Visual studio

<propertygroup>
    <configuration condition=" '$(Configuration)' == '' ">Debug</configuration>
    <platform condition=" '$(Platform)' == '' ">AnyCPU</platform>
    <projectguid>{76602FA1-9AD8-4014-BA5D-2E9128C19AB2}</projectguid>
    <targetframeworkversion>v4.7</targetframeworkversion>
    <filealignment>512</filealignment>
    <autogeneratebindingredirects>true</autogeneratebindingredirects>
    <deterministic>false</deterministic>
  </propertygroup>

That fix the issue, Good luck ;) 


Comments

Popular posts from this blog

Could not load file or assembly 'Microsoft.ReportViewer.Common, Version=xx.0.0.0, Culture=neutral, PublicKeyToken='xxx' or one of its dependencies.

C# Crop white space from around the image