C#C
C#14mo ago
Xecute

System.IO.DirectoryNotFoundException: {directory}\wwwroot\

Building...
Unhandled exception. System.IO.DirectoryNotFoundException: {**My directory**}\wwwroot\
   at Microsoft.Extensions.FileProviders.PhysicalFileProvider..ctor(String root, ExclusionFilters filters)    
   at Microsoft.AspNetCore.Hosting.StaticWebAssets.StaticWebAssetsLoader.<>c.<UseStaticWebAssetsCore>b__1_0(String contentRoot)
   at Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider..ctor(StaticWebAssetManifest manifest, Func`2 fileProviderFactory)
   at Microsoft.AspNetCore.Hosting.StaticWebAssets.StaticWebAssetsLoader.UseStaticWebAssetsCore(IWebHostEnvironment environment, Stream manifest)
   at Microsoft.AspNetCore.Hosting.StaticWebAssets.StaticWebAssetsLoader.UseStaticWebAssets(IWebHostEnvironment environment, IConfiguration configuration)
   at Microsoft.AspNetCore.Hosting.BootstrapHostBuilder.RunDefaultCallbacks()
   at Microsoft.AspNetCore.Builder.WebApplicationBuilder.InitializeHosting(BootstrapHostBuilder bootstrapHostBuilder)
   at Microsoft.AspNetCore.Builder.WebApplicationBuilder..ctor(WebApplicationOptions options, Action`1 configureDefaults)
   at Microsoft.AspNetCore.Builder.WebApplication.CreateBuilder(String[] args)
   at SupplyHub.Server.Program.Main(String[] args) in {**His directory**}Server\Program.cs:line 9


So I have this .NET Core project which runs fine by myself, but when I passed it off to my friend who will also be working on it, he encounters this error, upon further inspection I find that its most likely these files that point to my specific directory paths, any way to make it that anyone who gets a hold of the project can run it? Thank you
Messenger_creation_F622EF27-C273-45C9-A81E-F13CE563A08B.jpg
Messenger_creation_D61C524D-1B43-446F-9449-9EB66AFD513E.jpg
Was this page helpful?