Search code examples
c#winformsversioning

Edit deterministic value in WinForms desktop application project to avoid error CS8357


In C# WinForms desktop application, according The specified version string contains wildcards, which are not compatible with determinism I've to change <Deterministic>True</Deterministic> to false in myproj.csproj

to increment version with asterisk:

[assembly: AssemblyVersionAttribute("1.0.*")]

and avoid:

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

but I can't find xml document with <Deterministic>True</Deterministic> in the project, as it is shown in here The specified version string contains wildcards, which are not compatible with determinism


Solution

  • You don't need to look for an XML file.

    The document you are looking for is the .csproj of the project.

    There, under the tag <PropertyGroup>, you can place <Deterministic>False</Deterministic>

    The <Deterministic>False</Deterministic> does not exist in the file, because default value is set to True.

    Just add it to .csproj like the examples in the links you added.