lijunle / Vsxmd

VS XML documentation -> Markdown syntax.
MIT License
215 stars 51 forks source link

Support for VB.Net #81

Open qamaruddin opened 4 years ago

qamaruddin commented 4 years ago

I have tried the product in a VB.net project. Did not seem to generate the files. Is there any plan to support vb.net? Or something that I can contribute to?

lijunle commented 4 years ago

Hi, @qamaruddin

I don't use VB.Net. What are the differences between VB and C# from project level? It will be great if you can contribute to the project. Thanks!

qamaruddin commented 4 years ago

Not much different project wise. Once I added the package it did modify the vbproj file to add additional xml setting. But the file did not get generated at all. Not sure what would be the issue. Happy to add the support if you can show me how this package works. I dont have lots of experience in MSBUILD tasks

qamaruddin commented 4 years ago

@lijunle After adding a post build event to call the vsxmd exe manually, I see that its looking for a generated xml file that dont exist. 1> ConsoleApp4 -> C:\Users\qamar\source\repos\ConsoleApp4\ConsoleApp4\bin\Debug\ConsoleApp4.exe 1> Could not find file 'C:\Users\qamar\source\repos\ConsoleApp4\ConsoleApp4\ConsoleApp4.xml'. Unlike C# in Vb you cant define whether xml gets generated. Could this be the issue?

lijunle commented 4 years ago

Have you enable the XML documentation generations?

Switch to Build tab, in Output section, check XML documentation file checkbox.

qamaruddin commented 4 years ago

Yes, I have xml generation turned on. image

qamaruddin commented 4 years ago

The genearted xml does exist's in the debug folder. but as stated earlier here, when i ran the vsxmd as part of post build event it was looking for xml in wrong folder.

lijunle commented 4 years ago

Does it mean, vsxmd.exe looks for a wrong folder for VB.Net?

Could you please paste the .vbproj file? Does the property DocumentationFile defined in it?

qamaruddin commented 4 years ago

`<?xml version="1.0" encoding="utf-8"?>

Debug AnyCPU {3F664738-5517-448B-92DD-65BD3B99270F} Exe ConsoleApp4.Module1 ConsoleApp4 ConsoleApp4 512 Console v4.6.1 true true AnyCPU true full true true bin\Debug\ ConsoleApp4.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 AnyCPU pdbonly false true true bin\Release\ ConsoleApp4.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 On Binary Off On True Application.myapp True True Resources.resx True Settings.settings True VbMyResourcesResXFileCodeGenerator Resources.Designer.vb My.Resources Designer MyApplicationCodeGenerator Application.Designer.vb SettingsSingleFileGenerator My Settings.Designer.vb This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. C:\Users\qamar\source\repos\ConsoleApp4\packages\Vsxmd.1.4.5\tools\win-x64\Vsxmd.exe `
lijunle commented 4 years ago

I saw it there:

<DocumentationFile>ConsoleApp4.xml</DocumentationFile>

Is the ConsoleApp4.xml file generated somewhere under your project?

qamaruddin commented 4 years ago

Yes. It’s get generated in bin/debug

lijunle commented 4 years ago

I am thinking about if it is caused by the <OutputPath> tag. Could you please remove the <OutputPath>bin\Debug\</OutputPath> from the .vbproj file and check if Vsxmd is working? I will update to support <OutputPath> if confirmed.

qamaruddin commented 4 years ago

without output tag the build won't work for Vb projects.