Click here to Skip to main content
15,891,375 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
i get this error:
error CS0647: Error emitting 'System.Reflection.AssemblyVersionAttribute' attribute -- 'The version specified '1.0.-1.2552' is invalid'

in AssemblyInfo.cs. it seems that something is wrong in $Build section which is converted into -1!
where does it come from?
how can i resolve this problem?
thx
Posted

1 solution

Go to your AssemblyInfo.cs located in the Properties folder of your solution. There you can find the version attribute (something like [assembly: AssemblyVersion ...]).
Another way would be to right-click on your project -> properties -> publish.
Check if something went wrong there ... if the version number is not important to you then maybe resetting the value would help.

If the version is important to you then maybe this link can help you http://insomniacgeek.com/error-emitting-system-reflection-assemblyversionattribute-attribute-the-version-specified-1-0-080928-1-is-invalid/
 
Share this answer
 
v2
Comments
ilostmyid2 27-Oct-12 2:39am    
in AssemblyInfo.cs whenever i change -1 to 0 and try to build, this file is regenerated (by who?!) and -1 is returned back.
version is important for me. i referred to the link, but it's not applicable for me, because there's no Microsoft.VersionNumber.targets file.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900