none
Visual Studio 2017: Invalid Pointer when creating .NET Core project

    Question

  • When creating a new .NET Core web application project, the following error appers:

    Invalid pointer (Exception from HRESULT: 0x80004003 (E_POINTER))

    Reproduce:

    1. Start Visual Studio Community 2017
    2. File > New > Project
    3. Select .NET Framework 4.6.2 or 4.5.1 and choose Templates > Visual C# > .NET Core > ASP.NET Core Web Application (.NET Core)
    4. Enter a name and pick a folder and click OK. Do not select 'Create a folder for solution'
    5. In the .NET Core template selection window, select ASP.NET Core 1.1 from the dropdown and select the Web Application template. Leave authentication to No Authentication. Do not enable Docker support. Click OK.
    6. A 'project is generating' or something similar message is briefly showing and after that the error is displayed.

    Clearing the ComponentModelCache (AppData\Local\Microsoft\VisualStudio\15.0_39c29525\ComponentModelCache) doesn't help. Choosing another name or another folder doesn't make a difference.

    Starting Visual Studio as administrator or not as administrator doesn't help.

    Saturday, March 11, 2017 9:55 AM

Answers

  • Hi jao01,

    Welcome to the MSDN forum.

    Refer to your steps, I tested it on my 2 VS community 2017 computer, and I can successfully create the .NET Core Web application project like the following screenshot:

    In your steps, if you have another .NET Framework version, select ‘Create directly for solution’ or choose ASP.NETCore 1.0, it will make any difference?

    Please restart the VS and create it again. If it still not works, please re-run the VS 2017 installer as administrator and select Repair to have a try.

    Per the error message, I found a similar issue and please have a look at this: New ASP.NE Core Web Application (.NET Core) Web API project result in Invalid pointer error, Phil Henning and Tom Shane provided solution that work for some other community members.

    Best regards,

    Sara


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by jao01 Monday, March 13, 2017 7:35 PM
    Monday, March 13, 2017 6:07 AM
    Moderator

All replies

  • Hi jao01,

    Welcome to the MSDN forum.

    Refer to your steps, I tested it on my 2 VS community 2017 computer, and I can successfully create the .NET Core Web application project like the following screenshot:

    In your steps, if you have another .NET Framework version, select ‘Create directly for solution’ or choose ASP.NETCore 1.0, it will make any difference?

    Please restart the VS and create it again. If it still not works, please re-run the VS 2017 installer as administrator and select Repair to have a try.

    Per the error message, I found a similar issue and please have a look at this: New ASP.NE Core Web Application (.NET Core) Web API project result in Invalid pointer error, Phil Henning and Tom Shane provided solution that work for some other community members.

    Best regards,

    Sara


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by jao01 Monday, March 13, 2017 7:35 PM
    Monday, March 13, 2017 6:07 AM
    Moderator
  • Hi, Appreciate your help.

    I've tried to create a new ASP.NET Core 1.0 project, but then I get the same error.

    I have no idea where I can select 'Create directly for solution'. That option is not available for me when I create a new project. There is an option 'Create a new directory for solution', but I still get the error when I enable that.

    I did re-run the installer as an administrator and repaired my VS 2017 installation. After a reboot I tried again and now I can succesfully create a new ASP.NET core 1.1 website.

    Thank you very much!

    Monday, March 13, 2017 7:35 PM
  • Hi jao01,

    I'm so glad to hear that your issue is solved and thank you for your confirmation and sharing.

    Best regards,

    Sara


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, March 14, 2017 2:00 AM
    Moderator
  • I am having the same issue when trying to complete an ASP.NET Core project.  I can create .NET Core Console Application without issue.

    I am running Visual Studio Enterprise 2017 version 15.2 (26430.12) Release. Everything seemed to be working fine until I installed the latest VS upgrade a few days ago.

    My path to the Invalid Pointer Exception is as follows.

    1. Start Visual Studio Enterprise 2017
    2. File -> New Project -> ASP.NET Core Web Application
    3. Choose any of the three options (Empty, Web API, Web Application)
    4. Press OK
    5. Receive Invalid Pointer Exception.

    Here is all of the information from my Visual Studio Installation.

    Microsoft Visual Studio Enterprise 2017 
    Version 15.2 (26430.12) Release
    VisualStudio.15.Release/15.2.0+26430.12
    Microsoft .NET Framework
    Version 4.7.02046

    Installed Version: Enterprise

    Architecture Diagrams and Analysis Tools   00369-60000-00001-AA309
    Microsoft Architecture Diagrams and Analysis Tools

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

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

    Visual C++ 2017   00369-60000-00001-AA309
    Microsoft Visual C++ 2017

    Visual F# 4.1   00369-60000-00001-AA309
    Microsoft Visual F# 4.1

    Application Insights Tools for Visual Studio Package   8.6.00404.2
    Application Insights Tools for Visual Studio

    ASP.NET and Web Tools 2017   15.0.30503.0
    ASP.NET and Web Tools 2017

    ASP.NET Web Frameworks and Tools 2017   5.2.50303.0
    For additional information, visit https://www.asp.net/

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

    Cookiecutter   3.0.17114.1
    Provides tools for finding, instantiating and customizing templates in cookiecutter format.

    Dotfuscator Community Edition   5.27.0.4679-release+ce-vs15.e4937ba.20161216.158
    PreEmptive Protection - Dotfuscator CE

    Fabric.DiagnosticEvents   1.0
    Fabric Diagnostic Events

    GitClientVSPackage Extension   1.0
    GitClientVSPackage Visual Studio Extension Detailed Info

    GitHub.VisualStudio   2.2.0.11
    A Visual Studio Extension that brings the GitHub Flow into Visual Studio.

    JavaScript Language Service   2.0
    JavaScript Language Service

    JavaScript Project System   2.0
    JavaScript Project System

    JetBrains ReSharper Ultimate 2017.1.2    Build 108.0.20170428.75743
    JetBrains ReSharper Ultimate package for Microsoft Visual Studio. For more information about ReSharper Ultimate, visit http://www.jetbrains.com/resharper. Copyright © 2017 JetBrains, Inc.

    KofePackagePackage Extension   1.0
    KofePackagePackage Visual Studio Extension Detailed Info

    Markdown Editor   1.11.201
    A full featured Markdown editor with live preview and syntax highlighting. Supports GitHub flavored Markdown.

    Microsoft Azure Tools   2.9
    Microsoft Azure Tools for Microsoft Visual Studio 2017 - v2.9.50131.1

    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

    Node.js Tools   1.3.50417.1
    Adds support for developing and debugging Node.js apps in Visual Studio

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

    Package Installer   2.0.101
    Makes it easier, faster and more convenient than ever to install Bower, npm, Yarn, JSPM, TSD, Typings and NuGet packages to any project

    Python   3.0.17114.1
    Provides IntelliSense, projects, templates, debugging, interactive windows, and other support for Python developers.

    Python - Django support   3.0.17114.1
    Provides templates and integration for the Django web framework.

    Python - IronPython support   3.0.17114.1
    Provides templates and integration for IronPython-based projects.

    Python - Profiling support   3.0.17114.1
    Profiling support for Python projects.

    Redgate ReadyRoll   1.14.2.3912
    Extend DevOps processes to your SQL Server databases and safely automate database deployments.
        
    Visit https://www.red-gate.com/readyroll for more information.

    Copyright (C) 2011 Red Gate Software Ltd. All rights reserved.
      
    This software contains components from Component Owl.
    SQL Server is a registered trademark of Microsoft Corporation. 
    Visual Studio is a registered trademark of Microsoft Corporation. 

    ReadyRoll contains code from the following open source software:

    NuGet https://www.nuget.org/
    SQL LocalDB Wrapper https://github.com/martincostello/sqllocaldb
    Autofac https://autofac.org/
    Json.NET https://json.net/
    MahApps.Metro http://mahapps.com/
    SemVer https://github.com/maxhauser/semver
    Log4Net http://logging.apache.org/log4net/
    Extended WPF Toolkit https://wpftoolkit.codeplex.com/
    Code InfoBox VSX http://www.codeproject.com/Articles/55196/Code-InfoBox-Visual-Studio-Extension-VSX
    OctoPack https://github.com/OctopusDeploy/OctoPack
    SQLite https://sqlite.org/

    This product contains icons from http://www.visualpharm.com distributed under a free backlink license.

    For license details or other notices relating to the above software, please see NOTICE.TXT and EULA.rtf in the ReadyRoll application folder.
        

    Redgate SQL Prompt   8.0.1.1424
    Write, format, and refactor SQL effortlessly

    SQL Server Data Tools   15.1.61702.140
    Microsoft SQL Server Data Tools

    TypeScript   2.2.2.0
    TypeScript tools for Visual Studio

    Web Extension Pack 2017   15.0.2
    The easiest way to set up Visual Studio for the ultimate web development experience.

    Saturday, June 03, 2017 7:51 PM
  • Hi Anthony,

    Welcome to the MSDN forum.

    Refer to your description, I updated my VS 2017 to the same version as yours, when try to create a new ASP.NET Core Web application and it works fine as below:

    Have you already tried those troubleshot methods that I provided before, like repair VS 2017, restart the computer, run the command: devenv /safemode to run VS with safe mode?

    Best regards,

    Sara


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, June 05, 2017 9:40 AM
    Moderator
  • I've had the exact same issue, updated VS 2017 Enterprise which had been working fine and then got this error. Repairing fixed the issue but took about an hour, I think someone  needs to fix whatever the issue is in the Update (15.0.26430.15). It was a brand new install on Windows Server 2016 with no extensions added. I'm scared now to updates in case it breaks VS again.
    Friday, July 07, 2017 2:18 PM
  • Hi Germel,

    Sorry for this inconvenience and thank you for your sharing.

    I tried to upgrade to the latest version 15.2 (15.0.26430.15) and create a new ASP.NET Core Web Application (.NET Core) > Web Application project, it works fine as below:

    If this issue persists after you upgrade a new VS update in the future, please go to Help-Send Feedback-Report a Problem... to report this issue to the VS Product Team and they will help you research this, thank you for your understanding.

    Best regards,

    Sara


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Monday, July 10, 2017 7:56 AM
    Moderator