title: Unexpected exception on any build in Visual Studio Community 2015
body: <p>I got build errors on any build/any project in Visual Studio Community 2015, after an reinstall. </p>
  
  <p>Build errors are:</p>
  
  <pre><code>1&gt;------ Build started: Project: TestConsoleApp, Configuration: Debug Any CPU ------
  1&gt;C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.VisualBasic.Core.targets(56,5): error MSB3883: Unexpected exception: 
  1&gt;C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.VisualBasic.Core.targets(56,5): error : System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---&gt; System.InvalidOperationException: This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms.
  1&gt;C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.VisualBasic.Core.targets(56,5): error : at System.Security.Cryptography.SHA256Managed..ctor()
  1&gt;C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.VisualBasic.Core.targets(56,5): error : --- End of inner exception stack trace ---
  1&gt;C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.VisualBasic.Core.targets(56,5): error : at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
  1&gt;C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.VisualBasic.Core.targets(56,5): error : at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
  1&gt;C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.VisualBasic.Core.targets(56,5): error : at System.Security.Cryptography.CryptoConfig.CreateFromName(String name, Object[] args)
  1&gt;C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.VisualBasic.Core.targets(56,5): error : at System.Security.Cryptography.SHA256.Create()
  1&gt;C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.VisualBasic.Core.targets(56,5): error : at Microsoft.CodeAnalysis.CommandLine.DesktopBuildClient.GetBasePipeName(String compilerExeDirectory)
  1&gt;C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.VisualBasic.Core.targets(56,5): error : at Microsoft.CodeAnalysis.CommandLine.DesktopBuildClient.GetPipeNameForPath(String compilerExeDirectory)
  1&gt;C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.VisualBasic.Core.targets(56,5): error : at Microsoft.CodeAnalysis.CommandLine.DesktopBuildClient.RunServerCompilation(RequestLanguage language, List`1 arguments, BuildPaths buildPaths, String keepAlive, String libEnvVariable, CancellationToken cancellationToken)
  1&gt;C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.VisualBasic.Core.targets(56,5): error : at Microsoft.CodeAnalysis.BuildTasks.ManagedCompiler.ExecuteTool(String pathToTool, String responseFileCommands, String commandLineCommands)
  ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
  </code></pre>
  
  <p>I got this build error with WinForm, Console and other project types.</p>
  
  <p>When i load any solution, i got the error "The VSPackage package did not load correctly.". If i create a new solution, i also can't build.</p>
  
  <p><a href="https://i.stack.imgur.com/4u2cC.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4u2cC.jpg" alt="The VSPackage package did not load correctly msgbox"></a></p>
  
  <p>I check the xml file but no clue on how to solved this issue. </p>
  
  <p><a href="http://pastebin.com/W1TY6fNi" rel="nofollow noreferrer">ActivityLog.xml errors (full file on pastbin)</a></p>
  
  <p>I reinstall Visual Studio and also create an basic hello console also to troubleshoot.</p>
  
  <pre><code>Module ModuleTest
  
      Sub Main()
          Console.WriteLine("hello")
          Console.ReadKey()
      End Sub
  
  End Module
  </code></pre>
  
  <p>devenv flags dont make any change</p>
  
  <p>Microsoft Windows [Version 6.2.9200]
  (c) 2012 Microsoft Corporation. Todos os direitos reservados.</p>
  
  <blockquote>
    <p>C:\Users\ppolonia>f:</p>
    
    <p>F:>cd F:\Programas (x86)\Microsoft Visual Studio 14.0\Common7\IDE</p>
    
    <p>F:\Programas (x86)\Microsoft Visual Studio 14.0\Common7\IDE>devenv
    /safemode</p>
    
    <p>F:\Programas (x86)\Microsoft Visual Studio 14.0\Common7\IDE></p>
  </blockquote>
  
  <p>I'm using Windows 8 64 bits. Bellow is Visual Studio information:</p>
  
  <blockquote>
    <p>Microsoft Visual Studio Community 2015 Version 14.0.25123.00 Update 2
    Microsoft .NET Framework Version 4.6.01055</p>
    
    <p>Installed Version: Community</p>
    
    <p>Visual Basic 2015   00322-20000-00000-AA322 Microsoft Visual Basic
    2015</p>
    
    <p>Visual C# 2015   00322-20000-00000-AA322 Microsoft Visual C# 2015</p>
    
    <p>Visual C++ 2015   00322-20000-00000-AA322 Microsoft Visual C++ 2015</p>
    
    <p>Application Insights Tools for Visual Studio Package   5.205.60510.1
    Application Insights Tools for Visual Studio</p>
    
    <p>ASP.NET and Web Tools 2015.1 (Beta8)   14.1.11106.0 ASP.NET and Web
    Tools 2015.1 (Beta8)</p>
    
    <p>ASP.NET Web Frameworks and Tools 2012.2   4.1.41102.0 For additional
    information, visit <a href="http://go.microsoft.com/fwlink/?LinkID=309563" rel="nofollow noreferrer">http://go.microsoft.com/fwlink/?LinkID=309563</a></p>
    
    <p>ASP.NET Web Frameworks and Tools 2013   5.2.40314.0 For additional
    information, visit <a href="http://www.asp.net/" rel="nofollow noreferrer">http://www.asp.net/</a></p>
    
    <p>Common Azure Tools   1.7 Provides common services for use by Azure
    Mobile Services and Microsoft Azure Tools.</p>
    
    <p>GitHub.VisualStudio   1.0 A Visual Studio Extension that brings the
    GitHub Flow into Visual Studio.</p>
    
    <p>Microsoft Azure Mobile Services Tools   1.4 Microsoft Azure Mobile
    Services Tools</p>
    
    <p>PreEmptive Analytics Visualizer   1.2 Microsoft Visual Studio
    extension to visualize aggregated summaries from the PreEmptive
    Analytics product.</p>
    
    <p>SQL Server Data Tools   14.0.60311.1 Microsoft SQL Server Data Tools</p>
    
    <p>TypeScript   1.8.29.0 TypeScript tools for Visual Studio</p>
    
    <p>Web Essentials 2015.2   2.0.214 Adds many useful features to Visual
    Studio for web developers. Requires Visual Studio 2015</p>
  </blockquote>
  
  <p>Bellow is the system information (in Portuguese, my local language):</p>
  
  <blockquote>
    <p>Relatório das informações do sistema escritas em: 06/05/16 16:19:58
    Nome de sistema: MAXTOR8DEVPT [Resumo do sistema]</p>
    
    <p>Item  Valor    Nome do SO Microsoft Windows 8 Enterprise   Versão 6.2.9200
    Compilação 9200    Outra descrição do SO  Indisponível     Fabricante do
    SO    Microsoft Corporation    Nome do sistema    MAXTOR8DEVPT     Fabricante do
    sistema   Gigabyte Technology Co., Ltd.    Modelo do sistema  Z87X-D3H<br>
    Tipo do sistema   x64-based PC     Sistema SKU    To be filled by O.E.M.<br>
    Processador   Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz, 3392 Mhz, 4
    Núcleo(s), 8 Processador(es) Lógico(s)     Data/versão de BIOS    American
    Megatrends Inc. F7, 02/08/2013     Versão SMBIOS  2.7  Versão do
    Controlador Incorporado   255.255  Modo de BIOS   Legado   Fabricante da
    Placa Base    Gigabyte Technology Co., Ltd.    Modelo da Placa
    Base  Indisponível     Nome da Placa Base Placa Base   Função da
    Plataforma    Ambiente de Trabalho     Estado de Arranque Seguro  Não
    suportado  Configuração PCR7  Indisponível     Diretório do
    Windows   C:\Windows   Diretório do sistema   C:\Windows\system32 
    Dispositivo de arranque   \Device\HarddiskVolume1  Região Portugal<br>
    Camada de abstração de hardware (HAL) Versão = "6.2.9200.16442"    Nome
    de utilizador Maxtor8DevPT\ppolonia    Fuso horário   Hora padrão de GMT<br>
    Memória Física (RAM) Instalada    16,0 GB  Memória física total   15,9 GB 
    Memória física disponível 3,16 GB  Memória virtual total  25,0 GB 
    Memória virtual disponível    7,48 GB  Espaço de ficheiro de página   9,14
    GB     Ficheiro de paginação  F:\pagefile.sys  Foi detetado um hipervisor.
    As funcionalidades necessárias para Hyper-V não serão apresentadas.</p>
  </blockquote>