Пример #1
0
        private void AddPublicKeyToken()
        {
            // Get snk file
            string path = Path.Combine(this.ProjectFullPath, ActiveProject.Properties.Item("AssemblyOriginatorKeyFile").Value as string);

            string publicKeyToken = StrongNameKey.GetPublicKeyToken(path);

            if (!String.IsNullOrEmpty(publicKeyToken))
            {
                this.Replacements.Add(ItemPropertyValues.PublicKeyToken, publicKeyToken);
            }
            else
            {
                throw new ApplicationException("There is no strong name key assigned to this project. Please add one.");
            }
        }