I'm going through the book, building the website chapter by chapter (I downloaded the chapters 2-5)
My project isn't reading the project file that I created and added to the websolution. I added the project and the reference.
Looking at the chaper 3's solution, when the website with the project added is loaded, it shows the following
Under the Beerhouse web Solution:
TBH_CustomEvents
Then under that Class file:
Properties AssemblyInfo.cs
References System
System.Data
System.Web
System.xml
CustomEvents.cs
TBHCustomEvents.csproj (MINE HAS ALL BUT THIS FILE...THIS IS THE ONE I'M MISSING)
When I open that file, it contains the following code:
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{0C021C6D-B110-4F5A-9D52-F8DB244553D6}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>MB.TheBeerHouse</RootNamespace>
<AssemblyName>MB.TheBeerHouse.CustomEvents</AssemblyName>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>2.0</OldToolsVersion>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Web" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="CustomEvents.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.target s" />
<!-- 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>
If I
double click on that file, then the properties window view switches to "XML Document", and shows a "Schemas" path for it.
If you open just Chapter 3's project file (
"TBHCustomEvents.csproj") alone, there is no sub-file with that code. It looks like my project - i.e., there is no "TBHCustomEvents.csproj" in the list of files.
So apparantly at some point after adding the customevent project to the websiteSolution, I guess this file is supposed to be made or added? But I don't know what to do to get my websolution to add this file.
I also don't know why when their file is added, its added as
TBH_CustomEvents rather than
TBHCustomEvents?? They have
two project files, one as it was built by itself (which looks like mine and same name as mine
- "TBHCustomEvents.csproj" ), and then the other with the name
"TBH_CustomEvents.csproj" which when double clicked, opens the
entire solution as added to the websolution. If you double click on the "TBHCustomEvents" file, then
only the project file opens. I don't know how to create a similiar "TBH_CustomEvents" that will open WITH my solution.
Can someone please help? I've been stuck trying to resolve this a day and a half now and can't get any further in the book until I work it out.
Rachel