Last post Apr 15, 2020 06:26 PM by mgebhard
Apr 15, 2020 05:32 PM|RateFor|LINK
I had an asp.net project that I backed up periodically. I still have it, but the 'solution file' is stored by Visual Studio in a different folder than the code, and I never realized I should back that up too. So now I've lost the solution file, but
I still have the asp.net pages.
I can't just create a new solution and import all the pages, because the old site was a 'web site' not a web application. I did get advice on this forum to install extra features of Visual Studio that would let me create earlier types of solution files,
which I did, but that won't compile a website properly either.
I do see choices such as:
ASP.NET EMPTY WEB SITE
ASP.NET WEB FORMS SITE
I started just now again to create the first (empty web site) and add the pages to it, and then add nuget packages that apply. But for example, in the following code:
Public Class TravisIOroutines
Private Shared Provider As DpapiDataProtectionProvider = New DpapiDataProtectionProvider("rateForSuccess")
Private Shared userManager As New ApplicationUserManager
Private Shared roleManager As New ApplicationRoleManager
Public Shared Function getUserManager() As ApplicationUserManager
Public Shared Function DeleteUser(ByVal username As String) As Boolean
Dim ir As IdentityResult
Dim user = GetUserByName(username)
ir = userManager.Delete(user) ' THIS WILL NOT COMPILE
If ir.Succeeded Then
"userManager.delete' will not compile. 'usermanger' has no 'delete' method.
Any help is appreciated.
Apr 15, 2020 06:26 PM|mgebhard|LINK
I can't just create a new solution and import all the pages, because the old site was a 'web site' not a web application.
Web Site project do not have project files and simply exist in a folder. Click the File menu -> Open - Web Site. Then navigate to the folder that contains the Web Site and open. This is a main features of a Web Site project.
If the original solution also contained library projects then add the projects to the solution. Same concept as above, just navigate your file system to the project folder then open the project file. The project file is always within the project folder.
A solution file simply has the path to the projects.