Skip to content
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

Ignore bin and obj folders #16

Open
angularsen opened this issue Jan 5, 2023 · 1 comment
Open

Ignore bin and obj folders #16

angularsen opened this issue Jan 5, 2023 · 1 comment

Comments

@angularsen
Copy link

angularsen commented Jan 5, 2023

Minor issue, but I had to remove all bin/obj folders before running the tool, or else it would fail with this.
Not sure if this is limited to just Xamarin Android/iOS projects or not, or if the problem is broader.

Alternatively, if finding out what folders to ignore is complicated since they can be customized, maybe this tool should not fail but rather log a warning for files it fails to parse.

Processing references for C:\dev\xxx\xxx\app\yyy.Android\obj\Debug\120\designtime\build.props...
Startup exception: System.Xml.XmlException: Data at the root level is invalid. Line 1, position 1.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
   at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
   at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
   at System.Xml.XmlTextReaderImpl.Read()
   at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
   at System.Xml.Linq.XDocument.Load(String uri, LoadOptions options)
   at CentralisedPackageConverter.PackageConverter.ConvertProject(FileInfo csprojFile, Boolean dryRun) in /home/runner/work/CentralisedPackageConverter/CentralisedPackageConverter/CentralisedPackageConverter/PackageConverter.cs:line 228
   at CentralisedPackageConverter.PackageConverter.<>c__DisplayClass3_0.<ProcessConversion>b__5(FileInfo proj) in /home/runner/work/CentralisedPackageConverter/CentralisedPackageConverter/CentralisedPackageConverter/PackageConverter.cs:line 62
   at System.Collections.Generic.List`1.ForEach(Action`1 action)
   at CentralisedPackageConverter.PackageConverter.ProcessConversion(String solutionFolder, Boolean revert, Boolean dryRun, Boolean force) in /home/runner/work/CentralisedPackageConverter/CentralisedPackageConverter/CentralisedPackageConverter/PackageConverter.cs:line 62
   at Program.<>c.<<Main>$>b__0_0(CommandLineOptions o) in /home/runner/work/CentralisedPackageConverter/CentralisedPackageConverter/CentralisedPackageConverter/Program.cs:line 10
   at CommandLine.ParserResultExtensions.WithParsed[T](ParserResult`1 result, Action`1 action)
   at Program.<Main>$(String[] args) in /home/runner/work/CentralisedPackageConverter/CentralisedPackageConverter/CentralisedPackageConverter/Program.cs:line 6
@BastianBirke
Copy link
Contributor

My last PR #26: new DirectoryCrawler class, filtering by Regex: directories starting with dot, bin, obj.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants