I'm collaborating on an ASP.NET web forms web application where there is no "Web.config" and no "packages.config" files. How can I run this application locally ?
Asked
Active
Viewed 192 times
0
-
1If you have a project file you should be able to get an idea of what NuGet packages are needed. Sounds like you should ask the other collaborators where the web.config is. – James Skemp Sep 17 '18 at 19:16
-
Thanks a lot for your answer! – Sep 17 '18 at 19:28
-
In that case, added as an actual answer with more specific details. Glad it helped. :) – James Skemp Sep 18 '18 at 01:16
1 Answers
1
Assuming you have a project file, such as *.csproj, you can search within that to find any libraries referenced. By default NuGet packages will be placed within a packages directory, and will look something like the following:
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll</HintPath>
<Private>True</Private>
</Reference>
In the above case you have Microsoft.Web.Infrastructure, version 1.0.0.0 and Microsoft.AspNet.WebPages, version 3.2.3.
This will also suggest the version of .NET being used.
Replicating a web.config is much more difficult, since it could contain application settings, database connection strings, secured paths, etcetera. For that it would be best to just ask the other collaborators where the web.config is.

James Skemp
- 8,018
- 9
- 64
- 107