photo

[SOLVED] No option to create C# project with .Net Framework

Recommended Posts

Hey guys,

Few days ago I created C# test project, where I found problem with access to System.IO.Ports. After some time I found, that it is because of .net core, which has no System.IO.Ports components. When I wanted to create new project with .Net Framework, there was no option to choose it.

Thanks
Roman

Share this post


Link to post

Have you tried to add this nuget package? https://www.nuget.org/packages/System.IO.Ports

It should be compatible with .NET Core SDK.

We doesn't offer .NET Framework option for new projects since the .NET future releases will be merged to a new .NET 5 standard (based on a .NET Core). In theory there should be a more or less straightforward migration for that.

Thanks!

Share this post


Link to post

OK. I thought, that .Net Framework is supported based on this website (https://developer.unigine.com/docs/2.11/code/csharp/application). I will give it a try to add this nuget package, but I cannot find way how to do this. 

 

Thanks

Share this post


Link to post

In the root directory of your project you can find a .csproj file. You can add System.IO.Ports to it via following command line:

dotnet add "C:\My_Unigine_Project\My_Unigine_Project.csproj" package System.IO.Ports --version 4.7.0

 

If everything ends fine you will see the additional lines in your project file:

<ItemGroup>
   <PackageReference Include="System.IO.Ports" Version="4.7.0" />
</ItemGroup>

 

Share this post


Link to post

Thanks !!! It did a trick.

Share this post


Link to post