|
ms
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
creating and using strongly named assemblyassembly. I have used the command line to create the key and added the .snk file to my class library, and have now tried to add the following to the AssemblyInfo.cs : [assembly: AssemblyKeyFileAttribute("Email.snk")] But I get the error : Warning 1 Use command line option '/keyfile' or appropriate project settings instead of 'AssemblyKeyFileAttribute' C:\Documents and Settings\michaelp\My Documents\Visual Studio 2005\EmailChecker\EmailChecker\EmailChecker\Properties\AssemblyInfo.cs 3 7 12 EmailChecker Can anybody tell me why I am getting this error? Thanks, Mike *** Sent via Developersdex http://www.developersdex.com *** Add the key file in the project settings GUI and it will do all that
for you. What do you mean by the 'Project Settings GUI'?
*** Sent via Developersdex http://www.developersdex.com *** > What do you mean by the 'Project Settings GUI'? I mean double click on the project Properties and then go to theSigning tab. Mike,
Before .NET 2.0, the assembly was used to indicate the location of the key file. However, the path to the key file was baked into the assembly, and it was considered a security risk. So, in .NET 2.0, the location of the key was passed to the compiler, and it signed the key at compile time without the attribute. This is why you are getting the error. As not_a_commie says, you have to go to your project, right click and select "properties". In the window that comes up, select the build tab, which will then have an area where you can set the strong name key file which will sign your assembly. -- Show quote- Nicholas Paldino [.NET/C# MVP] - mvp@spam.guard.caspershouse.com "Mike P" <mike.p***@gmail.com> wrote in message news:OA09brQMIHA.2208@TK2MSFTNGP06.phx.gbl... >I have a class library that I want to make into a strongly named > assembly. I have used the command line to create the key and added the > snk file to my class library, and have now tried to add the following > to the AssemblyInfo.cs : > > [assembly: AssemblyKeyFileAttribute("Email.snk")] > > But I get the error : > > Warning 1 Use command line option '/keyfile' or appropriate project > settings instead of 'AssemblyKeyFileAttribute' C:\Documents and > Settings\michaelp\My Documents\Visual Studio > 2005\EmailChecker\EmailChecker\EmailChecker\Properties\AssemblyInfo.cs 3 > 7 12 EmailChecker > > Can anybody tell me why I am getting this error? > > > Thanks, > > Mike > > > > *** Sent via Developersdex http://www.developersdex.com ***
Other interesting topics
|
|||||||||||||||||||||||