Hi I dnt have Assembly Info file I have a code generator that copile the code using System.CodeDom.CodeCompileUnit, but always on compiling code Assembly File version and Assembly version remain 0.0.0.0
Any answer will really appreciate.
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
CodeCompileUnit unit = new CodeCompileUnit();// ...CodeTypeReference attr = new CodeTypeReference(typeof(AssemblyVersionAttribute));CodeAttributeDeclaration decl = new CodeAttributeDeclaration(attr, newCodeAttributeArgument(new CodePrimitiveExpression("1.0.2.42")));
unit.AssemblyCustomAttributes.Add(decl);should work with AssemblyFileVersion as well. see here