Rick Drizin
Rick Drizin
Currently, the VS Extension just adds those context-menus and sets the `CustomTool` property of the script, which retriggers the execution whenever the file is modified/saved. In order to get that...
Install: `dotnet tool install --global dotnet-codegencs` If dotnet-codegencs doesn't get added to your path, you can find it here: - Powershell: `$($env:USERPROFILE)\.dotnet\tools\dotnet-codegencs.exe` - cmd: `%USERPROFILE%\.dotnet\tools\dotnet-codegencs.exe`
Try adding the missing assemblies. https://github.com/Drizin/CodegenCS/blob/bf70ba6af23f108074ec94d038a31278d42d1dcb/src/Tools/CodegenCS.Tools.CliTool.Tests/BasicTests.cs#L153
But `VSExecutionContext` is only available from inside Visual Studio. If you're running from command-line you can't inject that type.
I've just published a nuget package with a source generator. Check latest commit (including the updates to the README doc) and let me know how it goes. In my experience...
> I have tested it now with a .NET Framework ASP.NET Project, but this is not working. .NET Framework ASP.NET still requires to old NuGet package style. Interesting. I thought...
> I have now a better concept for logging. I simply create a: `ICodegenTextWriter logWriter = context[templateName + ".log"];` With that I could write a log file to the correct...
> How can I get the location of the source `.csx` file? Inject `ExecutionContext`. > A the moment I use `Directory.GetCurrentDirectory()` for storing the log file. Is this directory stable?...
> Thanks, basically this is working great! Cool! I wasn't expecting it to work so well at the first shot, but I've just made some important improvements. version 3.5.1 >...