Intent.Modules icon indicating copy to clipboard operation
Intent.Modules copied to clipboard

'Intent.Modules.VisualStudio.Projects' Module error doesn't reference CS Project name

Open dandrejvv opened this issue 6 years ago • 1 comments

If there is a problem in the .csproj file that gets generated and an exception gets thrown, it gives the necessary error for the content of the project file that is invalid but it doesn't stipulate which .csproj file is faulty. A filename would be great.

The 'Compile' start tag on line 116 position 6 does not match the end tag of 'ItemGroup'. Line 745, position 5.

  | at System.Xml.XmlTextReaderImpl.Throw(Exception e) at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args) at System.Xml.XmlTextReaderImpl.ThrowTagMismatch(NodeData startTag) at System.Xml.XmlTextReaderImpl.ParseEndElement() at System.Xml.XmlTextReaderImpl.ParseElementContent() at System.Xml.XmlTextReaderImpl.Read() at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r) at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r, LoadOptions o) at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options) at System.Xml.Linq.XDocument.Load(String uri, LoadOptions options) at System.Xml.Linq.XDocument.Load(String uri) at Intent.Modules.VisualStudio.Projects.Templates.LibraryCSProjectFile.LibraryCSProjectFileTemplate.LoadOrCreate(String fullFileName) in C:\Dev\Intent.OpenSource\Modules\Intent.Modules.VisualStudio.Projects\Templates\LibraryCSProjectFile\LibraryCSProjectFileTemplate.cs:line 52 at Intent.Modules.VisualStudio.Projects.Templates.LibraryCSProjectFile.LibraryCSProjectFileTemplate.TransformText() in C:\Dev\Intent.OpenSource\Modules\Intent.Modules.VisualStudio.Projects\Templates\LibraryCSProjectFile\LibraryCSProjectFileTemplate.cs:line 39 at Intent.SoftwareFactory.Templates.IntentProjectItemTemplateBase`1.RunTemplate() in C:\Dev\Intent.OpenSource\Modules\Intent.Modules.Common\Templates\T4\IntentProjectItemTemplateBase.cs:line 45 at Intent.SoftwareFactory.Templates.TemplateOutput.GenerateOutput() at Intent.SoftwareFactory.Engine.OutputFile..ctor(IProjectManager project, ITemplateOutput templateOutput) at Intent.SoftwareFactory.Engine.OutputManager.ExecuteTemplates(IEnumerable`1 outputs) at Intent.SoftwareFactory.Engine.OutputManager.Publish(IApplicationManager application, IEnumerable`1 outputs) at Intent.SoftwareFactory.ProcessOrchestration.Process(String[] applicationIds) at Intent.SoftwareFactory.IntentManager.Run(String applicationIds) at Intent.SoftwareFactory.Factory.Run(ExecutionContext executionContext)

dandrejvv avatar Feb 22 '18 11:02 dandrejvv

Agreed. We will do something like change the code to have a try...catch around the entire process, then adapt the error for the front end to say which file had an issue.

JonathanLydall avatar Feb 22 '18 11:02 JonathanLydall