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

Support for VB.Net #81

Open
qamaruddin opened this issue Apr 2, 2020 · 12 comments
Open

Support for VB.Net #81

qamaruddin opened this issue Apr 2, 2020 · 12 comments

Comments

@qamaruddin
Copy link

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
Copy link
Owner

lijunle commented Apr 2, 2020

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
Copy link
Author

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
Copy link
Author

@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
Copy link
Owner

lijunle commented Apr 3, 2020

Have you enable the XML documentation generations?

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

@qamaruddin
Copy link
Author

Yes, I have xml generation turned on.
image

@qamaruddin
Copy link
Author

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
Copy link
Owner

lijunle commented Apr 3, 2020

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
Copy link
Author

<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProjectGuid>{3F664738-5517-448B-92DD-65BD3B99270F}</ProjectGuid> <OutputType>Exe</OutputType> <StartupObject>ConsoleApp4.Module1</StartupObject> <RootNamespace>ConsoleApp4</RootNamespace> <AssemblyName>ConsoleApp4</AssemblyName> <FileAlignment>512</FileAlignment> <MyType>Console</MyType> <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> <Deterministic>true</Deterministic> <NuGetPackageImportStamp> </NuGetPackageImportStamp> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PlatformTarget>AnyCPU</PlatformTarget> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <DefineDebug>true</DefineDebug> <DefineTrace>true</DefineTrace> <OutputPath>bin\Debug\</OutputPath> <DocumentationFile>ConsoleApp4.xml</DocumentationFile> <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PlatformTarget>AnyCPU</PlatformTarget> <DebugType>pdbonly</DebugType> <DefineDebug>false</DefineDebug> <DefineTrace>true</DefineTrace> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DocumentationFile>ConsoleApp4.xml</DocumentationFile> <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> </PropertyGroup> <PropertyGroup> <OptionExplicit>On</OptionExplicit> </PropertyGroup> <PropertyGroup> <OptionCompare>Binary</OptionCompare> </PropertyGroup> <PropertyGroup> <OptionStrict>Off</OptionStrict> </PropertyGroup> <PropertyGroup> <OptionInfer>On</OptionInfer> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Deployment" /> <Reference Include="System.Xml" /> <Reference Include="System.Core" /> <Reference Include="System.Xml.Linq" /> <Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Net.Http" /> </ItemGroup> <ItemGroup> <Import Include="Microsoft.VisualBasic" /> <Import Include="System" /> <Import Include="System.Collections" /> <Import Include="System.Collections.Generic" /> <Import Include="System.Data" /> <Import Include="System.Diagnostics" /> <Import Include="System.Linq" /> <Import Include="System.Xml.Linq" /> <Import Include="System.Threading.Tasks" /> </ItemGroup> <ItemGroup> <Compile Include="Module1.vb" /> <Compile Include="My Project\AssemblyInfo.vb" /> <Compile Include="My Project\Application.Designer.vb"> <AutoGen>True</AutoGen> <DependentUpon>Application.myapp</DependentUpon> </Compile> <Compile Include="My Project\Resources.Designer.vb"> <AutoGen>True</AutoGen> <DesignTime>True</DesignTime> <DependentUpon>Resources.resx</DependentUpon> </Compile> <Compile Include="My Project\Settings.Designer.vb"> <AutoGen>True</AutoGen> <DependentUpon>Settings.settings</DependentUpon> <DesignTimeSharedInput>True</DesignTimeSharedInput> </Compile> </ItemGroup> <ItemGroup> <EmbeddedResource Include="My Project\Resources.resx"> <Generator>VbMyResourcesResXFileCodeGenerator</Generator> <LastGenOutput>Resources.Designer.vb</LastGenOutput> <CustomToolNamespace>My.Resources</CustomToolNamespace> <SubType>Designer</SubType> </EmbeddedResource> </ItemGroup> <ItemGroup> <None Include="My Project\Application.myapp"> <Generator>MyApplicationCodeGenerator</Generator> <LastGenOutput>Application.Designer.vb</LastGenOutput> </None> <None Include="My Project\Settings.settings"> <Generator>SettingsSingleFileGenerator</Generator> <CustomToolNamespace>My</CustomToolNamespace> <LastGenOutput>Settings.Designer.vb</LastGenOutput> </None> <None Include="App.config" /> <None Include="packages.config" /> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" /> <Import Project="..\packages\Vsxmd.1.4.5\build\Vsxmd.targets" Condition="Exists('..\packages\Vsxmd.1.4.5\build\Vsxmd.targets')" /> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <PropertyGroup> <ErrorText>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}.</ErrorText> </PropertyGroup> <Error Condition="!Exists('..\packages\Vsxmd.1.4.5\build\Vsxmd.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Vsxmd.1.4.5\build\Vsxmd.targets'))" /> </Target> <PropertyGroup> <PostBuildEvent>C:\Users\qamar\source\repos\ConsoleApp4\packages\Vsxmd.1.4.5\tools\win-x64\Vsxmd.exe</PostBuildEvent> </PropertyGroup> </Project>

@lijunle
Copy link
Owner

lijunle commented Apr 3, 2020

I saw it there:

<DocumentationFile>ConsoleApp4.xml</DocumentationFile>

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

@qamaruddin
Copy link
Author

Yes. It’s get generated in bin/debug

@lijunle
Copy link
Owner

lijunle commented Apr 3, 2020

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
Copy link
Author

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

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