PostSharp Menu not appearing in VS2017

james.cai's Avatar

james.cai

31 Jan, 2018 11:51 PM

Hi,
I installed PostSharp-5.0.44, but it is not appear in the menu. It works before. But I uninstalled and reinstalled VS2017 recently, then I tried to install PostSharp. it couldn't appear in the menu any more. I tried couple times. Actually, I can see PostSharp has already installed and enable under Tools->Extensions and Updates.
Could you have any suggestion to figure it out?

Thanks,
James

  1. Support Staff 1 Posted by PostSharp Techn... on 01 Feb, 2018 02:54 PM

    PostSharp Technologies's Avatar

    Hello,

    it is probably due to the fact that PostSharp Tools currently does not support CPS projects, i.e. the new project format. You need to manually add PostSharp Nuget package.

    Could you please confirm that this was the case?

    Thanks!

    Best regards,
    Daniel

  2. 2 Posted by james.cai on 01 Feb, 2018 04:58 PM

    james.cai's Avatar

    Thank you for your quickly response. Actually, I've also tried to manually add PostSharp Nuget package. But it is still the same issue.

    Thanks,
    James

  3. Support Staff 3 Posted by PostSharp Techn... on 02 Feb, 2018 08:48 AM

    PostSharp Technologies's Avatar

    Hi James,

    it looks like an issue with the PostSharp installer. May I ask you for the following information? It will help us to diagnose your situation.

    • files %TEMP%\PostSharp*.log,
    • files %TEMP%\VSIXInstaller_*.log,
    • information from the affected Visual Studio - menu Help > About Microsoft Visual Studio > Copy Info

    In the meanwhile, you can try to install the extension manually:

    1) Start the PostSharp installer (PostSharp-5.0.44.exe) and keep it running during the following steps.
    2) Navigate to %USERPROFILE%\AppData\Local\Temp folder.
    3) Find there a folder with .tpm extension (eg. 7zS3E85.tmp) which contains PostSharp.VisualStudio.v15.0.vsix file.
    4) If you find more than one such folder, make sure that the folder you pick contains PostSharp.dll file of version 5.0.44.
    5) Double-click on the PostSharp.VisualStudio.v15.0.vsix file and follow the instructions shown.

    I'm sorry for this inconvenience.

    Best regards,
    -tony

  4. 4 Posted by james.cai on 02 Feb, 2018 05:25 PM

    james.cai's Avatar

    Here is information from the affected Visual Studio:
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Microsoft Visual Studio Professional 2017
    Version 15.5.6
    VisualStudio.15.Release/15.5.6+27130.2027
    Microsoft .NET Framework
    Version 4.7.02558

    Installed Version: Professional

    Visual Basic 2017 00369-60000-00001-AA896
    Microsoft Visual Basic 2017

    Visual C# 2017 00369-60000-00001-AA896
    Microsoft Visual C# 2017

    Application Insights Tools for Visual Studio Package 8.10.01106.1
    Application Insights Tools for Visual Studio

    ASP.NET and Web Tools 2017 15.0.31127.0
    ASP.NET and Web Tools 2017

    Common Azure Tools 1.10
    Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

    JavaScript Language Service 2.0
    JavaScript Language Service

    JavaScript Project System 2.0
    JavaScript Project System

    JavaScript UWP Project System 2.0
    JavaScript UWP Project System

    Microsoft JVM Debugger 1.0
    Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

    Microsoft MI-Based Debugger 1.0
    Provides support for connecting Visual Studio to MI compatible debuggers

    Microsoft Visual Studio VC Package 1.0
    Microsoft Visual Studio VC Package

    NuGet Package Manager 4.5.0
    NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

    TypeScript Tools 15.5.11025.1
    TypeScript Tools for Microsoft Visual Studio

    Visual Studio Code Debug Adapter Host Package 1.0
    Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

    Visual Studio Tools for Universal Windows Apps 15.0.27130.2020
    The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------

    BTW, I tried to install the extension manually following your steps, but I couldn't find any folder with .tpm extension under %USERPROFILE%\AppData\Local\Temp there.

    And I also attached your requested files.

    Thanks,
    James

  5. Support Staff 5 Posted by PostSharp Techn... on 05 Feb, 2018 04:22 PM

    PostSharp Technologies's Avatar

    Hi James,

    the extension file PostSharp.VisualStudio.v15.0.vsix is available in your file system only when the installer is running. From the logs, you can see that it was available at C:\Users\hcai\AppData\Local\Temp\7zS1E72.tmp\PostSharp.VisualStudio.v15.0.vsix at the moment.

    Looking at the log files, I haven't found any issues during the installation, unfortunately.

    Let me make sure I understood your issue correctly: By the "missing PostSharp menu in Visual Studio", do you mean the menu which appears at the top of the window next to File, Edit, View, etc.. or you mean the context menu which appears when you right-click a project?

    Best regards,
    -tony

  6. 6 Posted by james.cai on 05 Feb, 2018 05:17 PM

    james.cai's Avatar

    I mean both are not appearing, And also not appearing under Tools->Options.

    Thanks,
    James

  7. Support Staff 7 Posted by PostSharp Techn... on 06 Feb, 2018 01:44 PM

    PostSharp Technologies's Avatar

    Hi,

    ok, so I understood correctly, thanks for clearing this out. Please give it one more try using the steps I've mentioned before. Don't forget to keep the PostSharp Installer open (PostSharp-5.0.44.exe) and all instances of Visual Studio closed.

    As I've mentioned, in the logs you've sent, there's the the VSiX file located at C:\Users\hcai\AppData\Local\Temp\7zS1E72.tmp\PostSharp.VisualStudio.v15.0.vsix, so next time it should be either on the same path, or the directory name 7zS1E72.tmp would slightly differ.

    Does it work this way? If not, do you get any error message from the installer?

    Best regards,
    -tony

  8. 8 Posted by james.cai on 06 Feb, 2018 05:21 PM

    james.cai's Avatar

    I couldn't catch that PostSharp.VisualStudio.v15.0.vsix under tmp folder because the installation is so fast. I believe the installation is completed. Because I tried to create another user account in my system and use that account to login. PostSharp is appearing in the VS2017. So it must be something blocked from my current user profile.
    BTW, I tried couple of times to uninstall VS2017 and reinstall, but no help.
    Thanks,
    James

  9. Support Staff 9 Posted by PostSharp Techn... on 07 Feb, 2018 11:12 AM

    PostSharp Technologies's Avatar

    Ah, I see. The PostSharp.VisualStudio.v15.0.vsix will appear immediately after executing the PostSharp-5.0.44.exe. So you don't need to proceed - you can keep the installer just opened on the first page. This way, you have unlimited time to execute the PostSharp.VisualStudio.v15.0.vsix yourself.

    Best regards,
    -tony

  10. 10 Posted by james.cai on 07 Feb, 2018 05:18 PM

    james.cai's Avatar

    It is the same after installing the extension manually. Here is attached files. I believe the installation is properly. I've tried VS2012, Postsharp is appearing in the menu, but not for VS2017. And, if I switched to another new user account, it's also appearing the menu in VS2017. The only thing is not appearing for my current user account for VS2017.

    Thanks,
    James

  11. Support Staff 11 Posted by PostSharp Techn... on 09 Feb, 2018 09:12 AM

    PostSharp Technologies's Avatar

    Thanks a lot, James. Unfortunately, there's no obvious reason for the behavior you're experiencing.

    You said that you see the PostSharp extension installed and enabled in menu Tools > Extensions and Updates. Have you tried to uninstall it there fist and then running the installer again?

    You can also try to install another version of the extension. You can download the previous one at https://www.postsharp.net/downloads/postsharp-5.0/v5.0.43/PostSharp..., new one should be available in the end of the next week.

    If none of this helps, you can send us privateregistry.bin from all instances of Visual Studio. This file is located in %USERPROFILE%\AppData\Local\Microsoft\VisuaStudio\15.*. If you find more than one of these files, please rename each to the name of it's containing directory, so we know which file belongs to which Visual Studio instance.

    Best regards,
    -tony

  12. 12 Posted by james.cai on 09 Feb, 2018 04:56 PM

    james.cai's Avatar

    I tried many times uninstall and reinstall, also tried different version. Unfortunately, it is none of helps. Here is the file under %USERPROFILE%\AppData\Local\Microsoft\VisuaStudio\15.0_2c5df391

    Thanks,
    James

  13. Support Staff 13 Posted by PostSharp Techn... on 14 Feb, 2018 03:50 PM

    PostSharp Technologies's Avatar

    Sad, but this didn't tell us anything either. We can see from this that our extension has been loaded, but no detail about why it would crash.

    One more chance could be to check the activity log of Visual Studio. If I may ask you, please start Visual Studio using command %ProgramFiles(x86)%\Microsoft Visual Studio\2017\Professional\Common7\IDE\devenv.exe /log. Wait until it loads completely and then close it. Finally, please send us ActivityLog.xml and ActivityLog.xsl from %APPDATA%\Microsoft\VisualStudio\15.0_2c5df391.

    This log shows details about Visual Studio startup (and the rest of execution as well), so it might give us some information.

    Thank you,
    -tony

  14. 14 Posted by james.cai on 17 Feb, 2018 07:24 PM

    james.cai's Avatar

    Here you go.

    Thanks,
    James

  15. Support Staff 15 Posted by PostSharp Techn... on 19 Feb, 2018 04:52 PM

    PostSharp Technologies's Avatar

    Thanks a lot. In this log, there is an error message Extension will not be loaded because an extension with the same ID 'Microsoft.Windows.DevelopmentKit.Desktop' is already loaded at .... It all looks like a corrupted installation of Visual Studio. Is seems we can't do anything on our side.

    To fix your issue, the fastest way would be to recreate your Visual Studio user profile. It would keep your user settings, but you'll need to install all extensions you have installed manually. To do so, please follow these steps:
    1) Click on Visual Studio menu Tools > Import and export settings...
    2) Pick "Export selected environment settings" and click on Next.
    3) Check all checkboxes including those with a warning and click on Next.
    4) Pick a file name you note or remember and a location outside of %APPDATA%\Microsoft\VisualStudio\15.0_2c5df391 and click on finish.

    5) MAKE SURE the file you have just created actually exists and is located outside of %APPDATA%\Microsoft\VisualStudio\15.0_2c5df391. Do not continue if this is not true. You would loose your Visual Studio settings.

    6) Close all instances of Visual Studio 2017.
    7) Delete the folder %APPDATA%\Microsoft\VisualStudio\15.0_2c5df391.
    8) Reinstall all extensions including PostSharp.
    9) Import back your settings using the Visual Studio menu Tools > Import and export settings.

    Since you have successfully installed PostSharp under a different user profile, I believe that this procedure would solve your issue.

    Best regards,
    -tony

  16. 16 Posted by james.cai on 19 Feb, 2018 06:53 PM

    james.cai's Avatar

    Thank you, Tony. Yes, it works. But I have to delete 15.0_2c5df391 folder both under local and romaming folder, and delete vshub folder as well.

    Thank you again,
    James

  17. Support Staff 17 Posted by PostSharp Techn... on 20 Feb, 2018 08:26 AM

    PostSharp Technologies's Avatar

    Great! Thank you for your patience and for sharing the details.

    We are going to close this request as we believe it was solved. Please feel free to reopen the discussion if you need more help.

    Best regards,
    -tony

  18. PostSharp Technologies closed this discussion on 20 Feb, 2018 08:26 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac