DotNetWebTutor.com                                                    Link to Us

What is in the Solution file:
open .sln file with notepad
•  has version number
•  projects information with guid number so they are
not named exactly the same
makes a unique identifier
global information
•  most important it points to project files
Visual Studio Solution File
What is in a project file
What is in the project file:
open project file with notepad
It is in an XML format
•  type of project and version
•  build settings
•  configurable items
•  references
•  imports (namespaces)
•  files to include

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion></ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{a78a6032-b813-4e74-9937-3a23690a944f}</ProjectGuid>
<OutputType>WinExe</OutputType>
<StartupObject>WindowsApplication1.My.MyApplication</StartupObject>
<RootNamespace>WindowsApplication1</RootNamespace>
<AssemblyName>WindowsApplication1</AssemblyName>
<MyType>WindowsForms</MyType>
</PropertyGroup>

  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<OutputPath>bin\Debug\</OutputPath>
<DocumentationFile>WindowsApplication1.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup>

  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<DefineDebug>false</DefineDebug>
<DefineTrace>true</DefineTrace>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DocumentationFile>WindowsApplication1.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup>

  <ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<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="Form1.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.vb">
<DependentUpon>Form1.vb</DependentUpon>
<SubType>Form</SubType>
</Compile>
<Compile Include="My Project\AssemblyInfo.vb"/>
<Compile Include="My Project\Application.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Application.myapp</DependentUpon>
</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>
</ItemGroup>

  <ItemGroup>
<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="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>
</ItemGroup>

  <Import Project="$(MSBuildBinPath)\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>
Adding a project to a solution
Adding a project to a solution:

Right click on solution in solution explorer
•  Add new project
•  Or add existing project
A single project can be in many solutions
Menu item add new project
Working with Visual Studio windows
Working with Visual Studio windows:
Server Explorer, toolbox, solution explorer, properties
Server Explorer:
Server resources available such as databases

Toolbox:
Displays list of controls you can add to your form

Solution Explorer:
Displays projects and files in current solution

Properties Window:
Displays list of properties of currently selected object

3 window states
1.    autohide-docked
2.    fixed docked
3.    floating
Pin Down Windows
Visual Studio Window PinPin down windows:

Use pin button to pin down window and make it fixed

 

When pinned down it uses tabs for each window
Pinned windowHold mouse over it

Without the pin you can hold you mouse over a window to select it

Close a Window in Visual Studio
Close a window:
Close a window by clicking on the X in the upper right corner
Visual Studio Close Button
Open window in Visual Studio
Open a window:
You can reopen any windows under the view menu
VisualStudio view menu item
End of Intro to Visual Studio section 2