How do i use DocFX to generate c# documentation from source code without VS2017? - docfx

I am trying to follow the tutorial from the command line. I have generated the project and deployed the blank website then added a vs2012 project to the source folder maintaining the original heirarchy. I have edited the docfx.json file to include "src/.csproj" "src/.cs*" which i assume are searched recursively. The project was previously commented for use with SandCastle so there should be plenty to extract or generate metadata from. I currently have vs2012 msdn installed. My issue is that the metadata never builds and even when I'm using the sample seed project all the md files show up on the webhost but not the documentation from the source files.

There is no requirement to have the complete VS2017 installed, instead you can just install the build tools of VS2017. Download
Just start a developer prompt for VS2017 environment and do docfx from there, it should then be able to extract metadata. I had problems with VB.NET projects with docfx and older Visual Studio tooling for some reason.

Related

'System.ServiceProcess.ServiceController version issue with Wix Installer and .Net Core 3.1

I get an exception "Could not load file or assembly 'System.ServiceProcess.ServiceController, Version=4.2.3.0" when trying to install a Windows Service written in .Net Core 3.1 using Wix 3.11.2. The version of System.ServiceProcess.ServiceController.dll on my system is 4.7.19.56404. I've added the ..\netcoreapp3.1\runtimes\win\lib\netstandard2.0 directory per one suggestion and also enabled AutoGenerateBindingRedirects and GenerateBindingRedirectsOutputType in the project file. How to work around this binding issue?
I resolved the problem by first using publish to generate the output files, and then added them as components to my Product.wxs file. Then the service installed and ran fine. It was a lot of files so I wrote a small console app to generate the component XML to a file and pasted that into the Product.wxs file.
Initially, I was taking the files from the folder upstream from the publish folder. I may also have overlooked a file as well because I was adding them manually.

How to add an asp.net website into a github repository?

I started a asp.net website project yesterday and I would like to add it on a git hub repository.
The problem is that it seems that when you create a new website on visual studio, the project solution and the website stay on a different folder.
What I tried to do:
Create an empty solution and then add the website inside.
The result:
It works for github, but visual studio lists an error message about the solution that doesn't actually affect the website itself(I still can run it) and it also makes visual studio asks me to save the solution everytime I close the project and it bothers cause it doesn't seem like it should happen.
I don't know if the solution is required in a asp.net website project. But I also don't know how to do it without it.
So,how do I create a github repository that contains a asp.net website that will work to the people who download it without any problems ?
Yes, you want to start in the folder with the SLN file. Outside of Visual Studio, open up a command line (Powershell or whatever), navigate to that folder, and run command git init. This will start git for your repo.
Next I'd go here https://www.gitignore.io/ and get the Visual Studio .gitignore file to put in that same folder.
To commit to your repo, run these commands from the same folder:
git add --all
git commit -m "Write a comment here"
git pull
git push
You should be good-to-go. I try not to use git from inside VS; it's been buggy for years.
Try this extension, it works perfectly on ASP.NET projects, MVC projects, API and .NET Core.
Once installed, its just clicks away for publishing, committing and syncing all your files. And all your files are published in your GitHub repositories. I am using it and never had a problem with it. There is an instruction details on the page which are self explanatory.
GitHub Extension for Visual Studio

How to build an existing Qt project in Visual Studio?

I have a visual C++ project that contains references to Qt libraries but I am unable to build it in Visual Studio. I installed Qt 5 sdk and plugin in VS 2012 and the initial sample Qt projects work fine, but not the older project - it could be an issue related to the project being compatible to an older version of Qt - but I don't know how to solve the problem. The error keeps showing - "The system cannot find the path specified visual c++. Moc'ing .. Uic'ing.."
The error says MSB6006: "cmd.exe" exited with code 3. The solution explorer contains some moc_xx.cpp files which are only references and are not present in the project directory. I removed them and tried rebuilding but it gives the same error
QTDIR must be set prior to starting Visual Studio for the project to properly find the location of moc.exe and uic.exe.
The Qt Visual Studio Add-in will create custom build steps for .ui and header files whenever Qt files are added or modified. It is then Visual Studio that runs the custom build rules but these rules typically reference $(QTDIR)\bin\moc.exe.
I too had the similar issue recently with an old VS project created years ago by a colleague.
The VS project was created using qmake. It contains the absolute full path to the moc.exe, of the machine where it was originally created. That is, of the PC of my colleague who left the team.
I do not have moc.exe at same location as he had it.
Therefore, the MOC step in build fails, with the error: the system cannot find the path specified.
You could find what the path is, by raising build output verbosity to diagnostic for instance.
Hope it helps.

How do I open the Orchard project?

Loading it in VS 2010 throws many errors, though it does finally, albeit partially, load.
Also, the .PROJ file was not recognized by Windows at all, I opened the .SLN file in the /src folder but that threw tons of errors when loading up in VS web express 2010. Is that the problem? Do I need full version VS 2010?
Have you enlisted the full source code from Codeplex as described here? If you want to work with the source (eg. for module development) you should fetch the full source and not use the prebuilt package, which is intended for server deployment.
Also, I'd advise you to read this article about building Orchard from source. Visual Web Developer 2010 Express should work perfectly (as Orchard can be built without having VS at all).
It's ok that .proj file was not recognized - it's just an MSBuild XML file for automating the build process. You almost never have to touch those.

MSBuild failing to build referenced projects when upgrading to VS2010

I have recently upgraded my .Net 3.5 solution containing some C# code projects and a ASP.net web site project to VS2010 (from VS2008). It is building and running fine inside VS, but I get some problems when trying to build it on my server with MSBuild 4.0 via TeamCity. It seems like the projects that are referenced from the web site are not built. This was all working fine before I upgraded to VS2010, MSbuild 4.0 and Windows SDK 7.1.
Inside the msbuild script that I use to build from teamcity I have defined project references for the web site like this:
<ProjectReference Include="..\src\trunk\DataAccess\DataAccess.csproj">
<Project>{C43242F4-7286-4BEC-9A27-001D6FC14860}</Project>
<Name>DataAccess</Name>
</ProjectReference>
When I try to run the build script I get an error message saying that it could not find the dll file when trying to copy it from the bin folder of the referenced project into the bin folder of the web site. This is happening because the referenced projects are in fact never built at all (No bin folder exists in the project dir).
Does anyone have a clue what may cause this? I am not very experienced with MSbuild, so I may have overlooked some important stuff. Is it not so that MSbuild will automatically try to build the referenced projects if no project output is existing?
Will be thankful for any help!
I would need some more info to guide you on this, but off the top of my head try adding
/toolsversion:3.5
to your msbuild call.
I found another post on this website describing your exact same problem. I also ran into this same problem too.
This blog on the MSDN Website describes the problem and the work-around. Basically it's a limitation of solution files which are not in an MSBuild format, but just a fancy text file. And the real thing is, that the dependencies need to be specified in the project files them selves not the solution file. ahhh... just read the link it explains it a hundred times better than my answer here.

Resources