![]() OK, I understood the basics of this one when I started, but just to help those newbies out (for instance, there have been a few messages like this on the MediaCenterSandbox), I'll go over the code/view seperation that you find in MCML. There! You have a signed assembly, ready for installation into the GAC. Choose the one you created with the SN utility, and rebuild your project. Under 'signing' you will have the option of choosing a key file. Then in Visual Studio, right click on your project in the project view and choose 'Properties' from the drop-down menu that will appear. Use 'cmd' (the command-line interpreter) or even better, open the command prompt from the start menu, under 'Programs|Visual Studio 2005' so you won't need to bother with your path information. To generate this key, you will need to use the 'SN' command that ships with Visual Studio. A strongly named assembly has a public and private key associated with it, to ensure that it is actually the original class and not a modified or doctored version. ![]() all live in the GAC.īefore any program can be added to the cache, it must be strongly named. NET assemblies that are shared across multiple programs. The code part of your Media Center program (usually written in C#) is installed into the Global Assembly Cache (GAC) of Windows. This is the first part of my little review on writing an installer to get your MCML program into Media Center. The next thing we need to do is tell Media Center where our program is, what it does and what it's called. To avoid installing these (which would be illegal), we right click on the files and choose 'Exclude'. We don't need to install these, although they ARE required for your program to work correctly. If you check the solution explorer, you'll notice that and a couple of it's friends will have appeared. ![]() NET classes into the Global Assembly Cache, as well as get a reference to a number of extra DLL's and modules that your application will require. You can then 'Primary Output' from the list of different types of file you can include from your project. Right click on the new folder that will appear and choose 'Add|Project Output.' from the popup menu. Choose 'Add Special Folder|Global Assembly Cache Folder' to add the GAC to your installer. Right-click this line and a popup menu will appear. The first entry will read 'File System on Target Machine'. This allows you to choose to edit the various parts of your installation - the files, registry settings etc.Ĭhoose 'File System', if it isn't selected already. Under 'View', you should now have the 'Editor' submenu. Now your new project should appear in the Solution Explorer. Give your program a name like Setup - try to steer clear of generic names like 'setup', simply because it's very easy to get your 'setup.msi' confused with hundreds of others with exactly the same name. This will allow you to create an installer. Under 'Other Projects', you'll find "Setup and Deployment". Step 2 of the install process is nice and easy - no command-prompt needed :)Ĭreate a new project (add it to the existing solution) in Visual Studio.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |