question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Generate sources as post-build event

See original GitHub issue

Hello,

Thanks for this project. I recently started to use it, so far works great!

I have a question, is it possible to somehow configure the TS source generation to run after specific project is build?

So essentially what I would want is to have all my ts files generated when my WebAPI (ASP.NET Core 2.1) project is built. Ideally this should work when building the project on local VS as well in CI (dotnet build ...). I tried the CLI tool, but it said Error Package 'TypeGen.DotNetCli 2.0.0' has a package type 'DotnetTool' that is not supported by project 'xxx.xxx.WebAPI'.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jburzynskicommented, Dec 6, 2018

Hi!

TypeGen.DotNetCli is now a global .NET CLI tool. TypeGen doesn’t have a per-project .NET CLI tool right now, because the current format of per-project tools is planned to be changed by Microsoft in the near future.

So right now one solution would be to install TypeGen.DotNetCli as a global .NET CLI tool and then add dotnet-typegen generate as a post-build action (or execute dotnet-typegen generate after running dotnet build in the console).

I think installing TypeGen as a global .NET CLI tool is currently probably the best way to add it as a post-build action.

Hope this helps!

0reactions
jburzynskicommented, Dec 12, 2018

Glad I could help!

It’s nice to see a working example - thanks for posting

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to: Specify build events (C#) - Visual Studio (Windows)
In Solution Explorer, select the project for which you want to specify the build event. On the Project menu, click {ProjectName} Properties ...
Read more >
How to run Visual Studio post-build events for debug ...
Pre- and Post-Build Events run as a batch script. You can do a conditional statement on $(ConfigurationName) . For instance
Read more >
Post-Build Events and .NET Core
I have used post-build events in Visual Studio for a long time, primarily to copy files from one location to another.
Read more >
playing with Power Shell commands and Post Build events.
So I have been working recently on making the Mission Control (MC) repository, a little more developer/user friendly.
Read more >
Post-build event command
Hello, I'm trying to implement post-build event command for a PDF target. My goal is simple. I just want to copy the PDF...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found