Code Monkey home page Code Monkey logo

Comments (7)

NeVeSpl avatar NeVeSpl commented on June 6, 2024

Could you upload a sample project on which this error can be reproduced on GitHub?

from ntypewriter.

RudeySH avatar RudeySH commented on June 6, 2024

I created a new project using the built-in "Class Library (.NET Framework)" Visual Studio template. This uses .NET Framework 4.8 and the legacy project system. (As you already noted, #3 might be related.) Then I added a Template.nt using the first example from the readme. Lastly I added a dummy ClassModel.cs.

https://github.com/RudeySH/NTypewriterSampleClassLibrary

This gives me a different exception than before:

System.ArgumentException: The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
at EnvDTE.Properties.Item(Object index)
at NTypewriter.EditorForVisualStudio.Editor.SolutionItemsManager.GetId(ProjectItem item)
at NTypewriter.EditorForVisualStudio.Editor.SolutionItemsManager.<>c__DisplayClass9_0.b__1(ProjectItem x)
at System.Linq.Enumerable.WhereEnumerableIterator1.MoveNext() at System.Collections.Generic.List1..ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source)
at NTypewriter.EditorForVisualStudio.Editor.SolutionItemsManager.GetAssociatedProjectItems(String projectFilePath, String id)
at NTypewriter.EditorForVisualStudio.Editor.SolutionItemsManager..ctor(DTE2 dte, String templateFilePath, String projectFilePath)
at NTypewriter.EditorForVisualStudio.NTypewriterEditorForVisualStudioPackage.<>c__DisplayClass11_0.<RenderTemplateCommand_OnExecuted>b__2()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at NTypewriter.EditorForVisualStudio.NTypewriterEditorForVisualStudioPackage.<RenderTemplateCommand_OnExecuted>d__11.MoveNext()

Removing ClassModel.cs gives me a different exception, much more similar to the original exception I had, but not quite the same:

System.InvalidOperationException: Sequence contains no elements
at System.Linq.Enumerable.Max(IEnumerable`1 source)
at NTypewriter.EditorForVisualStudio.NTypewriterEditorForVisualStudioPackage.<RenderTemplateCommand_OnExecuted>d__11.MoveNext()

from ntypewriter.

NeVeSpl avatar NeVeSpl commented on June 6, 2024

Second and third exceptions are corrected in v0.0.3, but I am still not able to reproduce the first one.

from ntypewriter.

RudeySH avatar RudeySH commented on June 6, 2024

Now that the other exceptions are fixed, I was able to reproduce the original exception in a new project. Adding a solution folder causes the exception.
I have updated the sample repository: https://github.com/RudeySH/NTypewriterSampleClassLibrary

from ntypewriter.

NeVeSpl avatar NeVeSpl commented on June 6, 2024

Fixed in v0.0.4

from ntypewriter.

RudeySH avatar RudeySH commented on June 6, 2024

Thanks! I noticed no new commits in this repository, is the NTypewriter extension not part of this codebase?

from ntypewriter.

NeVeSpl avatar NeVeSpl commented on June 6, 2024

Indeed, NTypewriter editor for Visual Studio has a separate private repository. It is not ready to go public.

from ntypewriter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.