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

PackAsTool / ToolCommandName #53

Open
jzabroski opened this issue Apr 13, 2020 · 1 comment
Open

PackAsTool / ToolCommandName #53

jzabroski opened this issue Apr 13, 2020 · 1 comment

Comments

@jzabroski
Copy link

@KirillOsenkov Given the inputs to Program.cs are hardcoded (#52), once this is fixed, it makes sense to package RoslynQuoter as a .NET Core CLI Tool. Doing would also therefore require packaging it as a netcoreapp3.1 TargetFramework in additional to legacy .NET Framework.

<PropertyGroup>
<AssemblyName>RoslynQuoter</AssemblyName>
<OutputType>Library</OutputType>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>

Suggested XML:

<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
  <PackAsTool>true</PackAsTool>
  <ToolCommandName>dotnet-quote</ToolCommandName>
</PropertyGroup>
@GrahamTheCoder
Copy link

In case someone works on this, if you want to support loading files from .NET Framework projects, you can copy what I did in the ICSharpCode CodeConverter:
https://github.com/icsharpcode/CodeConverter/pull/556/files#diff-f0ba4035427169d7318d6227b74de3e8R25
Basically check if there's a Visual Studio MSBuild version, and if so, start a framework process and redirect the output back to the core app.
Thanks for the great tool Kirill!

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