Closed uholeschak closed 2 weeks ago
Another problem is, that when using logger.WriteLineAsync
VS2022 hangs and restarts afterwards.
Another problem is that after a compilation error in the script file it's not possible to compile a second time.
Simply nothing happens when calling the custom tool or you get an error message:
You have to restart VS to try the next compilation.
When executing a template in VS2022 17.10.1 I get a HRESULT error when the solution is updated: This problem seems to occur only for .NET Framework projects. With NET8 there is no error.
Reproduced and fixed. Please try with version 3.7.1
Another problem is that after a compilation error in the script file it's not possible to compile a second time. Simply nothing happens when calling the custom tool or you get an error message
Also reproduced and fixed. Please try with version 3.7.1
Another problem is, that when using
logger.WriteLineAsync
VS2022 hangs and restarts afterwards.
I couldn't reproduce this problem.
Does the following code (which works for me) crashes for you?
class MyTemplate
{
async Task<FormattableString> Main(ILogger logger)
{
await logger.WriteLineAsync($"Generating MyTemplate...");
return $"My first template";
}
}
I'm using Microsoft Visual Studio Professional 2022 (64-bit) Version 17.10.2. Can you please update yours to 17.10.2+ and try again?
If the problem persists, can you open CodegenCS.sln
, set VS2022Extension
as the starting project, launch it, open any existing csproj, run a template to reproduce the problem, and find where exactly the code is crashing?
Thanks, it seems to work now without any problems! My current VS version is: 17.10.3 In the generated log file the date is not replaced:
Generated by CodegenCS Custom Tool at {DateTime.Now.ToString()}.
For more info please check out https://github.com/Drizin/CodegenCS
Is this a bug?
When executing a template in VS2022 17.10.1 I get a HRESULT error when the solution is updated:
This problem seems to occur only for .NET Framework projects. With NET8 there is no error.