Error creating new .NET core project in Visual Studio
I downloaded and installed Visual Studio Update 3 and .NET Core 1.0 for Visual Studio. I restarted my machine as instructed by the prompts. Anytime I try to create any of the .NET core projects from VS I get the error dialog:
The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
Here is the last few nodes from my ActivityLog:
<entry>
<record>736</record>
<time>2016/07/02 21:54:33.961</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Leaving function VBDispatch::GetTypeLib</description>
<guid>{80CC9F66-E7D8-4DDD-85B6-D9E6CD0E93E2}</guid>
</entry>
<entry>
<record>737</record>
<time>2016/07/02 21:54:33.961</time>
<type>Information</type>
<source>VisualStudio</source>
<description>End package load [Microsoft.VisualStudio.PlatformUI.SolutionNavigatorPackage]</description>
<guid>{CF6A5C16-83B0-4D04-B702-195C35C6E887}</guid>
</entry>
<entry>
<record>738</record>
<time>2016/07/02 21:54:34.023</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Entering function VBDispatch::GetTypeLib</description>
</entry>
<entry>
<record>739</record>
<time>2016/07/02 21:54:34.023</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Leaving function VBDispatch::GetTypeLib</description>
<guid>{80CC9F66-E7D8-4DDD-85B6-D9E6CD0E93E2}</guid>
</entry>
<entry>
<record>740</record>
<time>2016/07/02 21:54:34.148</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Entering function CVsPackageInfo::HrInstantiatePackage</description>
<guid>{5F2E5E42-4192-4D79-A0D8-1D881E808829}</guid>
</entry>
<entry>
<record>741</record>
<time>2016/07/02 21:54:34.148</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Begin package load [ProviderPackage]</description>
<guid>{5F2E5E42-4192-4D79-A0D8-1D881E808829}</guid>
</entry>
<entry>
<record>742</record>
<time>2016/07/02 21:54:34.258</time>
<type>Information</type>
<source>VisualStudio</source>
<description>End package load [ProviderPackage]</description>
<guid>{5F2E5E42-4192-4D79-A0D8-1D881E808829}</guid>
</entry>
<entry>
<record>743</record>
<time>2016/07/02 21:54:34.620</time>
<type>Error</type>
<source>SccDisplayInformation.SolutionOptions</source>
<description>Unable to load solution user option 'SccProvider.Solution.LoadCount'</description>
</entry>
When I added the XML node as described in the article:
<dependentAssembly>
<assemblyIdentity name="Microsoft.VisualStudio.ProjectSystem.DotNet.Wizard" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<codeBase version="14.0.0.0" href="C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\DotNet\ProjectSystem\Microsoft.VisualStudio.ProjectSystem.DotNet.Wizard.dll"/>
</dependentAssembly>
It allowed me to create the project and it populates the solution explorer with files, however Visual Studio hangs and I need to kill it via Task Manager.
When I viewed the ActvityLog.xml it said that the DLL was missing:
<entry>
<record>803</record>
<time>2016/07/04 20:01:23.515</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Begin package load [Project K Project System]</description>
<guid>{98F77210-A364-4168-BAE6-4D46FA7E19FE}</guid>
</entry>
<entry>
<record>804</record>
<time>2016/07/04 20:01:23.515</time>
<type>Error</type>
<source>VisualStudio</source>
<description>CreateInstance failed for package [Project K Project System]Source: 'mscorlib' Description: Could not load file or assembly 'file:///C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\ProjectK\Microsoft.VisualStudio.Web.ProjectSystem.dll' or one of its dependencies. The system cannot find the file specified.
System.IO.FileNotFoundException: Could not load file or assembly 'file:///C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\ProjectK\Microsoft.VisualStudio.Web.ProjectSystem.dll' or one of its dependencies. The system cannot find the file specified.
File name: 'file:///C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\ProjectK\Microsoft.VisualStudio.Web.ProjectSystem.dll'
 at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
 at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
 at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
 at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
 at System.Reflection.Assembly.LoadFrom(String assemblyFile, Evidence securityEvidence)
 at System.Activator.CreateInstanceFromInternal(String assemblyFile, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo)
 at System.AppDomain.CreateInstanceFrom(String assemblyFile, String typeName)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
</description>
<guid>{98F77210-A364-4168-BAE6-4D46FA7E19FE}</guid>
<hr>80004005 - E_FAIL</hr>
</entry>
</activity>
This is a list of the files in C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\Project
- Microsoft.Azure.ActiveDirectory.GraphClient.FirstParty.dll
- Microsoft.Data.Edm.dll
- Microsoft.Data.OData.dll
- Microsoft.Data.Services.Client.dll
- Microsoft.VisualStudio.Web.AzureAD.Contracts.dll
- Microsoft.VisualStudio.Web.Project.dll
- Microsoft.VisualStudio.Web.Project.pkgdef
- Microsoft.VisualStudio.Web.ProjectCreation.Contracts.dll
- System.Spatial.dll
I have tried uninstalling and re-installing the DotNetCorev1.0.0VS2015ToolsPreview2.
Does anyone have any ideas how I can resolve this issue ?
@barrytang @Pilchie
@Petermarcu @barrytang @Pilchie Does anyone have any idea how I could attempt to fix this or is there anything I can provide you with?
@Seany84 we had other reports of similar issues -- see here and here. This was due to an issue in Visual Studio 2015 Update 3 setup that sometimes caused stale entries in the devenv.exe.config file.
Can you try the following workaround:
- Close Visual Studio
- Delete the C:\Users
\AppData\Local\Microsoft\VisualStudio\14.0\devenv.exe.config file. - Run the Developer Command Prompt for VS2015 as the Administrator, and execute the devenv /setup command.
@balachir I have tried this exact step several times and still have the exact same error when trying to create a new .NET core project.
I have attached the ProcessMonitor output for the devenv.exe process while I ran the /setup command and also up to when I tried to create a new .NET core project (including the error dialog).
[Logfile.zip](url) (The output is filtered where RESULT is not SUCCESS.)
I am also facing the same issue. I have installed VS2015 update 2. I tried to follow the above steps but strangely the below directory is empty C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\DotNet
Even there is no dnx folder at below path *:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\DNX *
I've run RC1 installation successfully and even repaired it many time. But somehow there is nothing installed in the dotnet folder at C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\DotNet path
@bernharde @olegburov or anyone - Can you please suggest something else to solve this problem.
I even repaired VS2015 installation. deleted dev.exe.config file ran devenv /setup in vs2015 command prompt (as administrator)
I guess the root problem is nothing is installed in dotnet folder in programfiles and no dnx folder is created.
Need help urgently.
@Seany84 this seems to be related to VS tooling and https://github.com/aspnet/tooling/issues seems like the correct place for it. I will close this one, can you please open it (if it still repros) on the repo I linked to? Thanks!