I want to give developers using Visual Studio the ability to write programs against a custom framework that replaces .NET (similar to the Windows Phone and Silverlight frameworks, which are not subsets or profiles of an existing framework), and have full IntelliSense support and all.
Visual Studio 2010 supports multi-targeting, where you can target any framework (such as .NET, Silverlight, Robotics, XNA, Windows Phone and Mono) if you have the appropriate Targeting Packs installed.
I found that frameworks generally have some reference assemblies that they put in %programfiles%\Reference Assemblies\Microsoft\Framework
along with a FrameworkList.xml
file in the RedistList
subfolder. I've tried just creating a new folder, putting my assemblies (e.g. MyFramework.dll
) in there along with the RedistList subfolder containing a FrameworkList.xml file. I cleared the file but for one entry for similar to:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<FileList Redist="MyFramework_1_0">
<File AssemblyName="MyFramework" Version="1.0.0.0"
PublicKeyToken="be3ea0d08db41157" Culture="neutral"
ProcessorArchitecture="MSIL" InGAC="false" />
</FileList>
But Visual Studio doesn't list my framework in the list of available frameworks when creating a new project (after restarting VS). Obviously, I am missing something, but I haven't been able to figure out what.
How to create such a Targeting Pack that allows Visual Studio to see the custom framework, or something that has the same effect? What is generally included in a Targeting Pack? Can custom build steps be added?