Classes from Nuget package
See original GitHub issueHi,
First of Thanks for a awesome tool! Absolutly love it!
But I have an problem I can’t resolve… I a class library as a nuget package, from a service solution, that I reference in my Asp.Net5 Client.
What I want is to template all classes in the nuget package, Already have a template thats working for the project in the same solution. But when I add the nuget reference it cant be found…
17:35:40.319 WARNING: Cannot find project named ‘Backend.Queries’
How can I do this or is it not supported? If not I guess I could move the Dtos, Commands and Queries project to the client solution and make the backend consume the nuget packages.
But stil it would be nice for packages you don’t have control over.
Thanks!
$Classes(c => AcceptableClass(c.Name))[
// Generated.
// Do NOT edit this file manually.
$Imports
$Properties[$Type[$CreatePropertyImport]]
export class $ClassName $Inheritance {
constructor($Properties[public $name: $Type[$TypeScriptName]][,]) {
}
}
]
bool AcceptableClass(string className)
{
if(className.EndsWith("Dto") ||
className.EndsWith("Query") ||
className.EndsWith("Command"))
{
return true;
}
return false;
}
Template(Settings settings)
{
settings.IncludeProject("Pixie.Backend"); //Project in the same solution
settings.IncludeProject("Backend.Queries"); //Nuget package references in project.json
settings.IncludeReferencedProjects();
settings.OutputExtension = ".ts";
}
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:7 (1 by maintainers)
Top Results From Across the Web
How to see public classes/methods for installed nuget dll
In the installed nuget folder C:\Users\myUserName\.nuget\packages\some.nuget\1.2.3 is just some nuget metadata and the dll file. I know the ...
Read more >Create and publish a NuGet package using Visual Studio ...
With Microsoft Visual Studio, you can create a NuGet package from a .NET class library, and then publish it to nuget.org using a...
Read more >Using a NuGet in a class library? : r/csharp
A better practice is to make the library a NuGet package itself. The package will contain the dependencies to different NuGet packages.
Read more >Visual Studio: Creating a nuget package from a class library
The configuration. First thing you need is...something to publish. For this tutorial I'm using a sample .NET 6 class library containing some ...
Read more >Shared class library vs. internal NuGet package vs copying
Hi. We have a number of different applications that share more and more of a common functionality. So far we've just copied the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for the quick reply! Ok guess we have a decision to make then… =)
External reference support would be extremly good to have for larger projects, I know you have lots to do but I hope to see it in the future.
Thanks!
Managed Extensibility Framework https://en.m.wikipedia.org/wiki/Managed_Extensibility_Framework