Open mardukbp opened 3 months ago
Another tip. In order to automatically generate the typings after publishing the .NET Project with dotnet publish -c Release
I added the following to the projects' .csproj file:
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<DebugSymbols>False</DebugSymbols>
<DebugType>None</DebugType>
<PublishDir>..\proj</PublishDir>
</PropertyGroup>
<Target Name="GenerateStubs" AfterTargets="Publish">
<Exec Command="GeneratePythonNetStubs --dest-path=../../typings --target-dlls=../proj/CalcTest.dll"/>
</Target>
First of all thank you for writing this awesome tool!
I installed it using .NET 8. When I executed GeneratePythonNetStubs I got the error (abridged):
Which means that it requires the .NET 6 x64 Runtime. I downloaded it, unpacked it in Downloads and then set the environment variable
DOTNET_ROOT
to the .NET 6 runtime. GeneratePythonNetStubs then did its magic :)In order to use the typings in VS Code with the Python extension I added the following to settings.json:
I think it would be great to provide these two pieces of information in the README so that people can benefit the most from your efforts.