Fix HotelCore.Web compilation issues - #13
Merged
Merged
Conversation
…x class names, update configs Co-authored-by: mdnayanmia31 <123564739+mdnayanmia31@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix compilation issues in HotelCore.Web project
Fix HotelCore.Web compilation issues for interview demo
Dec 3, 2025
Owner
|
@copilot Could you kindly tell me how, should I merge your code with main? |
Contributor
Author
To merge this PR with main, you can use one of these methods: Option 1: Via GitHub UI (Recommended)
Option 2: Via Command Line git checkout main
git pull origin main
git merge copilot/fix-hotelcore-web-issues
git push origin mainAfter merging, you can delete the branch if no longer needed. |
mdnayanmia31
approved these changes
Dec 3, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
HotelCore.Web fails to compile due to conflicting C#/VB.NET files, class name mismatches, and incorrect connection string configuration.
Changes
RouteConfig.cs(auto-generated by Microsoft.AspNet.FriendlyUrls), remove ViewSwitcher references from vbprojSite1→SiteMaster, updateInheritsdirective toHotelCore.Web.SiteMasterHotelCoreDBtoHotelCore(matches DAL SqlHelper), use portable.\SQLEXPRESSinstead of hardcoded server nameOriginal prompt
Overview
This is a critical fix for an interview demo project. The HotelCore.Web project has several issues that prevent it from compiling and running correctly. All fixes must be applied ONLY to the HotelCore.Web project - do NOT modify HotelCore.BLL or HotelCore.DAL.
Issues to Fix in HotelCore.Web
1. Remove C# Files (Auto-generated by Microsoft.AspNet.FriendlyUrls)
Delete these C# files that conflict with the VB.NET project:
HotelCore.Web/App_Start/RouteConfig.cs- DELETE this file (keep RouteConfig.vb)HotelCore.Web/ViewSwitcher.ascx- DELETEHotelCore.Web/ViewSwitcher.ascx.cs- DELETEHotelCore.Web/ViewSwitcher.ascx.designer.cs- DELETE2. Update HotelCore.Web.vbproj
Remove references to the deleted C# files from the project file. Remove these lines:
<Content Include="App_Start\RouteConfig.cs" /><Content Include="ViewSwitcher.ascx" /><Content Include="ViewSwitcher.ascx.cs" /><Content Include="ViewSwitcher.ascx.designer.cs" />3. Fix Global.asax.vb
The Global.asax.vb is not registering routes or bundles. Update it to:
4. Fix Site.Master.vb Class Name Mismatch
The Site.Master file has
Inherits="HotelCore.Web.Site.Master"but the code-behind class is namedSite1.Fix
HotelCore.Web/Shared/Site.Master.vb- rename class fromSite1toSiteMaster:Also fix
HotelCore.Web/Shared/Site.Master- change the Inherits directive:5. Fix Web.config Connection String Name
The SqlHelper.vb in DAL uses
"HotelCore"but Web.config has"HotelCoreDB". Since we can't modify DAL, update Web.config to add another connection string with name "HotelCore" OR change the existing one's name:Change in
HotelCore.Web/Web.config:Note: Change
NAYANWINDOWS\SQLEXPRESSto.\SQLEXPRESSfor portability (interviewer can use their own SQL Server instance easily).6. Clean Up RouteConfig.vb
Remove unnecessary comments and make it clean and professional: