Skip to content

Problem using the NuGet package in .NET Core 3.1 project #55

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

Open
Ergamon opened this issue May 13, 2020 · 5 comments
Open

Problem using the NuGet package in .NET Core 3.1 project #55

Ergamon opened this issue May 13, 2020 · 5 comments

Comments

@Ergamon
Copy link

Ergamon commented May 13, 2020

I am trying to use this NuGet package in a .NET Core 3.1 project.

When I build I get an error in the build output of VS telling something about missing rights, which is completly wrong.
When I try to run the shown command I get a more reasonable long error message, basically telling me that the commandline tool cannot find the assembly System.Runtime in version 4.2.2.0.

Does anyone know a workaround for this?

@ChrisLambrou
Copy link
Contributor

This package currently only supports .NET Framework 4.5 onwards. I've recently been working on support for .NET Standard 2.0, .NET Core 2.1 and .NET Core 3.1, and have just published a pre-release package for this, ready for internal testing at Redgate.

See https://www.nuget.org/packages/XmlDoc2CmdletDoc/0.4.0-dotnetcore0000

If you're still interested, I'd appreciate it if you'd give it a try and let us know how it goes.

@Ergamon
Copy link
Author

Ergamon commented Aug 5, 2020

Sorry for the late reply.

I found some time to experiment with this version and it looks promising.

Meanwhile there is a newer pre release version (0.4.0-dotnetcore0001) online. But this one I couldn´t get working. Once I downgraded to the version you mentioned everything worked again.

@SteveGilham
Copy link

Having just noticed the 0.4.0 pre-release, I observe that in this context

  1. the netcoreapp3.1 version launches quite happily on a machine with only a 3.1.x runtime
  2. the netcoreapp3.1 version is redundant, and could be replaced by adding a XmlDoc2CmdletDoc/XmlDoc2CmdletDoc/runtimeconfig.template.json containing
{
  // Rollforward across major versions of ASP.NET Core
  // The default setting only will only rollforward across minor versions
  "rollForwardOnNoCandidateFx": 2
}

or the equivalent --roll-forward Major to the command line generated by the targets file, like

<XmlDoc2CmdletDocCommand Condition="$(XmlDoc2CmdletDocToolPath.EndsWith('.dll'))">dotnet --roll-forward Major "$(XmlDoc2CmdletDocToolPath)"</XmlDoc2CmdletDocCommand>
  1. The Jolt doc-comment reading library is, alas, bound to the .net framework on Windows via Jolt.XmlDocCommentReaderSettings (at least), so while the tool starts happily on a Linux VM with Mono 6.10 and .net SDK 3.1.x, the process fails with
System.ArgumentNullException: Value cannot be null. (Parameter 'path1')
   at System.IO.Path.Combine(String path1, String path2)
   at Jolt.XmlDocCommentReaderSettings.CreateDefaultSettings()
   at Jolt.XmlDocCommentReaderSettings..cctor()

when it discovers that Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles); is null. There's some other dubious code in that method (like adding a literal " (x86)" to get a 32-bit program files path)

@FLAMESpl
Copy link

FLAMESpl commented Jun 1, 2021

0.4.0 prerelease does not work for my app in net5, same permission error. Looking forward to new updates.

@trondr
Copy link

trondr commented Sep 19, 2021

0.4.0 prerelease does not work for my app in net5, same permission error. Looking forward to new updates.

I have similar issue with .net5. Just created a pull request for adding .net 5 support. #61

With XmlDoc2CmdletDoc support for .net 5.0 it is possible to create maml from a .net 5.0 F# binary project (after manually adding the FSharp.Core.dll to the same folder as XmlDoc2CmdletDoc.exe).

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

5 participants