Comments (7)
Could you upload a sample project on which this error can be reproduced on GitHub?
from ntypewriter.
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.List
1..ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable
1 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.
Second and third exceptions are corrected in v0.0.3, but I am still not able to reproduce the first one.
from ntypewriter.
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.
Fixed in v0.0.4
from ntypewriter.
Thanks! I noticed no new commits in this repository, is the NTypewriter extension not part of this codebase?
from ntypewriter.
Indeed, NTypewriter editor for Visual Studio has a separate private repository. It is not ready to go public.
from ntypewriter.
Related Issues (20)
- Changes from GIT not picked up by NTypewriter HOT 3
- This is perfect for AI
- Failed to compile user code (System.Collections) HOT 10
- Source Generator ArgumentNullException HOT 8
- Save function is misleading HOT 3
- `Microsoft.CodeAnalysis` not found HOT 10
- SourceGenerator can't find dependent projects HOT 2
- Publish latest releases as NuGet package HOT 4
- Template output preview is always displayed on top of everything HOT 1
- Template output preview with dark mode support
- Using C# 9.0 init accessors in a custom function gives an error inside Visual Studio extension HOT 1
- Extend AllReferencedTypes to search on Interfaces HOT 1
- Request - Property internal set vs public flag or filter HOT 3
- AttributeArgument.Value.Tostring() causes exception: TypedConstant is an array. Use Values property
- Unable to build project with SourceGenerator: 'ITypedConstant' could not be found HOT 2
- Unable to debug SourceGenerator, no output and no log files created HOT 6
- Why does Type.ToTypeScriptType ignore nullable if [Required] attribute is present? HOT 4
- Template processing fails when reading arguments from an Attribute that has arguments with default values (Roslyn project) HOT 3
- Missing default value for DateTime
- Incremental Generator HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ntypewriter.