-1

I have been asked to work on a piece of software. I am an intern developer and there are no other developers at this company. I was given a folder of C# source code that includes other folders as well as a .sln file.

I clicked the .sln file and learned that this was a Windows Forms application that was not written in C# but in Visual Basic using the .NET framework (VB.NET) if I understand correctly. I noticed at the top that the solution configurations was set to "Release" so I switched that to debug.
There was also a second project/ item in the solution that was not loading. It is called nameofsoftware_Installed. I downloaded an extension that detects dependencies so that it would load, but It appears that there is no code and maybe doesn't need to be in this folder.

I created a new Windows Forms Application using Visual Studio and I do not have the same amount of extra files.

View of the Solution Explorer:

enter image description here

When I hit start with or without debugging the code works. It did give me the option to turn off Only My Code.

I am still unsure as to whether or not I have set up everything correctly. There are some resource files that are showing up as greyed out as they are not "included" in project. Should I be right clicking on these and including them?

I am considering just taking each file and re-creating the project. However, as I am unfamiliar with this software, I don't know if there are any special configurations needed. The original creator of the software was a contractor who is too busy to speak with me to get me started. I know what I need to do in the code, but am struggling with setup and no one is able to help me.

I tried retargeting and rebuilding the solution, deleting the .suo files, and including every file in the solution explorer in the project.

I expected to either receive files to put into a VS project myself, as we do when college professors provide some header files and starter code, OR to be given a .sln that I could click on an get started. At the very least, I hoped to have some documentation on the software, how its works, how it is implemented. And maybe some basic guidance on getting started.

.vbproj opened in notepad

    <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
    <ProductVersion>
    </ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{3D798AFD-8946-4631-8CF5-12FA5B7468BF}</ProjectGuid>
    <OutputType>WinExe</OutputType>
    <StartupObject>_8816_Controller.My.MyApplication</StartupObject>
    <RootNamespace>_8816_Controller</RootNamespace>
    <AssemblyName>RATA Data Ware</AssemblyName>
    <FileAlignment>512</FileAlignment>
    <MyType>WindowsForms</MyType>
    <TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
    <TargetFrameworkProfile />
    <IsWebBootstrapper>false</IsWebBootstrapper>
    <PublishUrl>publish\</PublishUrl>
    <Install>true</Install>
    <InstallFrom>Disk</InstallFrom>
    <UpdateEnabled>false</UpdateEnabled>
    <UpdateMode>Foreground</UpdateMode>
    <UpdateInterval>7</UpdateInterval>
    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
    <UpdatePeriodically>false</UpdatePeriodically>
    <UpdateRequired>false</UpdateRequired>
    <MapFileExtensions>true</MapFileExtensions>
    <ApplicationRevision>0</ApplicationRevision>
    <ApplicationVersion>2.4.0.%2a</ApplicationVersion>
    <UseApplicationTrust>false</UseApplicationTrust>
    <BootstrapperEnabled>true</BootstrapperEnabled>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
    <PlatformTarget>x86</PlatformTarget>
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <DefineDebug>true</DefineDebug>
    <DefineTrace>true</DefineTrace>
    <OutputPath>bin\Debug\</OutputPath>
    <DocumentationFile>RATA Data Ware.xml</DocumentationFile>
    <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
    <Prefer32Bit>false</Prefer32Bit>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
    <PlatformTarget>x86</PlatformTarget>
    <DebugType>pdbonly</DebugType>
    <DefineDebug>false</DefineDebug>
    <DefineTrace>true</DefineTrace>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DocumentationFile>RATA Data Ware.xml</DocumentationFile>
    <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
    <Prefer32Bit>false</Prefer32Bit>
  </PropertyGroup>
  <PropertyGroup>
    <OptionExplicit>On</OptionExplicit>
  </PropertyGroup>
  <PropertyGroup>
    <OptionCompare>Binary</OptionCompare>
  </PropertyGroup>
  <PropertyGroup>
    <OptionStrict>Off</OptionStrict>
  </PropertyGroup>
  <PropertyGroup>
    <OptionInfer>On</OptionInfer>
  </PropertyGroup>
  <PropertyGroup>
    <ApplicationIcon>WispRefresh.ico</ApplicationIcon>
  </PropertyGroup>
  <PropertyGroup>
    <ApplicationManifest>My Project\app.manifest</ApplicationManifest>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="System" />
    <Reference Include="System.Data" />
    <Reference Include="System.Data.DataSetExtensions" />
    <Reference Include="System.Drawing" />
    <Reference Include="System.Windows.Forms" />
    <Reference Include="System.Windows.Forms.DataVisualization" />
    <Reference Include="System.Xml" />
  </ItemGroup>
  <ItemGroup>
    <Import Include="Microsoft.VisualBasic" />
    <Import Include="System" />
    <Import Include="System.Collections" />
    <Import Include="System.Collections.Generic" />
    <Import Include="System.Data" />
    <Import Include="System.Drawing" />
    <Import Include="System.Diagnostics" />
    <Import Include="System.Windows.Forms" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="CalibrationSequence.Designer.vb">
      <DependentUpon>CalibrationSequence.vb</DependentUpon>
    </Compile>
    <Compile Include="CalibrationSequence.vb">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="ChannelEditor.Designer.vb">
      <DependentUpon>ChannelEditor.vb</DependentUpon>
    </Compile>
    <Compile Include="ChannelEditor.vb">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="ChartWindow.Designer.vb">
      <DependentUpon>ChartWindow.vb</DependentUpon>
    </Compile>
    <Compile Include="ChartWindow.vb">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="Common.vb" />
    <Compile Include="Error_Form.Designer.vb">
      <DependentUpon>Error_Form.vb</DependentUpon>
    </Compile>
    <Compile Include="Error_Form.vb">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="Error_Log.vb" />
    <Compile Include="MainForm.Designer.vb">
      <DependentUpon>MainForm.vb</DependentUpon>
    </Compile>
    <Compile Include="MainForm.vb">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="My Project\AssemblyInfo.vb" />
    <Compile Include="My Project\Application.Designer.vb">
      <AutoGen>True</AutoGen>
      <DependentUpon>Application.myapp</DependentUpon>
      <DesignTime>True</DesignTime>
    </Compile>
    <Compile Include="My Project\Resources.Designer.vb">
      <AutoGen>True</AutoGen>
      <DesignTime>True</DesignTime>
      <DependentUpon>Resources.resx</DependentUpon>
    </Compile>
    <Compile Include="My Project\Settings.Designer.vb">
      <AutoGen>True</AutoGen>
      <DependentUpon>Settings.settings</DependentUpon>
      <DesignTimeSharedInput>True</DesignTimeSharedInput>
    </Compile>
    <Compile Include="Storage.vb" />
    <Compile Include="Working_Data.Designer.vb">
      <AutoGen>True</AutoGen>
      <DesignTime>True</DesignTime>
      <DependentUpon>Working_Data.xsd</DependentUpon>
    </Compile>
    <Compile Include="Working_Data.vb">
      <DependentUpon>Working_Data.xsd</DependentUpon>
    </Compile>
  </ItemGroup>
  <ItemGroup>
    <EmbeddedResource Include="CalibrationSequence.resx">
      <DependentUpon>CalibrationSequence.vb</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="ChannelEditor.resx">
      <DependentUpon>ChannelEditor.vb</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="ChartWindow.resx">
      <DependentUpon>ChartWindow.vb</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="Error_Form.resx">
      <DependentUpon>Error_Form.vb</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="MainForm.resx">
      <DependentUpon>MainForm.vb</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="My Project\Resources.resx">
      <Generator>VbMyResourcesResXFileCodeGenerator</Generator>
      <LastGenOutput>Resources.Designer.vb</LastGenOutput>
      <CustomToolNamespace>My.Resources</CustomToolNamespace>
      <SubType>Designer</SubType>
    </EmbeddedResource>
  </ItemGroup>
  <ItemGroup>
    <None Include="app.config" />
    <None Include="bin\Debug\RATA Data Ware.exe.config" />
    <None Include="bin\Release\RATA Data Ware.exe.config" />
    <None Include="My Project\app.manifest" />
    <None Include="My Project\Application.myapp">
      <Generator>MyApplicationCodeGenerator</Generator>
      <LastGenOutput>Application.Designer.vb</LastGenOutput>
    </None>
    <None Include="My Project\Settings.settings">
      <Generator>SettingsSingleFileGenerator</Generator>
      <CustomToolNamespace>My</CustomToolNamespace>
      <LastGenOutput>Settings.Designer.vb</LastGenOutput>
    </None>
    <None Include="Working_Data.xsc">
      <DependentUpon>Working_Data.xsd</DependentUpon>
    </None>
    <None Include="Working_Data.xsd">
      <SubType>Designer</SubType>
      <Generator>MSDataSetGenerator</Generator>
      <LastGenOutput>Working_Data.Designer.vb</LastGenOutput>
    </None>
    <None Include="Working_Data.xss">
      <DependentUpon>Working_Data.xsd</DependentUpon>
    </None>
  </ItemGroup>
  <ItemGroup>
    <None Include="Resources\delete-icon24.jpg" />
    <None Include="Resources\Delete-icon.png" />
    <None Include="Resources\edit-icon.png" />
    <None Include="Resources\add-icon24.png" />
    <None Include="Resources\Refresh.ico" />
    <Content Include="bin\Debug\RATA Data Ware.exe" />
    <Content Include="bin\Debug\RATA Data Ware.pdb" />
    <Content Include="bin\Debug\RATA Data Ware.xml" />
    <Content Include="bin\Debug\Resources\WispRefresh.ico" />
    <Content Include="bin\Release\RATA Data Ware.exe" />
    <Content Include="bin\Release\RATA Data Ware.pdb" />
    <Content Include="bin\Release\RATA Data Ware.xml" />
    <Content Include="bin\Release\Resources\WispRefresh.ico" />
    <Content Include="Resources\back-icon48.png" />
    <Content Include="Resources\clipboard-icon_Pastel32.png" />
    <Content Include="Resources\Clock-icon32.png" />
    <Content Include="Resources\delete-icon48.png" />
    <Content Include="Resources\Excel-icon24.png" />
    <Content Include="Resources\forward-icon48.png" />
    <Content Include="Resources\save-icon32.png" />
    <Content Include="Resources\Time-icon.png" />
    <Content Include="Resources\WispRefresh.ico">
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </Content>
    <Content Include="WhyDoesntInstallerWork.txt" />
    <Content Include="WispRefresh.ico" />
  </ItemGroup>
  <ItemGroup>
    <BootstrapperPackage Include=".NETFramework,Version=v4.0">
      <Visible>False</Visible>
      <ProductName>Microsoft .NET Framework 4 %28x86 and x64%29</ProductName>
      <Install>true</Install>
    </BootstrapperPackage>
    <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
      <Visible>False</Visible>
      <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
      <Install>false</Install>
    </BootstrapperPackage>
    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
      <Visible>False</Visible>
      <ProductName>.NET Framework 3.5 SP1</ProductName>
      <Install>false</Install>
    </BootstrapperPackage>
    <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
      <Visible>False</Visible>
      <ProductName>Windows Installer 3.1</ProductName>
      <Install>true</Install>
    </BootstrapperPackage>
  </ItemGroup>
  <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
</Project>
mpAppProg
  • 1
  • 4
  • So Sorry, I forgot to mention that once I include all the resources in the project I have build errors. 289 errors I am not able to include a screenshot embedded in the comment but I will try to make a link. – mpAppProg Jun 06 '23 at 15:20
  • First thing is to ensure you have created a backup of the solution - one that you aren't going to modify. – Tu deschizi eu inchid Jun 06 '23 at 15:21
  • @Tudeschizieuinchid thank you, yes I am not working on the master copy. – mpAppProg Jun 06 '23 at 15:22
  • If you're an _intern_ at a company that doesn't have any developers, then you're not an intern. It seems that whoever hired you thought they could hire a developer on the cheap because he/she/they thought that the contractor charged too much. Your taking work away from the consultant who created the application, so obviously he/she/they aren't going to make any time for you. – Tu deschizi eu inchid Jun 06 '23 at 15:24
  • 1
    Not seeing the actual errors, I find this kind of thing is usually something like NuGet packages not present. – Michael Foster Jun 06 '23 at 15:26
  • I get rid of the errors by excluding the backup and obj folders https://www.loom.com/i/da6fe27b35944688a06f442272d80aa8 – mpAppProg Jun 06 '23 at 15:27
  • @MichaelFoster Thank you very much! I will look into this and keep trying. – mpAppProg Jun 06 '23 at 15:29
  • 1
    @Tudeschizieuinchid Yes, this is true. the original contractor is working full time overseas now. My manager tells me he is much too busy/ perhaps company is being cheap and he doesn't want to. The scope of the projects they have for me to work on is incredible. I asked my coworker why such a big company cheaped out and hired me instead of a dev team or contracting an enterprise software company. He said I answered my own question. I certainly made it very clear to them in the interview that the work they have are big projects that require a team. – mpAppProg Jun 06 '23 at 15:34
  • What version of Visual Studio are you using? What version of Visual Studio was used to create the solution? To find this information, open the _.sln_ file using Notepad. You may also consider posting an image of the files/folders in the project folder. Also open the _.vbproj_ file using Notepad and add the contents to your post. – Tu deschizi eu inchid Jun 06 '23 at 15:35
  • This is not a question for SO as it is just too broad. If you want more general help then you should try a forum site and post back here when you have a specific question. – jmcilhinney Jun 06 '23 at 15:42
  • 3
    By the way, that second project looks to be A Setup project, which is for building an installer for the application project. I would guess that it should have been named Installer rather than Installed. – jmcilhinney Jun 06 '23 at 15:44
  • The greyed out items are hidden items that you made visible by clicking the "show hidden files" icon at the top of the solution tool window. Basically you don't have to setup anything. Just use this whole folder structure "as is" and open the .sln file. – Olivier Jacot-Descombes Jun 06 '23 at 15:46
  • @Tudeschizieuinchid Will check version now – mpAppProg Jun 06 '23 at 15:51
  • @jmcilhinney Noted, any suggestions? I has hoping it was a common issues and simple fix that I was overlooking. e.g. delete such and such files. – mpAppProg Jun 06 '23 at 15:52
  • @jmcilhinney It does look as though that is the case, however there is source code in it. I am moving on to simply using the files and rebuilding a VB.NET project because I do know how to do that. how to release, build the installer etc. is a problem for future me. – mpAppProg Jun 06 '23 at 15:56
  • @Tudeschizieuinchid .vbproj opened in notepad and added to post. Thanks, I really appreciate the assitance – mpAppProg Jun 06 '23 at 16:03
  • @Tudeschizieuinchid It appears version 16. I use VS 22. Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.31129.286 MinimumVisualStudioVersion = 10.0.40219.1 Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "RATA Data Ware", "8816_Controller\RATA Data Ware.vbproj", "{3D798AFD-8946-4631-8CF5-12FA5B7468BF}" EndProject Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "RATA Installed", "RATA Installed\RATA Installed.vdproj", "{758E8C10-CE08-4D43-A244-22F9D6D16CF2}" EndProject Global – mpAppProg Jun 06 '23 at 16:06
  • I'm hesitant o move forward, as I don't know what I don't know. Therefore unsure of what I need to learn online to move forward. I've already built a windows form all on my own and it was very straightforward. I was hoping to learn what I am looking at, but it doesn't contain those other files. Online tutorials are also straightforward. – mpAppProg Jun 06 '23 at 16:08
  • For Visual Studio version see [Visual Studio 2019 Release and Build History](https://learn.microsoft.com/en-us/visualstudio/releases/2019/history). Visual Studio 2019 is available [here](https://learn.microsoft.com/en-us/visualstudio/releases/2019/system-requirements#download). Visual Studio 2019 is 32-bit, whereas Visual Studio 2022 is 64-bit. You should be able to use Visual Studio 2022. – Tu deschizi eu inchid Jun 06 '23 at 17:26
  • Start by ensuring that the necessary Net Framework SDK and targeting packs are installed as shown in the post below. – Tu deschizi eu inchid Jun 06 '23 at 17:38
  • From the _.vbproj_ file you posted, one notices that it uses .NET Framework version 4.7 and is compiled for _x86_ which is 32-bit. – Tu deschizi eu inchid Jun 06 '23 at 17:41
  • You made some references to _college_. Since I went through the effort of writing a post to help you out, it seems that you could _give it the old college try_. – Tu deschizi eu inchid Jun 06 '23 at 17:43
  • @Tudeschizieuinchid Thank you very much! I am going to give it a shot. hopefully starting fresh will help fix everything. I've put in the time to understand this class with nearly 50 sub procedures. I hope I can get started with working on it. – mpAppProg Jun 06 '23 at 19:36
  • If converting to C#, here are some resources that may be helpful: [ICSharpCode Converter](https://icsharpcode.github.io/CodeConverter/) and [Telerik Code Converter](https://converter.telerik.com/). You may have better results if ensure that you can successfully compile the VB.NET project first. Then, turn [Option Strict](https://learn.microsoft.com/en-us/dotnet/visual-basic/language-reference/statements/option-strict-statement) on, re-compile, and fix any issues. Once that's done, then begin converting to C#. – Tu deschizi eu inchid Jun 06 '23 at 20:34
  • Check to see what kind of files are in _RATA installed_. Using _Windows Explorer_ go to the project folder. You may need to configure Win 10 to show file extensions (Control Panel => In upper right corner, select _View by_ Small Icons_ => File Explorer Options => click _View_ tab => uncheck _Hide extensions for known file types_). – Tu deschizi eu inchid Jun 06 '23 at 20:43
  • @Tudeschizieuinchid There are some empty folders some zipped folders and a .vdproj It seems .VDPROJ file is a Visual Studio Setup And Deployment Project file. – mpAppProg Jun 06 '23 at 20:54
  • The following may be of interest: https://stackoverflow.com/a/54889614/10024425 – Tu deschizi eu inchid Jun 06 '23 at 22:05
  • @Tudeschizieuinchid thanks. That's what I did to make the RATA installed load. otherwise I was only getting 1 0f 2 projects in the solution loading – mpAppProg Jun 07 '23 at 14:23
  • It's not clear why you have been tasked with converting this program to C#. Is the current program not working? Are there new feature requests? What is the purpose of the application? How many people use the application? What operating systems does the application run on? Before you start any programming, you should understand how the current program works and is being used by the people who use it and ask if they have any suggestions for improvement. – Tu deschizi eu inchid Jun 07 '23 at 16:30
  • From the _.vbproj_ file it seems that this application may have been converted from previous .NET Framework versions. To see the version numbers of the individual reference assemblies, click _Project_ => _ Properties_, on left side click _References_. Look at the _Version_ for each of the _References_. In the _.vbproj_ file, everything you see between ` ... ` is a result of selections made in _Project_ => _ Properties_, on left side click _Publish_ => click _Prerequisites..._ button. – Tu deschizi eu inchid Jun 07 '23 at 16:38
  • You may be able to eliminate all of the _BootstrapperPackage_ XML from the _.vbproj_ including the `ItemGroup` that is it's parent. To do this, close Visual Studio. Then open the file in Notepad. Remove the code and save it. Then open the project again in Visual Studio. Then you can add a prerequisite for the .NET Framework version(s) that are currently needed. – Tu deschizi eu inchid Jun 07 '23 at 16:43
  • Something that you should become familiar with is _dpi awareness_ and _Windows scaling_ (ie: type _scaling_ in the Win 10 search box). If you know WPF, you may consider using WPF instead of Windows Forms due to issues with _dpi awareness_ in Windows Forms. – Tu deschizi eu inchid Jun 07 '23 at 16:47
  • @Tudeschizieuinchid I have been allowed to do as I please, but C# has been suggested specifically for some reason, but I have freedom to do anything. The current software lacks some key functionality and is becoming out of date because it is coded to only read input from serial ports but the newer instruments are working with ethernet. That is part of my work. The problem is that the code is largely contained in one enormous 2,300 line class that contains only sub procedures and not functions. the private variables in this case are effectively global variables. – mpAppProg Jun 09 '23 at 13:15
  • @Tudeschizieuinchid As the code is not modular, there are so many touching points for things like communication with serial ports etc. At least the other part of my job (to automate reporting) is a lot easier. I feel no future employer will believe how much broad exp. I have. My friends making twice as much at big name tech firms are working on a few functions with the guidance of senior team members. This is more than first job experience, I just hope when I look for a new job they don't think I'm lying or underestimate me because of the company not being a tech firm – mpAppProg Jun 09 '23 at 13:20
  • @mpAppProg: Using C# seems like a good decision. You'll find much more documentation and information on the internet (and SO) for C# than for VB.NET. Keep in mind that if the application had it's .NET Framework version updated previously, then there may be .NET Framework language features that have been added that may make a particular approach unnecessary. For example, working with the registry. Therefore, don't get too focused on trying to convert the code exactly. You may consider keeping a daily record of what you do. It doesn't have to be too elaborate - just a daily summary. – Tu deschizi eu inchid Jun 09 '23 at 16:25
  • Glad to hear things are going more smoothly for you now. – Tu deschizi eu inchid Jun 09 '23 at 16:32

1 Answers1

0

The following isn't an answer, but may be helpful in ensuring that you've setup your Visual Studio environment correctly.

Before getting started ensure that the correct workloads and individual components have been installed.

Ensure that you have the correct VS Workloads and Individual Components installed.

The following assumes that you've already installed Visual Studio 2022.

Visual Studio Installer (Win 10):

  • In the Windows search box, type Visual Studio Installer. Click it to open it:

    enter image description here

  • Click Modify

enter image description here

  • Click Workloads tab

enter image description here

  • Ensure .NET desktop development is checked, if not, check it.

    enter image description here

  • Click Individual components

    enter image description here

  • Check desired .NET Framework SDK's and targeting pack (ex: .NET Framework 4.8 SDK, and.NET Framework 4.8 targeting pack). To see the .NET Framework version, open the project in Visual Studio. Then click Project => <project name> Properties. On left side click Application. Look at Target framework. Alternatively, open the .vbproj file using Notepad to find what the value is for TargetFrameworkVersion. Ensure that you select the .NET Framework SDK and .NET Framework targeting pack that matches the TargetFrameworkVersion. It's okay to install additional ones, such as v4.8.

    enter image description here

  • Check .NET Framework project and item templates

    enter image description here

  • Check .NET SDK

  • Check ClickOnce Publishing

  • Check NuGet package manager

  • Check Visual Studio SDK

  • Check Windows 10 SDK (10.0.xxxxx.0)

  • If you made any changes, in lower-right corner, select Download all, then install. Then click Modify (If no changes are made the button will show "Close" instead).

Note: If you forgot to change from Install while downloading, don't interrupt it - let it complete. As long as your network is stable the result will be the same.


Open Visual Studio 2022

Note: The first time you open Visual Studio 2022, you may be prompted to select your desired configuration settings. Once configuration is complete, you'll be able to use Visual Studio 2022.

In order to ensure that you see the main Visual Studio 2022 screen, as shown in the video, close Visual Studio. Then open Visual Studio 2022 again.

You should see:

enter image description here

Since this is a new installation, let's complete some more configuration prior to beginning.

  • On the lower right, click enter image description here

  • In Visual Studio menu, click Tools

  • Select Options...

Projects and Solutions:

  • Expand Project and Solutions

  • Select Locations

  • If desired, change the location for your projects by clicking the button with the three dots in it to the right of the TextBox.

    enter image description here

  • Select VB Defaults

  • For Option Explicit select On. For Option Strict, select On.

Text Editor:

  • Expand Text Editor
  • Expand C#
  • Select General
  • On right side, check Line numbers
  • Expand Visual Basic
  • Expand Code Style
  • Select Intellisense
  • On right side, under Enter key behavior, select Only add new line on enter after end of fully typed word

NuGet Package Manager:

  • Expand NuGet Package Manager

  • Select General

  • On right side, under Package Management, for Default package management format, select PackageReference

    Note: If working on an existing project, this setting should be set to match the existing package management format.

    How to determine if one's project uses Packages.config or PackageReference:

    Open the .vbproj file using Notepad. As an example, let's assume that NuGet package Newtonsoft.Json has been added to the project.

    If PackageReference is used, one will see:

    <ItemGroup>
      <PackageReference Include="Newtonsoft.Json">
        <Version>13.0.3</Version>
      </PackageReference>
    </ItemGroup>
    
    

    However, for Packages.config one sees:

    <None Include="packages.config" />
    

    and in one's solution folder (or project folder) one sees a folder named packages.

  • Click OK


Since Visual Studio is already open, and we've clicked Continue without code, to create a new project one can do the following:

  • In the Visual Studio (VS) menu, click File

  • Select New

  • Select Project

  • To make it easier to find the desired project template, one can filter them by choosing the desired filter. We'll choose:

    enter image description here

  • Choose Windows Forms App (.NET Framework)

  • Click Next

  • Enter desired project name, location, and select desired Framework from drop-down. Then click Create.


Open Solution Explorer

  • In VS menu, click View
  • Select Solution Explorer

Open Properties Window

  • In VS menu, click View
  • Select Properties Window

Open Toolbox

  • In VS menu, click View

  • Select Toolbox

    Note: The Toolbox is only available, when the form Design window is showing (ex: Form1.cs [Design] or Form1.vb [Design]).

To Switch Between Code View and Designer View:

  • In Solution Explorer, expand <project name>. Then right-click Form1.vb (or Form1.cs). Select View Code or View Designer.

To See Resources:

  • In VS menu, click Project
  • Select <project name> Properties
  • On left side, click Resources

Update:

To see a form's designer code, in Solution Explorer expand the form name (ex: Form1.vb). Then expand the child element (ex: Form1). Double-click Dispose (Boolean). Alternatively, one can use Notepad to open Form1.Designer.vb

Tu deschizi eu inchid
  • 4,117
  • 3
  • 13
  • 24