AssemblyInfo version information asterisks

前端 未结 4 1698
梦毁少年i
梦毁少年i 2020-12-25 09:54

It says in AssemblyInfo.cs for C# projects that it\'s possible to specify version information with *

// Version information for an assembly cons         


        
4条回答
  •  生来不讨喜
    2020-12-25 10:35

    So why does the supplied comment say

    // 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.*")]
    [assembly: AssemblyVersion("1.0.*")]
    [assembly: AssemblyFileVersion("1.0.0.0")]
    

    but builds generate CS8357? Somebody didn't get the memo.

    Work around:
    
     1. Close all open documents
     2. In the Solution Explorer, right-click the Project and select Unload Project
     3. In the Solution Explorer, right-click the Project (now marked as unavailable) and select Edit to access the `.CSPROJ` file
     4. In the opened window, find `true` and change it to `false`
     5. Save the file and ensure that the edit window is closed
     6. In the Solution Explorer, right-click the Project and select Reload Project
    
    Your build (should then) work. :)
    

提交回复
热议问题