New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error creating new .NET core project in Visual Studio #198

Closed
Seany84 opened this Issue Jul 2, 2016 · 8 comments

Comments

Projects
None yet
6 participants
@Seany84

Seany84 commented Jul 2, 2016

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 &apos;SccProvider.Solution.LoadCount&apos;</description>
  </entry>
@BogalooDev

This comment has been minimized.

Show comment
Hide comment
@BogalooDev

BogalooDev Jul 4, 2016

Hi,

I had same the issue on Visual Studio 2015 with Update 3. Failed to create .NET Core projects. In my case I updated VS and after that installed .NET Core tooling. Check here: https://lnkd.in/dqsHmcE

BogalooDev commented Jul 4, 2016

Hi,

I had same the issue on Visual Studio 2015 with Update 3. Failed to create .NET Core projects. In my case I updated VS and after that installed .NET Core tooling. Check here: https://lnkd.in/dqsHmcE

@Seany84

This comment has been minimized.

Show comment
Hide comment
@Seany84

Seany84 Jul 4, 2016

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: &apos;mscorlib&apos; Description: Could not load file or assembly &apos;file:///C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\ProjectK\Microsoft.VisualStudio.Web.ProjectSystem.dll&apos; or one of its dependencies. The system cannot find the file specified.&#x000D;&#x000A;System.IO.FileNotFoundException: Could not load file or assembly &apos;file:///C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\ProjectK\Microsoft.VisualStudio.Web.ProjectSystem.dll&apos; or one of its dependencies. The system cannot find the file specified.&#x000D;&#x000A;File name: &apos;file:///C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\ProjectK\Microsoft.VisualStudio.Web.ProjectSystem.dll&apos;&#x000D;&#x000A;   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark&amp; stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)&#x000D;&#x000A;   at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark&amp; stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)&#x000D;&#x000A;   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark&amp; stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)&#x000D;&#x000A;   at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark&amp; stackMark)&#x000D;&#x000A;   at System.Reflection.Assembly.LoadFrom(String assemblyFile, Evidence securityEvidence)&#x000D;&#x000A;   at System.Activator.CreateInstanceFromInternal(String assemblyFile, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo)&#x000D;&#x000A;   at System.AppDomain.CreateInstanceFrom(String assemblyFile, String typeName)&#x000D;&#x000A;&#x000D;&#x000A;WRN: Assembly binding logging is turned OFF.&#x000D;&#x000A;To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.&#x000D;&#x000A;Note: There is some performance penalty associated with assembly bind failure logging.&#x000D;&#x000A;To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].&#x000D;&#x000A;</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 ?

Seany84 commented Jul 4, 2016

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: &apos;mscorlib&apos; Description: Could not load file or assembly &apos;file:///C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\ProjectK\Microsoft.VisualStudio.Web.ProjectSystem.dll&apos; or one of its dependencies. The system cannot find the file specified.&#x000D;&#x000A;System.IO.FileNotFoundException: Could not load file or assembly &apos;file:///C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\ProjectK\Microsoft.VisualStudio.Web.ProjectSystem.dll&apos; or one of its dependencies. The system cannot find the file specified.&#x000D;&#x000A;File name: &apos;file:///C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\ProjectK\Microsoft.VisualStudio.Web.ProjectSystem.dll&apos;&#x000D;&#x000A;   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark&amp; stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)&#x000D;&#x000A;   at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark&amp; stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)&#x000D;&#x000A;   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark&amp; stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)&#x000D;&#x000A;   at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark&amp; stackMark)&#x000D;&#x000A;   at System.Reflection.Assembly.LoadFrom(String assemblyFile, Evidence securityEvidence)&#x000D;&#x000A;   at System.Activator.CreateInstanceFromInternal(String assemblyFile, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo)&#x000D;&#x000A;   at System.AppDomain.CreateInstanceFrom(String assemblyFile, String typeName)&#x000D;&#x000A;&#x000D;&#x000A;WRN: Assembly binding logging is turned OFF.&#x000D;&#x000A;To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.&#x000D;&#x000A;Note: There is some performance penalty associated with assembly bind failure logging.&#x000D;&#x000A;To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].&#x000D;&#x000A;</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 ?

@Petermarcu

This comment has been minimized.

Show comment
Hide comment
@Petermarcu
Member

Petermarcu commented Jul 5, 2016

@Seany84

This comment has been minimized.

Show comment
Hide comment
@Seany84

Seany84 Jul 11, 2016

@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 commented Jul 11, 2016

@Petermarcu @barrytang @Pilchie Does anyone have any idea how I could attempt to fix this or is there anything I can provide you with?

@balachir

This comment has been minimized.

Show comment
Hide comment
@balachir

balachir Jul 12, 2016

@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:

  1. Close Visual Studio
  2. Delete the C:\Users\AppData\Local\Microsoft\VisualStudio\14.0\devenv.exe.config file.
  3. Run the Developer Command Prompt for VS2015 as the Administrator, and execute the devenv /setup command.

balachir commented Jul 12, 2016

@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:

  1. Close Visual Studio
  2. Delete the C:\Users\AppData\Local\Microsoft\VisualStudio\14.0\devenv.exe.config file.
  3. Run the Developer Command Prompt for VS2015 as the Administrator, and execute the devenv /setup command.
@Seany84

This comment has been minimized.

Show comment
Hide comment
@Seany84

Seany84 Jul 12, 2016

@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.)

Seany84 commented Jul 12, 2016

@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.)

@amicalrahul

This comment has been minimized.

Show comment
Hide comment
@amicalrahul

amicalrahul Jul 15, 2016

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.

amicalrahul commented Jul 15, 2016

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.

@blackdwarf

This comment has been minimized.

Show comment
Hide comment
@blackdwarf

blackdwarf Jul 21, 2016

@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!

blackdwarf commented Jul 21, 2016

@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!

@blackdwarf blackdwarf closed this Jul 21, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment