Posted on June 29th, 2007 by John Plummer. - - Bookmark on del.icio.us.
Vista will try and run most programs without admin rights even if you are signed on as an admin. Some programs such as Visual Studio need admin rights so it is worth setting them to always run as administrator.
Confusingly, looking at a shortcut’s properties, the compatibility tab has an option to “Run this program as an administrator”. This option is greyed out:

To set the shortcut to run as administrator go to the shortcut tab > click on Advanced… > check Run as administrator:

Check out other posts under Vista, Visual Studio - - Be first to comment.
Posted on June 18th, 2007 by John Plummer. - - Bookmark on del.icio.us.
VS2005 defaults new classes to internal rather than public (although it appears that Orcas defaults to public). This is good as it reduces the public interface of your assembly and it encourages you to actually think about whether a class needs to be public.
You can allow other assemblies access to your internal types and members though, by using the InternalsVisibleTo attribute. This is especially useful for allowing your test assembly to access your internal classes.
This attribute can only be applied to strongly named assemblies.
[assembly:InternalsVisibleTo("TestAssembly, PublicKey=TestAssembly’s public key")]
The attribute requires the assembly name and the public key. To retrieve the public key use sn.exe. Open a visual studio command prompt and enter:
sn.exe -Tp AssemblyPath
Alternatively if you use an alternate file explorer you could set up a macro.
Check out other posts under CSharp, Code, Visual Studio - - Be first to comment.
Posted on June 14th, 2007 by John Plummer. - - Bookmark on del.icio.us.
To Strongly name an assembly you need to associate it with a public and private key. This can be either done by the developer when they compile the assembly (signing) or by at a later stage for instance by the QA department (delayed signing).
Public and private keys can be associated with code signing certificates, generated using sn.exe, or they can be generated from within Visual Studio.
Open the project properties for the assembly you want to sign and check ‘sign the assembly’ on the signing tab. To create a key file, select New from the drop down and follow the directions or Browse for an existing key file. If you create a key file it is worth moving it from the bin directory as you should be using it across multiple projects.
Once compiled you will have a signed assembly with a strong name.
Check out other posts under CSharp, Code, Visual Studio - - Be first to comment.