locked
SDK Templates missing files? RRS feed

  • Question

  • I'm running Visual Studio 2010 Professional on Windows 7 x64.

    I've installed the Visual Studio 2010 SDK and tried to create one of the extensibility projects. Selecting one of the projects (I've tried several but I'll use Editor Viewport Adornment for this example) causes a series of errors to display before finally doing nothing more than creating an empty project folder.

    The errors are:

    The file AssemblyInfo.cs could not be found within the project templates. Continuing to run, but the resulting project may not build properly.

    The file Adornment.cs could not be found within the project templates. Continuing to run, but the resulting project may not build properly.

    The file AdornmentFactory.cs could not be found within the project templates. Continuing to run, but the resulting project may not build properly.

    The file source.extension.vsixmanifest could not be found within the project templates. Continuing to run, but the resulting project may not build properly.

    Could not find file '%LOCALAPPDATA%\Microsoft\VisualStudio\10.0\ProjectTemplatesCache_{F7C58d(8-20C6-4193-B548-159E9461AF02}\CSharp\Extensibility\ViewportAdornment.zip\EditorViewportAdornment.csproj'.

     

    I've installed, uninstalled and reinstalled the VS2010 SDK several times but still can't seem to get it to work.

    I've opened the ViewportAdornment.zip file referenced in the final error message and indeed all the mentioned files are missing.

    However, the file in 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\VSSDK\ProjectTemplates\CSharp\Extensibility\ViewportAdornment.zip' does appear to contain all the required files.

    Why doesn't Visual Studio create the project properly? What am I doing wrong?

    Sunday, September 12, 2010 2:15 PM

All replies

  • Hi Chris,

     

    Could we try to reset your templates by doing the following

     

     

    delete the cache.bin file in C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\VSSDK\ProjectTemplatesCache.   It is a hidden file so you can either show hidden files in explorer or navigate to it in a command prompt and attrib -h cache.bin, etc.

     

    You can also delete the contents inside the projecttemplatescache folder.

    Close down the explorer window or any windows that have the above folder open

     

    Go to Start | All Programs | Visual Studio 2010 | Visual Studio Tools | Visual Studio Command Prompt 2010

    type in the command

    devenv /installvstemplates

     

    after that command finishes. Go back to Visual Studio to see if any of the extensibility templates work.

     

    much appreciated,

    Friday, September 17, 2010 2:08 PM
  • Thanks for the response. I did actually get this working with a bit of a hack but decided to revert that and try your instructions.

    At first the 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\VSSDK\ProjectTemplatesCache' didn't exist at all.It was only under

    I ran the devenv /installvstemplates command anyway and it happily created it. The templates still do not work however, I get the same issue.

    Now that the folder you've mentioned exists, I tried it again but with the same failed result.

    All Visual Studio seems to want to do is create that' %LOCALAPPDATA%\Microsoft\VisualStudio\10.0\ProjectTemplatesCache_{F7C58d(8-20C6-4193-B548-159E9461AF02}' folder and stuff it full of the extensibility zip files that contain nothing more than a MyTemplate.vstemplate file and a .png file. Procmon show devenv.exe trying to load the various files out of that particular zip file.

    The hack that seems to work is to copy the contents of 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\VSSDK\ProjectTemplates\' and put them in '%LOCALAPPDATA%\Microsoft\VisualStudio\10.0\ProjectTemplatesCache_{F7C58D98-20C6-4193-B548-159E9461AF02}'.

    I'm not sure why Visual Studio is only pulling some of the files out of the .zip when creating the local cache but it is and copying over the whole file seems to do the trick.

    I'm still keen on a 'proper' solution if anyone happens to know what's going on, but otherwise, it works for now.

    Sunday, September 26, 2010 1:06 PM
  • Can you back up and then delete '%LOCALAPPDATA%\Microsoft\VisualStudio\10.0\ProjectTemplatesCache_{F7C58D98-20C6-4193-B548-159E9461AF02} folder? It should make VS recreate this folder when VS is launched next time and new project dialog is shown. Please note, it will only add the vstemplate file. However, once you click OK on the editor project, it should populate the folder fully and create the project.

    Please do report this issue to http://connect.microsoft.com/visualstudio? Please do attach the backed up copy of ProjectTemplatsCache_{f7c5...} folder.

    --

    Regards,

    Saurabh

     


    http://blogs.msdn.com/saurabhjain
    Sunday, September 26, 2010 11:44 PM