# C# Visual Studio / VS Code ###### tags: `C#` `Visual Studio` `VS Code` # Visual Studio ## 2019 ### 2021/04/02 - ver. 16.8.6: ![](https://i.imgur.com/OxeEbQZ.png) # VS Code ## Nuget ![](https://i.imgur.com/akbWpt4.png) Command Palatte ![](https://i.imgur.com/KFZgrFJ.png) --- ## Extension ## C/ C++ ### MS debugging ![](https://i.imgur.com/5F5MC0i.png) ### 3rd Party Project Generator ![](https://i.imgur.com/JWvnpBz.png) ![](https://i.imgur.com/4J6SDFj.png) ![](https://i.imgur.com/GfXmMdL.png) ## Node JS ![](https://i.imgur.com/wPU2dNW.png) ![](https://i.imgur.com/fnYD43u.png) ## C# ![](https://i.imgur.com/urmBxIq.png) ## Java ![](https://i.imgur.com/0MaT0g7.png) ![](https://i.imgur.com/c2FBrlW.png) ## Python ![](https://i.imgur.com/EN6uOz3.png) ![](https://i.imgur.com/oll1yIK.png) ## Widgets ![](https://i.imgur.com/jV9xnY9.png) ![](https://i.imgur.com/5Z1d0rl.png) --- # Create new project ![](https://i.imgur.com/NV0zzYi.png) ![](https://i.imgur.com/xGan4qP.png) ![](https://i.imgur.com/eBBcR79.png) --- # Add Library Project 2021/11/09, Virtual Studio 2019 #### C#, All platforms, Library --> Class library: ![](https://i.imgur.com/pVphqfP.png) ![](https://i.imgur.com/7aeghlL.png) #### Target Framework --> .Net Core 3.1 ![](https://i.imgur.com/ESxB7bG.png) ### Add project reference ![](https://i.imgur.com/xK8qIAB.png) ### Dependencies / Package ![](https://i.imgur.com/5tVWPok.png) #### ``System.IO`` ver ``4.6.0`` ![](https://i.imgur.com/o7s8DiX.png) ![](https://i.imgur.com/njRoFBb.png) #### ``System.IO.Ports`` ver ``6.0.0`` ![](https://i.imgur.com/yct9nMt.png) ![](https://i.imgur.com/rY0IG5f.png) ## Add Existing Project into Current Solution #### 1. Solution --> Right Click: ![](https://i.imgur.com/efyXlIl.png) #### 2. Add --> Existing Proejct: ![](https://i.imgur.com/uGOh0U0.png) #### 3. Brower the existing project folder and select ``*.csproj`` file ![](https://i.imgur.com/gGtzRJa.png) #### 4. Result: ![](https://i.imgur.com/cLtg1sP.png) ## Designer Preview #### [Introducing .NET Core Windows Forms Designer Preview 1](https://devblogs.microsoft.com/dotnet/introducing-net-core-windows-forms-designer-preview-1/) ![](https://i.imgur.com/206Vtms.png) ![](https://i.imgur.com/5SIgcpT.png) ![](https://i.imgur.com/Mt0l8BE.png) the normal ``*.csproj`` file should look like: ``` <Project Sdk="Microsoft.NET.Sdk.WindowsDesktop"> <PropertyGroup> <OutputType>WinExe</OutputType> <TargetFramework>netcoreapp3.1</TargetFramework> <UseWindowsForms>true</UseWindowsForms> <ApplicationIcon /> <Win32Resource /> <SignAssembly>false</SignAssembly> <Platforms>AnyCPU;x86</Platforms> <AssemblyName>Kessil_AP9X</AssemblyName> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <PlatformTarget>x86</PlatformTarget> <OutputPath>D:\AP9X_PC_Tools\</OutputPath> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x86'"> <PlatformTarget>x86</PlatformTarget> <OutputPath>output\</OutputPath> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x86'"> <OutputPath>output\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> </PropertyGroup> <ItemGroup> <ProjectReference Include="..\KessilSwFramework\KessilSwFramework.csproj" /> </ItemGroup> <ItemGroup> <Compile Update="Properties\Resources.Designer.cs"> <DesignTime>True</DesignTime> <AutoGen>True</AutoGen> <DependentUpon>Resources.resx</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <EmbeddedResource Update="Properties\Resources.resx"> <Generator>ResXFileCodeGenerator</Generator> <LastGenOutput>Resources.Designer.cs</LastGenOutput> </EmbeddedResource> </ItemGroup> </Project> ``` __I have removed the below snippet:__ ``` <ItemGroup> <PackageReference Include="System.IO.Ports" Version="5.0.1" /> </ItemGroup> ``` ``` <ItemGroup> <Compile Update="KessilAp9xLuxFormSockets.cs"> <SubType>Form</SubType> </Compile> <Compile Update="KessilAp9xLuxFormDelegateImpl.cs"> <SubType>Form</SubType> </Compile> </ItemGroup> ``` --- ## Comment / uncomment a code snippet ### [5 Great Visual Studio Keyboard Shortcuts](https://vslive.com/Blogs/News-and-Tips/2015/04/5-VS-Keyboard-Shortcuts.aspx) * comment a code snippet: ``Ctrl + K + C`` * uncomment a code snippet: ``Ctrl + K + U``